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
|
@@ -16,7 +16,7 @@ module OneviewSDK
|
|
16
16
|
# Server hardware resource implementation
|
17
17
|
class ServerHardware < Resource
|
18
18
|
BASE_URI = '/rest/server-hardware'.freeze
|
19
|
-
UNIQUE_IDENTIFIERS = %w
|
19
|
+
UNIQUE_IDENTIFIERS = %w[name uri serialNumber virtualSerialNumber serverProfileUri].freeze
|
20
20
|
|
21
21
|
# Remove resource from OneView
|
22
22
|
# @return [true] if resource was removed successfully
|
@@ -32,6 +32,12 @@ module OneviewSDK
|
|
32
32
|
@data['type'] ||= 'server-hardware-4'
|
33
33
|
end
|
34
34
|
|
35
|
+
# Method is not available
|
36
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
37
|
+
def create!(*)
|
38
|
+
unavailable_method
|
39
|
+
end
|
40
|
+
|
35
41
|
# Retrieve resource details based on this resource's name or URI.
|
36
42
|
# @note one of the UNIQUE_IDENTIFIERS must be specified in the resource
|
37
43
|
# @return [Boolean] Whether or not retrieve was successful
|
@@ -79,15 +85,15 @@ module OneviewSDK
|
|
79
85
|
# @return [OneviewSDK::ServerHardware] self
|
80
86
|
def add
|
81
87
|
ensure_client
|
82
|
-
required_attributes = %w
|
88
|
+
required_attributes = %w[hostname username password licensingIntent]
|
83
89
|
required_attributes.each { |k| raise IncompleteResource, "Missing required attribute: '#{k}'" unless @data.key?(k) }
|
84
90
|
|
85
|
-
optional_attrs = %w
|
91
|
+
optional_attrs = %w[configurationState force restore]
|
86
92
|
temp_data = @data.select { |k, _v| required_attributes.include?(k) || optional_attrs.include?(k) }
|
87
93
|
response = @client.rest_post(self.class::BASE_URI, { 'body' => temp_data }, @api_version)
|
88
94
|
body = @client.response_handler(response)
|
89
95
|
set_all(body)
|
90
|
-
%w
|
96
|
+
%w[username password hostname].each { |k| @data.delete(k) } # These are no longer needed
|
91
97
|
self
|
92
98
|
end
|
93
99
|
|
@@ -51,7 +51,7 @@ module OneviewSDK
|
|
51
51
|
def update(attributes = {})
|
52
52
|
set_all(attributes)
|
53
53
|
ensure_client && ensure_uri
|
54
|
-
data = @data.select { |k, _v| %w
|
54
|
+
data = @data.select { |k, _v| %w[name description].include?(k) }
|
55
55
|
response = @client.rest_put(@data['uri'], { 'body' => data }, @api_version)
|
56
56
|
@client.response_handler(response)
|
57
57
|
self
|
@@ -18,7 +18,7 @@ module OneviewSDK
|
|
18
18
|
class ServerProfile < Resource
|
19
19
|
include OneviewSDK::ResourceHelper::PatchOperation
|
20
20
|
BASE_URI = '/rest/server-profiles'.freeze
|
21
|
-
UNIQUE_IDENTIFIERS = %w
|
21
|
+
UNIQUE_IDENTIFIERS = %w[name uri associatedServer serialNumber serverHardwareUri].freeze
|
22
22
|
|
23
23
|
def initialize(client, params = {}, api_ver = nil)
|
24
24
|
super
|
@@ -313,7 +313,7 @@ module OneviewSDK
|
|
313
313
|
query_uri = build_query(query) if query
|
314
314
|
response = client.rest_get("#{BASE_URI}/available-networks#{query_uri}")
|
315
315
|
body = client.response_handler(response)
|
316
|
-
body.select { |k, _v| %w
|
316
|
+
body.select { |k, _v| %w[ethernetNetworks networkSets fcNetworks].include?(k) }
|
317
317
|
end
|
318
318
|
|
319
319
|
# Gets the available servers based on the query parameters
|
File without changes
|
@@ -44,6 +44,12 @@ module OneviewSDK
|
|
44
44
|
unavailable_method
|
45
45
|
end
|
46
46
|
|
47
|
+
# Method is not available
|
48
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
49
|
+
def create!(*)
|
50
|
+
unavailable_method
|
51
|
+
end
|
52
|
+
|
47
53
|
# Method is not available
|
48
54
|
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
49
55
|
def delete(*)
|
@@ -16,7 +16,7 @@ module OneviewSDK
|
|
16
16
|
# Storage system resource implementation
|
17
17
|
class StorageSystem < Resource
|
18
18
|
BASE_URI = '/rest/storage-systems'.freeze
|
19
|
-
UNIQUE_IDENTIFIERS = %w
|
19
|
+
UNIQUE_IDENTIFIERS = %w[name uri serialNumber wwn].freeze # credentials['ip_hostname'] is supported too
|
20
20
|
|
21
21
|
# Remove resource from OneView
|
22
22
|
# @return [true] if resource was removed successfully
|
@@ -38,6 +38,12 @@ module OneviewSDK
|
|
38
38
|
unavailable_method
|
39
39
|
end
|
40
40
|
|
41
|
+
# Method is not available
|
42
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
43
|
+
def create!(*)
|
44
|
+
unavailable_method
|
45
|
+
end
|
46
|
+
|
41
47
|
# Method is not available
|
42
48
|
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
43
49
|
def delete(*)
|
@@ -17,7 +17,7 @@ module OneviewSDK
|
|
17
17
|
class Switch < Resource
|
18
18
|
BASE_URI = '/rest/switches'.freeze
|
19
19
|
TYPE_URI = '/rest/switch-types'.freeze
|
20
|
-
UNIQUE_IDENTIFIERS = %w
|
20
|
+
UNIQUE_IDENTIFIERS = %w[name uri serialNumber].freeze
|
21
21
|
|
22
22
|
# Remove resource from OneView
|
23
23
|
# @return [true] if resource was removed successfully
|
File without changes
|
File without changes
|
@@ -16,7 +16,7 @@ module OneviewSDK
|
|
16
16
|
# User resource implementation
|
17
17
|
class User < Resource
|
18
18
|
BASE_URI = '/rest/users'.freeze
|
19
|
-
UNIQUE_IDENTIFIERS = %w
|
19
|
+
UNIQUE_IDENTIFIERS = %w[userName uri].freeze
|
20
20
|
|
21
21
|
# Create a resource object, associate it with a client, and set its properties.
|
22
22
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
@@ -33,12 +33,13 @@ module OneviewSDK
|
|
33
33
|
# Create the resource on OneView using the current data
|
34
34
|
# @note Calls the refresh method to set additional data
|
35
35
|
# @note Removes the password attribute after creation
|
36
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
36
37
|
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
37
38
|
# @raise [StandardError] if the resource creation fails
|
38
39
|
# @return [Resource] self
|
39
|
-
def create
|
40
|
+
def create(header = {})
|
40
41
|
ensure_client
|
41
|
-
response = @client.rest_post(
|
42
|
+
response = @client.rest_post(BASE_URI, DEFAULT_REQUEST_HEADER.merge(header).merge('body' => @data), @api_version)
|
42
43
|
body = @client.response_handler(response)
|
43
44
|
@data.delete('password')
|
44
45
|
set_all(body)
|
@@ -53,7 +54,7 @@ module OneviewSDK
|
|
53
54
|
def update(attributes = {})
|
54
55
|
set_all(attributes)
|
55
56
|
ensure_client && ensure_uri
|
56
|
-
new_data = @data.
|
57
|
+
new_data = @data.reject { |k, _v| k.to_s == 'roles' } # This cannot be updated here. It is updated below
|
57
58
|
response = @client.rest_put(self.class::BASE_URI, { 'body' => new_data }, @api_version)
|
58
59
|
d = @client.response_handler(response)
|
59
60
|
set_roles(@data['roles']) if @data['roles'] && @data['roles'].sort != d['roles'].sort
|
@@ -0,0 +1,27 @@
|
|
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
|
+
module OneviewSDK
|
13
|
+
module API200
|
14
|
+
# Version resource implementation
|
15
|
+
class Version
|
16
|
+
BASE_URI = '/rest/version'.freeze
|
17
|
+
|
18
|
+
# Get current and minimum version
|
19
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
20
|
+
# @return [Hash] Version
|
21
|
+
def self.get_version(client)
|
22
|
+
response = client.rest_get(BASE_URI)
|
23
|
+
client.response_handler(response)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -27,18 +27,29 @@ module OneviewSDK
|
|
27
27
|
|
28
28
|
# Creates the volume
|
29
29
|
# @note provisioning parameters are required for creation, but not afterwards; after creation, they will be removed.
|
30
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
30
31
|
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
31
32
|
# @raise [StandardError] if the resource creation fails
|
32
33
|
# @return [Resource] self
|
33
|
-
def create
|
34
|
-
|
35
|
-
response = @client.rest_post(self.class::BASE_URI, { 'body' => @data }, @api_version)
|
36
|
-
body = @client.response_handler(response)
|
37
|
-
set_all(body)
|
34
|
+
def create(header = {})
|
35
|
+
super(DEFAULT_REQUEST_HEADER.merge(header))
|
38
36
|
@data.delete('provisioningParameters')
|
39
37
|
self
|
40
38
|
end
|
41
39
|
|
40
|
+
# Delete the resource from OneView if it exists, then create it using the current data
|
41
|
+
# @note Calls refresh method to set additional data
|
42
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
43
|
+
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
44
|
+
# @raise [StandardError] if the resource creation fails
|
45
|
+
# @return [Resource] self
|
46
|
+
def create!(header = {})
|
47
|
+
temp = self.class.new(@client, @data)
|
48
|
+
header = DEFAULT_REQUEST_HEADER.merge(header)
|
49
|
+
temp.delete(:all, header) if temp.retrieve!(header)
|
50
|
+
create(header)
|
51
|
+
end
|
52
|
+
|
42
53
|
# Update resource attributes
|
43
54
|
# @param [Hash] attributes attributes to be updated
|
44
55
|
# @return [OneviewSDK::Volume] self
|
@@ -49,20 +60,13 @@ module OneviewSDK
|
|
49
60
|
|
50
61
|
# Deletes the resource from OneView or from Oneview and storage system
|
51
62
|
# @param [Symbol] flag Delete storage system from Oneview only or in storage system as well
|
63
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
52
64
|
# @return [true] if resource was deleted successfully
|
53
|
-
def delete(flag = :all)
|
65
|
+
def delete(flag = :all, header = {})
|
54
66
|
ensure_client && ensure_uri
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
@client.response_handler(response)
|
59
|
-
when :all
|
60
|
-
response = @client.rest_delete(@data['uri'], {}, @api_version)
|
61
|
-
@client.response_handler(response)
|
62
|
-
else
|
63
|
-
raise InvalidResource, 'Invalid flag value, use :oneview or :all'
|
64
|
-
end
|
65
|
-
true
|
67
|
+
raise InvalidResource, 'Invalid flag value, use :oneview or :all' unless %i[oneview all].include?(flag)
|
68
|
+
header = DEFAULT_REQUEST_HEADER.merge(header).merge('exportOnly' => true) if flag == :oneview
|
69
|
+
super(header)
|
66
70
|
end
|
67
71
|
|
68
72
|
# Sets the storage system to the volume
|
File without changes
|
File without changes
|
@@ -16,6 +16,7 @@ module OneviewSDK
|
|
16
16
|
# Volume template resource implementation
|
17
17
|
class VolumeTemplate < Resource
|
18
18
|
BASE_URI = '/rest/storage-volume-templates'.freeze
|
19
|
+
DEFAULT_REQUEST_HEADER = { 'Accept-Language' => 'en_US' }.freeze
|
19
20
|
|
20
21
|
# Create the client object, establishes connection, and set up the logging and api version.
|
21
22
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
@@ -33,23 +34,19 @@ module OneviewSDK
|
|
33
34
|
|
34
35
|
# Create the resource on OneView using the current data
|
35
36
|
# @note Calls refresh method to set additional data
|
37
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
36
38
|
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
37
39
|
# @raise [StandardError] if the resource creation fails
|
38
40
|
# @return [Resource] self
|
39
|
-
def create
|
40
|
-
|
41
|
-
response = @client.rest_post(self.class::BASE_URI, { 'Accept-Language' => 'en_US', 'body' => @data }, @api_version)
|
42
|
-
body = @client.response_handler(response)
|
43
|
-
set_all(body)
|
41
|
+
def create(header = {})
|
42
|
+
super(DEFAULT_REQUEST_HEADER.merge(header))
|
44
43
|
end
|
45
44
|
|
46
45
|
# Deletes the volume template from OneView
|
46
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
47
47
|
# @return [TrueClass] if the volume template was deleted successfully
|
48
|
-
def delete
|
49
|
-
|
50
|
-
response = @client.rest_delete(@data['uri'], { 'Accept-Language' => 'en_US' }, @api_version)
|
51
|
-
@client.response_handler(response)
|
52
|
-
true
|
48
|
+
def delete(header = {})
|
49
|
+
super(DEFAULT_REQUEST_HEADER.merge(header))
|
53
50
|
end
|
54
51
|
|
55
52
|
# Updates the volume template from OneView
|
File without changes
|
@@ -12,7 +12,7 @@
|
|
12
12
|
module OneviewSDK
|
13
13
|
# Module for API v300
|
14
14
|
module API300
|
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 '../../api200/login_detail'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API300
|
16
|
+
module C7000
|
17
|
+
# login details resource for API300 C7000
|
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
|
@@ -47,13 +47,11 @@ module OneviewSDK
|
|
47
47
|
end
|
48
48
|
|
49
49
|
# Delete resource from OneView
|
50
|
+
# @param [Hash] header The header options for the request (key-value pairs)
|
50
51
|
# @raise [OneviewSDK::IncompleteResource] if the client or uri is not set
|
51
52
|
# @return [true] if resource was deleted successfully
|
52
|
-
def delete
|
53
|
-
|
54
|
-
response = @client.rest_delete(@data['uri'], { 'If-Match' => @data['eTag'] }, @api_version)
|
55
|
-
@client.response_handler(response)
|
56
|
-
true
|
53
|
+
def delete(header = {})
|
54
|
+
super(DEFAULT_REQUEST_HEADER.merge(header).merge('If-Match' => @data['eTag']))
|
57
55
|
end
|
58
56
|
|
59
57
|
# Adds resource assignments
|
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 C7000
|
17
|
+
# Version resource implementation for API300 C7000
|
18
|
+
class Version < OneviewSDK::API200::Version
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|