oneview-sdk 5.2.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/Gemfile +0 -0
- data/Guardfile +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/TESTING.md +0 -0
- data/bin/oneview-sdk-ruby +0 -0
- data/endpoints-support.md +221 -186
- data/lib/oneview-sdk.rb +4 -3
- data/lib/oneview-sdk/cli.rb +9 -9
- data/lib/oneview-sdk/client.rb +6 -6
- data/lib/oneview-sdk/config_loader.rb +0 -0
- data/lib/oneview-sdk/exceptions.rb +0 -0
- data/lib/oneview-sdk/image-streamer/client.rb +4 -4
- data/lib/oneview-sdk/image-streamer/resource/api300.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/artifact_bundle.rb +1 -1
- data/lib/oneview-sdk/image-streamer/resource/api300/build_plan.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/deployment_group.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/deployment_plan.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/golden_image.rb +1 -1
- data/lib/oneview-sdk/image-streamer/resource/api300/os_volume.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/plan_script.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/resource.rb +0 -0
- data/lib/oneview-sdk/image_streamer.rb +0 -0
- data/lib/oneview-sdk/resource.rb +5 -6
- data/lib/oneview-sdk/resource/api200.rb +0 -0
- data/lib/oneview-sdk/resource/api200/client_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api200/connection_template.rb +0 -0
- data/lib/oneview-sdk/resource/api200/datacenter.rb +0 -0
- data/lib/oneview-sdk/resource/api200/enclosure.rb +5 -6
- data/lib/oneview-sdk/resource/api200/enclosure_group.rb +0 -0
- data/lib/oneview-sdk/resource/api200/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api200/event.rb +0 -0
- data/lib/oneview-sdk/resource/api200/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api200/fc_network.rb +0 -0
- data/lib/oneview-sdk/resource/api200/fcoe_network.rb +0 -0
- data/lib/oneview-sdk/resource/api200/firmware_bundle.rb +0 -0
- data/lib/oneview-sdk/resource/api200/firmware_driver.rb +0 -0
- data/lib/oneview-sdk/resource/api200/id_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api200/interconnect.rb +1 -1
- data/lib/oneview-sdk/resource/api200/lig_uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api200/logical_downlink.rb +0 -0
- data/lib/oneview-sdk/resource/api200/logical_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api200/logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api200/logical_interconnect_group.rb +6 -6
- data/lib/oneview-sdk/resource/api200/logical_switch.rb +5 -3
- data/lib/oneview-sdk/resource/api200/logical_switch_group.rb +0 -0
- data/lib/oneview-sdk/resource/api200/login_detail.rb +27 -0
- data/lib/oneview-sdk/resource/api200/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api200/network_set.rb +0 -0
- data/lib/oneview-sdk/resource/api200/power_device.rb +0 -0
- data/lib/oneview-sdk/resource/api200/rack.rb +8 -1
- data/lib/oneview-sdk/resource/api200/resource.rb +0 -0
- data/lib/oneview-sdk/resource/api200/san_manager.rb +0 -0
- data/lib/oneview-sdk/resource/api200/server_hardware.rb +10 -4
- data/lib/oneview-sdk/resource/api200/server_hardware_type.rb +1 -1
- data/lib/oneview-sdk/resource/api200/server_profile.rb +2 -2
- data/lib/oneview-sdk/resource/api200/server_profile_template.rb +0 -0
- data/lib/oneview-sdk/resource/api200/storage_pool.rb +6 -0
- data/lib/oneview-sdk/resource/api200/storage_system.rb +7 -1
- data/lib/oneview-sdk/resource/api200/switch.rb +1 -1
- data/lib/oneview-sdk/resource/api200/unmanaged_device.rb +0 -0
- data/lib/oneview-sdk/resource/api200/uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api200/user.rb +5 -4
- data/lib/oneview-sdk/resource/api200/version.rb +27 -0
- data/lib/oneview-sdk/resource/api200/volume.rb +21 -17
- data/lib/oneview-sdk/resource/api200/volume_attachment.rb +0 -0
- data/lib/oneview-sdk/resource/api200/volume_snapshot.rb +0 -0
- data/lib/oneview-sdk/resource/api200/volume_template.rb +7 -10
- data/lib/oneview-sdk/resource/api200/web_server_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api300.rb +1 -1
- data/lib/oneview-sdk/resource/api300/c7000.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/client_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/connection_template.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/datacenter.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/enclosure_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/event.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/fc_network.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/fcoe_network.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/firmware_bundle.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/firmware_driver.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/id_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/internal_link_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/lig_uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_downlink.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_switch.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_switch_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/login_detail.rb +23 -0
- data/lib/oneview-sdk/resource/api300/c7000/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/network_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/power_device.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/rack.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/resource.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/san_manager.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/scope.rb +3 -5
- data/lib/oneview-sdk/resource/api300/c7000/server_hardware.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/server_hardware_type.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/server_profile.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/server_profile_template.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/storage_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/storage_system.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/switch.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/unmanaged_device.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/user.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/version.rb +23 -0
- data/lib/oneview-sdk/resource/api300/c7000/volume.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/volume_attachment.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/volume_snapshot.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/volume_template.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/web_server_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/client_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/connection_template.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/datacenter.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/drive_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/enclosure.rb +1 -1
- data/lib/oneview-sdk/resource/api300/synergy/enclosure_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/event.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/fc_network.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/fcoe_network.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/firmware_bundle.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/firmware_driver.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/id_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/internal_link_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/lig_uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/logical_downlink.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/logical_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/login_detail.rb +23 -0
- data/lib/oneview-sdk/resource/api300/synergy/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/network_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/os_deployment_plan.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/power_device.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/rack.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/resource.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/san_manager.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/scope.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/server_hardware.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/server_hardware_type.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/server_profile.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/server_profile_template.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/storage_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/storage_system.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/switch.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/unmanaged_device.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/user.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/version.rb +23 -0
- data/lib/oneview-sdk/resource/api300/synergy/volume.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/volume_attachment.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/volume_snapshot.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/volume_template.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/web_server_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api500.rb +1 -1
- data/lib/oneview-sdk/resource/api500/c7000.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/client_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/connection_template.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/datacenter.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/enclosure_group.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/event.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/fc_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/fcoe_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/firmware_bundle.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/firmware_driver.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/id_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/internal_link_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/lig_uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/logical_downlink.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/logical_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/logical_interconnect_group.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/logical_switch.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/logical_switch_group.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/login_detail.rb +23 -0
- data/lib/oneview-sdk/resource/api500/c7000/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/network_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/power_device.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/rack.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/resource.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/san_manager.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/scope.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_hardware.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_hardware_type.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_profile.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_profile_template.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/storage_pool.rb +7 -1
- data/lib/oneview-sdk/resource/api500/c7000/storage_system.rb +3 -3
- data/lib/oneview-sdk/resource/api500/c7000/switch.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/unmanaged_device.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/user.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/version.rb +23 -0
- data/lib/oneview-sdk/resource/api500/c7000/volume.rb +21 -14
- data/lib/oneview-sdk/resource/api500/c7000/volume_attachment.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/volume_snapshot.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/volume_template.rb +3 -5
- data/lib/oneview-sdk/resource/api500/c7000/web_server_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/client_certificate.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/connection_template.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/datacenter.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/drive_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/enclosure_group.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/event.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/fc_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/fcoe_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/firmware_bundle.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/firmware_driver.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/id_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/internal_link_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/lig_uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/logical_downlink.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/logical_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/logical_interconnect_group.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/login_detail.rb +23 -0
- data/lib/oneview-sdk/resource/api500/synergy/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/network_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/os_deployment_plan.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/power_device.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/rack.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/resource.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/san_manager.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/sas_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/sas_logical_interconnect_group.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/scope.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/server_hardware.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/server_hardware_type.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/server_profile.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/storage_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/storage_system.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/switch.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/unmanaged_device.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/user.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/version.rb +23 -0
- data/lib/oneview-sdk/resource/api500/synergy/volume.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/volume_attachment.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/volume_snapshot.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/volume_template.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/web_server_certificate.rb +0 -0
- data/lib/oneview-sdk/resource_helper.rb +0 -0
- data/lib/oneview-sdk/rest.rb +7 -6
- data/lib/oneview-sdk/scmb.rb +0 -0
- data/lib/oneview-sdk/ssl_helper.rb +3 -2
- data/lib/oneview-sdk/version.rb +1 -1
- data/oneview-sdk.gemspec +3 -2
- metadata +31 -7
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -22,7 +22,7 @@ module OneviewSDK
|
|
22
22
|
# @return [Array<OneviewSDK:API300:Synergy::Enclosure>] containing the added enclosures
|
23
23
|
def add
|
24
24
|
ensure_client
|
25
|
-
required_attributes = %w
|
25
|
+
required_attributes = %w[hostname]
|
26
26
|
required_attributes.each { |k| raise IncompleteResource, "Missing required attribute: '#{k}'" unless @data.key?(k) }
|
27
27
|
|
28
28
|
temp_data = @data.select { |k, _v| required_attributes.include?(k) }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# You may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed
|
8
|
+
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
9
|
+
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
10
|
+
# language governing permissions and limitations under the License.
|
11
|
+
|
12
|
+
require_relative '../../api200/login_detail'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API300
|
16
|
+
module Synergy
|
17
|
+
# login details resource for API300 synergy
|
18
|
+
class LoginDetail < OneviewSDK::API200::LoginDetail
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# You may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed
|
8
|
+
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
9
|
+
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
10
|
+
# language governing permissions and limitations under the License.
|
11
|
+
|
12
|
+
require_relative '../../api200/version'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API300
|
16
|
+
module Synergy
|
17
|
+
# Version resource implementation for API300 Synergy
|
18
|
+
class Version < OneviewSDK::API200::Version
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -12,7 +12,7 @@
|
|
12
12
|
module OneviewSDK
|
13
13
|
# Module for API v500
|
14
14
|
module API500
|
15
|
-
SUPPORTED_VARIANTS = %w
|
15
|
+
SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
|
16
16
|
DEFAULT_VARIANT = 'C7000'.freeze
|
17
17
|
@variant = DEFAULT_VARIANT
|
18
18
|
@variant_updated = false # Whether or not the API variant has been set by the user
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# You may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed
|
8
|
+
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
9
|
+
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
10
|
+
# language governing permissions and limitations under the License.
|
11
|
+
|
12
|
+
require_relative '../../api300/c7000/login_detail'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API500
|
16
|
+
module C7000
|
17
|
+
# login details resource implementation for API500 C7000
|
18
|
+
class LoginDetail < OneviewSDK::API300::C7000::LoginDetail
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -17,7 +17,7 @@ module OneviewSDK
|
|
17
17
|
# Storage pool resource implementation for API500 C7000
|
18
18
|
class StoragePool < OneviewSDK::API500::C7000::Resource
|
19
19
|
BASE_URI = '/rest/storage-pools'.freeze
|
20
|
-
UNIQUE_IDENTIFIERS = %w
|
20
|
+
UNIQUE_IDENTIFIERS = %w[uri].freeze
|
21
21
|
|
22
22
|
# Create a resource object, associate it with a client, and set its properties.
|
23
23
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
@@ -35,6 +35,12 @@ module OneviewSDK
|
|
35
35
|
unavailable_method
|
36
36
|
end
|
37
37
|
|
38
|
+
# Method is not available
|
39
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
40
|
+
def create!(*)
|
41
|
+
unavailable_method
|
42
|
+
end
|
43
|
+
|
38
44
|
# Method is not available
|
39
45
|
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
40
46
|
def delete(*)
|
@@ -17,7 +17,7 @@ module OneviewSDK
|
|
17
17
|
# Storage System resource implementation for API500 C7000
|
18
18
|
class StorageSystem < OneviewSDK::API300::C7000::StorageSystem
|
19
19
|
# deviceSpecificAttributes['serialNumber'] and deviceSpecificAttributes['wwn'] are supported too
|
20
|
-
UNIQUE_IDENTIFIERS = %w
|
20
|
+
UNIQUE_IDENTIFIERS = %w[name uri hostname].freeze
|
21
21
|
|
22
22
|
# Create a resource object, associate it with a client, and set its properties.
|
23
23
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
@@ -47,7 +47,7 @@ module OneviewSDK
|
|
47
47
|
# @return [OneviewSDK::StorageSystem] self
|
48
48
|
def add
|
49
49
|
ensure_client
|
50
|
-
temp_old_data = JSON.
|
50
|
+
temp_old_data = JSON.parse(@data.to_json)
|
51
51
|
credentials = temp_old_data['credentials'] || {}
|
52
52
|
request_body = {
|
53
53
|
'family' => @data['family'],
|
@@ -103,7 +103,7 @@ module OneviewSDK
|
|
103
103
|
# @return [Boolean] Whether or not retrieve was successful
|
104
104
|
# @raise [OneviewSDK::IncompleteResource] if required attributes are not filled
|
105
105
|
def retrieve!
|
106
|
-
data_temp = JSON.
|
106
|
+
data_temp = JSON.parse(@data.to_json)
|
107
107
|
serial_number = data_temp['deviceSpecificAttributes']['serialNumber'] rescue nil
|
108
108
|
wwn = data_temp['deviceSpecificAttributes']['wwn'] rescue nil
|
109
109
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# You may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed
|
8
|
+
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
9
|
+
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
10
|
+
# language governing permissions and limitations under the License.
|
11
|
+
|
12
|
+
require_relative '../../api300/c7000/version'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API500
|
16
|
+
module C7000
|
17
|
+
# Version resource implementation for API500 C7000
|
18
|
+
class Version < OneviewSDK::API300::C7000::Version
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -25,10 +25,11 @@ module OneviewSDK
|
|
25
25
|
|
26
26
|
# Creates the volume
|
27
27
|
# @note properties and templateUri parameters are required for creation, but not afterwards; after creation, they will be removed.
|
28
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
28
29
|
# @raise [OneviewSDK::IncompleteResource] if the client is not set.
|
29
30
|
# @raise [StandardError] if the resource creation fails.
|
30
31
|
# @return [Resource] self
|
31
|
-
def create
|
32
|
+
def create(header = {})
|
32
33
|
properties = Hash[@data['properties'].map { |k, v| [k.to_sym, v] }]
|
33
34
|
family = properties[:dataProtectionLevel].nil? ? 'StoreServ' : 'StoreVirtual'
|
34
35
|
template_data = {
|
@@ -37,7 +38,7 @@ module OneviewSDK
|
|
37
38
|
}
|
38
39
|
@data['templateUri'] = get_volume_template_uri(template_data) unless @data['templateUri']
|
39
40
|
|
40
|
-
OneviewSDK::Resource.instance_method(:create).bind(self).call
|
41
|
+
OneviewSDK::Resource.instance_method(:create).bind(self).call(DEFAULT_REQUEST_HEADER.merge(header))
|
41
42
|
@data.delete('properties')
|
42
43
|
@data.delete('templateUri')
|
43
44
|
self
|
@@ -54,14 +55,15 @@ module OneviewSDK
|
|
54
55
|
# Deletes the resource from OneView or from Oneview and storage system
|
55
56
|
# @param [Symbol] flag Delete storage system from Oneview only or in storage system as well.
|
56
57
|
# Flags: :all = removes the volume from oneview and storage system. :oneview = removes from oneview only.
|
58
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
57
59
|
# @raise [InvalidResource] if an invalid flag is passed.
|
58
60
|
# @return [true] if resource was deleted successfully.
|
59
|
-
def delete(flag = :all)
|
61
|
+
def delete(flag = :all, header = {})
|
60
62
|
ensure_client && ensure_uri
|
61
|
-
raise InvalidResource, 'Invalid flag value, use :oneview or :all' unless
|
63
|
+
raise InvalidResource, 'Invalid flag value, use :oneview or :all' unless %i[oneview all].include?(flag)
|
62
64
|
uri = @data['uri']
|
63
65
|
uri << '?suppressDeviceUpdates=true' if flag == :oneview
|
64
|
-
response = @client.rest_delete(uri, 'If-Match' => @data['eTag'])
|
66
|
+
response = @client.rest_delete(uri, DEFAULT_REQUEST_HEADER.merge(header).merge('If-Match' => @data['eTag']))
|
65
67
|
@client.response_handler(response)
|
66
68
|
true
|
67
69
|
end
|
@@ -148,7 +150,7 @@ module OneviewSDK
|
|
148
150
|
# @return [OneviewSDK::Volume] The volume imported.
|
149
151
|
def add
|
150
152
|
ensure_client
|
151
|
-
required_attributes = %w
|
153
|
+
required_attributes = %w[deviceVolumeName isShareable storageSystemUri]
|
152
154
|
required_attributes.each { |k| raise IncompleteResource, "Missing required attribute: '#{k}'" unless @data.key?(k) || @data.key?(k.to_sym) }
|
153
155
|
@data['name'] ||= @data['deviceVolumeName']
|
154
156
|
response = @client.rest_post("#{BASE_URI}/from-existing", { 'body' => @data }, @api_version)
|
@@ -158,10 +160,12 @@ module OneviewSDK
|
|
158
160
|
|
159
161
|
# Retrieve resource details based on this resource's name or URI.
|
160
162
|
# @note one of the UNIQUE_IDENTIFIERS, e.g. name or uri or properties['name'], must be specified in the resource
|
163
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
161
164
|
# @return [Boolean] Whether or not retrieve was successful
|
162
|
-
def retrieve!
|
163
|
-
|
164
|
-
|
165
|
+
def retrieve!(header = {})
|
166
|
+
header = DEFAULT_REQUEST_HEADER.merge(header)
|
167
|
+
return super(header) unless @data['properties']
|
168
|
+
results = find_by_name_in_properties(header)
|
165
169
|
return false unless results.size == 1
|
166
170
|
set_all(results.first.data)
|
167
171
|
true
|
@@ -169,10 +173,12 @@ module OneviewSDK
|
|
169
173
|
|
170
174
|
# Check if a resource exists
|
171
175
|
# @note one of the UNIQUE_IDENTIFIERS, e.g. name or uri or properties['name'], must be specified in the resource
|
176
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
172
177
|
# @return [Boolean] Whether or not resource exists
|
173
|
-
def exists?
|
174
|
-
|
175
|
-
|
178
|
+
def exists?(header = {})
|
179
|
+
header = DEFAULT_REQUEST_HEADER.merge(header)
|
180
|
+
return super(header) unless @data['properties']
|
181
|
+
find_by_name_in_properties(header).size == 1
|
176
182
|
end
|
177
183
|
|
178
184
|
private
|
@@ -201,12 +207,13 @@ module OneviewSDK
|
|
201
207
|
end
|
202
208
|
|
203
209
|
# Gets the volume
|
210
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
204
211
|
# @raise [OneviewSDK::IncompleteResource] if the name parameter is not set
|
205
212
|
# @return [Array] the array of volumes
|
206
|
-
def find_by_name_in_properties
|
213
|
+
def find_by_name_in_properties(header)
|
207
214
|
name = @data['properties']['name'] || @data['properties'][:name]
|
208
215
|
raise IncompleteResource, 'Must set resource name within the properties before trying to retrieve!' unless name
|
209
|
-
self.class.find_by(@client, 'name' => name)
|
216
|
+
self.class.find_by(@client, { 'name' => name }, BASE_URI, header)
|
210
217
|
end
|
211
218
|
end
|
212
219
|
end
|