oneview-sdk 4.5.1 → 5.0.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 +56 -0
- data/Gemfile +0 -0
- data/Guardfile +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/bin/oneview-sdk-ruby +0 -0
- data/lib/oneview-sdk.rb +0 -0
- data/lib/oneview-sdk/cli.rb +0 -0
- data/lib/oneview-sdk/client.rb +0 -0
- 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 +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300.rb +0 -0
- data/lib/oneview-sdk/image-streamer/resource/api300/artifact_bundle.rb +0 -0
- 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 +0 -0
- 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 +54 -23
- data/lib/oneview-sdk/resource/api200.rb +0 -0
- data/lib/oneview-sdk/resource/api200/client_certificate.rb +134 -0
- data/lib/oneview-sdk/resource/api200/connection_template.rb +2 -1
- data/lib/oneview-sdk/resource/api200/datacenter.rb +0 -0
- data/lib/oneview-sdk/resource/api200/enclosure.rb +5 -9
- data/lib/oneview-sdk/resource/api200/enclosure_group.rb +2 -1
- data/lib/oneview-sdk/resource/api200/ethernet_network.rb +2 -2
- 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 +2 -1
- data/lib/oneview-sdk/resource/api200/firmware_driver.rb +0 -0
- data/lib/oneview-sdk/resource/api200/id_pool.rb +5 -3
- data/lib/oneview-sdk/resource/api200/interconnect.rb +0 -0
- 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 +1 -1
- data/lib/oneview-sdk/resource/api200/logical_interconnect.rb +4 -3
- data/lib/oneview-sdk/resource/api200/logical_interconnect_group.rb +2 -2
- data/lib/oneview-sdk/resource/api200/logical_switch.rb +0 -0
- data/lib/oneview-sdk/resource/api200/logical_switch_group.rb +0 -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 +1 -1
- data/lib/oneview-sdk/resource/api200/rack.rb +0 -0
- 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 +2 -2
- data/lib/oneview-sdk/resource/api200/server_hardware_type.rb +0 -0
- data/lib/oneview-sdk/resource/api200/server_profile.rb +35 -25
- data/lib/oneview-sdk/resource/api200/server_profile_template.rb +24 -14
- data/lib/oneview-sdk/resource/api200/storage_pool.rb +0 -0
- data/lib/oneview-sdk/resource/api200/storage_system.rb +6 -10
- data/lib/oneview-sdk/resource/api200/switch.rb +4 -10
- 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 +18 -0
- data/lib/oneview-sdk/resource/api200/volume.rb +15 -11
- data/lib/oneview-sdk/resource/api200/volume_attachment.rb +3 -1
- data/lib/oneview-sdk/resource/api200/volume_snapshot.rb +0 -0
- data/lib/oneview-sdk/resource/api200/volume_template.rb +0 -0
- data/lib/oneview-sdk/resource/api200/web_server_certificate.rb +97 -0
- data/lib/oneview-sdk/resource/api300.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/client_certificate.rb +22 -0
- data/lib/oneview-sdk/resource/api300/c7000/connection_template.rb +0 -8
- 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 -1
- data/lib/oneview-sdk/resource/api300/c7000/ethernet_network.rb +1 -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 +1 -0
- data/lib/oneview-sdk/resource/api300/c7000/fcoe_network.rb +1 -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/{synergy/logical_switch.rb → c7000/internal_link_set.rb} +30 -7
- 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 +9 -7
- data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect.rb +2 -20
- data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect_group.rb +2 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_switch.rb +0 -19
- data/lib/oneview-sdk/resource/api300/c7000/logical_switch_group.rb +1 -0
- data/lib/oneview-sdk/resource/api300/c7000/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api300/c7000/network_set.rb +1 -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 +0 -0
- 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/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 +22 -0
- data/lib/oneview-sdk/resource/api300/synergy.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/client_certificate.rb +22 -0
- data/lib/oneview-sdk/resource/api300/synergy/connection_template.rb +0 -8
- 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 +2 -2
- data/lib/oneview-sdk/resource/api300/synergy/enclosure_group.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/ethernet_network.rb +1 -0
- data/lib/oneview-sdk/resource/api300/synergy/event.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/fabric.rb +1 -1
- data/lib/oneview-sdk/resource/api300/synergy/fc_network.rb +1 -0
- data/lib/oneview-sdk/resource/api300/synergy/fcoe_network.rb +3 -15
- 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 +22 -0
- data/lib/oneview-sdk/resource/api300/synergy/lig_uplink_set.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/logical_downlink.rb +2 -14
- data/lib/oneview-sdk/resource/api300/synergy/logical_enclosure.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect.rb +0 -20
- data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect_group.rb +3 -1
- data/lib/oneview-sdk/resource/api300/synergy/managed_san.rb +0 -0
- data/lib/oneview-sdk/resource/api300/synergy/network_set.rb +2 -17
- 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 +24 -27
- data/lib/oneview-sdk/resource/api300/synergy/server_profile_template.rb +0 -12
- 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/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 +22 -0
- data/lib/oneview-sdk/resource/api500.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/client_certificate.rb +22 -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 +35 -0
- data/lib/oneview-sdk/resource/api500/c7000/enclosure_group.rb +21 -0
- data/lib/oneview-sdk/resource/api500/c7000/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/event.rb +2 -2
- data/lib/oneview-sdk/resource/api500/c7000/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api500/c7000/fc_network.rb +1 -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 +22 -0
- data/lib/oneview-sdk/resource/api500/c7000/interconnect.rb +8 -0
- data/lib/oneview-sdk/resource/api500/c7000/internal_link_set.rb +22 -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 +40 -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/managed_san.rb +10 -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 +49 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_hardware.rb +20 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_hardware_type.rb +1 -0
- data/lib/oneview-sdk/resource/api500/c7000/server_profile.rb +60 -1
- data/lib/oneview-sdk/resource/api500/c7000/server_profile_template.rb +86 -0
- data/lib/oneview-sdk/resource/api500/c7000/storage_pool.rb +57 -2
- data/lib/oneview-sdk/resource/api500/c7000/storage_system.rb +132 -0
- data/lib/oneview-sdk/resource/api500/c7000/switch.rb +7 -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/volume.rb +135 -0
- data/lib/oneview-sdk/resource/api500/c7000/volume_attachment.rb +24 -1
- data/lib/oneview-sdk/resource/api500/c7000/volume_snapshot.rb +10 -0
- data/lib/oneview-sdk/resource/api500/c7000/volume_template.rb +94 -3
- data/lib/oneview-sdk/resource/api500/c7000/web_server_certificate.rb +22 -0
- data/lib/oneview-sdk/resource/api500/synergy.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/client_certificate.rb +22 -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 +35 -0
- data/lib/oneview-sdk/resource/api500/synergy/enclosure_group.rb +27 -0
- data/lib/oneview-sdk/resource/api500/synergy/ethernet_network.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/event.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/fabric.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/fc_network.rb +1 -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/{logical_switch.rb → id_pool.rb} +3 -3
- data/lib/oneview-sdk/resource/api500/synergy/interconnect.rb +17 -1
- data/lib/oneview-sdk/resource/api500/synergy/internal_link_set.rb +22 -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 +17 -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/managed_san.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/network_set.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/os_deployment_plan.rb +22 -0
- data/lib/oneview-sdk/resource/api500/synergy/power_device.rb +1 -1
- 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 +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/server_hardware.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/server_hardware_type.rb +0 -0
- data/lib/oneview-sdk/resource/api500/synergy/server_profile.rb +4 -1
- data/lib/oneview-sdk/resource/api500/synergy/server_profile_template.rb +16 -2
- data/lib/oneview-sdk/resource/api500/synergy/storage_pool.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/storage_system.rb +1 -1
- 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/volume.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/volume_attachment.rb +3 -3
- data/lib/oneview-sdk/resource/api500/synergy/volume_snapshot.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/volume_template.rb +2 -2
- data/lib/oneview-sdk/resource/api500/synergy/web_server_certificate.rb +22 -0
- data/lib/oneview-sdk/resource_helper.rb +30 -0
- data/lib/oneview-sdk/rest.rb +6 -2
- data/lib/oneview-sdk/scmb.rb +0 -0
- data/lib/oneview-sdk/ssl_helper.rb +0 -0
- data/lib/oneview-sdk/version.rb +1 -1
- data/oneview-sdk.gemspec +0 -0
- metadata +21 -5
File without changes
|
@@ -96,7 +96,7 @@ module OneviewSDK
|
|
96
96
|
# @param [Hash, Resource] other resource or hash to compare the key-value pairs with
|
97
97
|
# @example Compare to hash
|
98
98
|
# @note Does not check the password in credentials
|
99
|
-
# @example myResource.like?(credentials: {
|
99
|
+
# @example myResource.like?(credentials: { username: 'admin', password: 'secret' })
|
100
100
|
# myResource = OneviewSDK::Resource.new(client, { name: 'res1', description: 'example'}, 200)
|
101
101
|
# myResource.like?(description: '') # returns false
|
102
102
|
# myResource.like?(name: 'res1') # returns true
|
@@ -125,25 +125,21 @@ module OneviewSDK
|
|
125
125
|
# @return [String] response body
|
126
126
|
def self.get_host_types(client)
|
127
127
|
response = client.rest_get(BASE_URI + '/host-types')
|
128
|
-
response
|
128
|
+
client.response_handler(response)
|
129
129
|
end
|
130
130
|
|
131
131
|
# Lists the storage pools
|
132
132
|
def get_storage_pools
|
133
|
-
|
134
|
-
response.body
|
133
|
+
self.class.find_with_pagination(@client, @data['uri'] + '/storage-pools')
|
135
134
|
end
|
136
135
|
|
137
136
|
# Lists all managed target ports for the specified storage system,
|
138
137
|
# or only the one specified
|
139
138
|
# @param [String] port Target port
|
140
139
|
def get_managed_ports(port = nil)
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
@client.rest_get("#{@data['uri']}/managedPorts/#{port}")
|
145
|
-
end
|
146
|
-
response.body
|
140
|
+
uri = @data['uri']
|
141
|
+
uri += port.nil? ? '/managedPorts' : "/managedPorts/#{port}"
|
142
|
+
self.class.find_with_pagination(@client, uri)
|
147
143
|
end
|
148
144
|
|
149
145
|
# Refreshes a storage system
|
@@ -65,17 +65,11 @@ module OneviewSDK
|
|
65
65
|
results.find { |switch_type| switch_type['name'] == name }
|
66
66
|
end
|
67
67
|
|
68
|
-
# Get statistics for
|
68
|
+
# Get statistics for a switch or for the specified port.
|
69
69
|
# @param [String] port_name port to retrieve statistics
|
70
|
-
# @param [String] subport_number subport to retrieve statistics
|
71
70
|
# @return [Hash] Switch statistics
|
72
|
-
def statistics(port_name = nil
|
73
|
-
|
74
|
-
"#{@data['uri']}/statistics/#{port_name}/subport/#{subport_number}"
|
75
|
-
else
|
76
|
-
"#{@data['uri']}/statistics/#{port_name}"
|
77
|
-
end
|
78
|
-
response = @client.rest_get(uri)
|
71
|
+
def statistics(port_name = nil)
|
72
|
+
response = @client.rest_get("#{@data['uri']}/statistics/#{port_name}")
|
79
73
|
response.body
|
80
74
|
end
|
81
75
|
|
@@ -83,7 +77,7 @@ module OneviewSDK
|
|
83
77
|
# @return [Hash] Configuration parameters
|
84
78
|
def environmental_configuration
|
85
79
|
ensure_client && ensure_uri
|
86
|
-
response = @client.rest_get(@data['uri'] + '/environmentalConfiguration', @api_version)
|
80
|
+
response = @client.rest_get(@data['uri'] + '/environmentalConfiguration', {}, @api_version)
|
87
81
|
@client.response_handler(response)
|
88
82
|
end
|
89
83
|
end
|
File without changes
|
File without changes
|
@@ -74,6 +74,24 @@ module OneviewSDK
|
|
74
74
|
set('roles', new_roles)
|
75
75
|
self
|
76
76
|
end
|
77
|
+
|
78
|
+
# Validates the existence of a user with the given user name in the appliance.
|
79
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
80
|
+
# @param [String] user_name The user name to validate
|
81
|
+
# @return [Boolean] return true if the user already exists
|
82
|
+
def self.validate_user_name(client, user_name)
|
83
|
+
response = client.rest_post("#{BASE_URI}/validateLoginName/#{user_name}")
|
84
|
+
client.response_handler(response)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks for the existence of a user with the specified full name in the appliance.
|
88
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
89
|
+
# @param [String] full_name The full name to validate
|
90
|
+
# @return [Boolean] return true if the user already exists
|
91
|
+
def self.validate_full_name(client, full_name)
|
92
|
+
response = client.rest_post("#{BASE_URI}/validateUserName/#{full_name}")
|
93
|
+
client.response_handler(response)
|
94
|
+
end
|
77
95
|
end
|
78
96
|
end
|
79
97
|
end
|
@@ -46,10 +46,10 @@ module OneviewSDK
|
|
46
46
|
ensure_client && ensure_uri
|
47
47
|
case flag
|
48
48
|
when :oneview
|
49
|
-
response = @client.
|
49
|
+
response = @client.rest_delete(@data['uri'], { 'exportOnly' => true }, @api_version)
|
50
50
|
@client.response_handler(response)
|
51
51
|
when :all
|
52
|
-
response = @client.
|
52
|
+
response = @client.rest_delete(@data['uri'], {}, @api_version)
|
53
53
|
@client.response_handler(response)
|
54
54
|
else
|
55
55
|
raise InvalidResource, 'Invalid flag value, use :oneview or :all'
|
@@ -98,11 +98,7 @@ module OneviewSDK
|
|
98
98
|
else
|
99
99
|
name = snapshot
|
100
100
|
end
|
101
|
-
data =
|
102
|
-
type: 'Snapshot',
|
103
|
-
description: description,
|
104
|
-
name: name
|
105
|
-
}
|
101
|
+
data = generate_snapshot_data(name, description)
|
106
102
|
response = @client.rest_post("#{@data['uri']}/snapshots", { 'body' => data }, @api_version)
|
107
103
|
@client.response_handler(response)
|
108
104
|
true
|
@@ -113,7 +109,7 @@ module OneviewSDK
|
|
113
109
|
# @return [true] if snapshot was created successfully
|
114
110
|
def delete_snapshot(name)
|
115
111
|
result = get_snapshot(name)
|
116
|
-
response = @client.
|
112
|
+
response = @client.rest_delete(result['uri'], { 'If-Match' => @data['eTag'] }, @api_version)
|
117
113
|
@client.response_handler(response)
|
118
114
|
true
|
119
115
|
end
|
@@ -123,9 +119,7 @@ module OneviewSDK
|
|
123
119
|
# @return [Hash] snapshot data
|
124
120
|
def get_snapshot(name)
|
125
121
|
results = get_snapshots
|
126
|
-
results.
|
127
|
-
return snapshot if snapshot['name'] == name
|
128
|
-
end
|
122
|
+
results.find { |snap| snap['name'] == name }
|
129
123
|
end
|
130
124
|
|
131
125
|
# Gets all the snapshots of this volume
|
@@ -163,10 +157,20 @@ module OneviewSDK
|
|
163
157
|
|
164
158
|
# Verify if the resource has a URI
|
165
159
|
# If not, first it tries to retrieve, and then verify for its existence
|
160
|
+
# @param [OneviewSDK::Resource] resource The resource object
|
161
|
+
# @raise [OneviewSDK::IncompleteResource] if the resource not found
|
166
162
|
def assure_uri(resource)
|
167
163
|
resource.retrieve! unless resource['uri']
|
168
164
|
raise IncompleteResource, "#{resource.class}: #{resource['name']} not found" unless resource['uri']
|
169
165
|
end
|
166
|
+
|
167
|
+
# Generates the snapshot data
|
168
|
+
# @param [String] name The name of the snapshot
|
169
|
+
# @param [String] description The description of the snapshot
|
170
|
+
# @return [Hash] snapshot data
|
171
|
+
def generate_snapshot_data(name, description = nil)
|
172
|
+
{ type: 'Snapshot', description: description, name: name }
|
173
|
+
end
|
170
174
|
end
|
171
175
|
end
|
172
176
|
end
|
@@ -47,9 +47,11 @@ module OneviewSDK
|
|
47
47
|
|
48
48
|
# Gets the list of extra unmanaged storage volumes
|
49
49
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
50
|
+
# @return [Array] Array of extra unmanaged storage volumes
|
50
51
|
def self.get_extra_unmanaged_volumes(client)
|
51
52
|
response = client.rest_get(BASE_URI + '/repair?alertFixType=ExtraUnmanagedStorageVolumes')
|
52
|
-
client.response_handler(response)
|
53
|
+
body = client.response_handler(response)
|
54
|
+
body['members'].map { |data| new(client, data) }
|
53
55
|
end
|
54
56
|
|
55
57
|
# Removes extra presentations from a specific server profile
|
File without changes
|
File without changes
|
@@ -0,0 +1,97 @@
|
|
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 'resource'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API200
|
16
|
+
# Web Server Certificate certificate resource implementation
|
17
|
+
class WebServerCertificate < Resource
|
18
|
+
BASE_URI = '/rest/certificates/https'.freeze
|
19
|
+
|
20
|
+
# Method is not available
|
21
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
22
|
+
def update(*)
|
23
|
+
unavailable_method
|
24
|
+
end
|
25
|
+
|
26
|
+
# Method is not available
|
27
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
28
|
+
def delete(*)
|
29
|
+
unavailable_method
|
30
|
+
end
|
31
|
+
|
32
|
+
# Method is not available
|
33
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
34
|
+
def create!(*)
|
35
|
+
unavailable_method
|
36
|
+
end
|
37
|
+
|
38
|
+
# Retrieves the existing SSL certificate information
|
39
|
+
# @return [Boolean] Whether or not retrieve was successful
|
40
|
+
def retrieve!
|
41
|
+
response = @client.rest_get(self.class::BASE_URI)
|
42
|
+
body = @client.response_handler(response)
|
43
|
+
set_all(body)
|
44
|
+
true
|
45
|
+
end
|
46
|
+
|
47
|
+
# Retrieves the existing SSL certificate information
|
48
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
49
|
+
# @param [String] address The hostname or IP address
|
50
|
+
# @param [Hash] options The header options of request (key-value pairs)
|
51
|
+
# @option options [String] :requestername Used to identify requester to allow querying of proper trust store.
|
52
|
+
# Default value is "DEFAULT". List of valid input values are { "DEFAULT", "AUTHN", "RABBITMQ", "ILOOA" }.
|
53
|
+
# @option options [String] :Accept-Language The language code requested in the response.
|
54
|
+
# If a suitable match to the requested language is not available, en-US or the appliance locale is used.
|
55
|
+
# @return [Boolean] Whether or not retrieve was successful
|
56
|
+
# @return [WebServerCertificate] the resource
|
57
|
+
def self.get_certificate(client, address, options = { 'requestername' => 'DEFAULT' })
|
58
|
+
response = client.rest_api(:get, self::BASE_URI + "/remote/#{address}", options)
|
59
|
+
body = client.response_handler(response)
|
60
|
+
new(client, body)
|
61
|
+
end
|
62
|
+
|
63
|
+
# Imports a signed server certificate into the appliance
|
64
|
+
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
65
|
+
# @return [Resource] self
|
66
|
+
def import
|
67
|
+
ensure_client
|
68
|
+
response = @client.rest_put(self.class::BASE_URI + '/certificaterequest', { 'body' => @data }, @api_version)
|
69
|
+
body = @client.response_handler(response)
|
70
|
+
set_all(body)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Creates a Certificate Signing Request (CSR) using input certificate data and returns the newly-created CSR.
|
74
|
+
# @note Calls the refresh method to set additional data
|
75
|
+
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
76
|
+
# @raise [StandardError] if the resource creation fails
|
77
|
+
# @return [Resource] self
|
78
|
+
def create
|
79
|
+
ensure_client
|
80
|
+
response = @client.rest_post(self.class::BASE_URI + '/certificaterequest', { 'body' => @data }, @api_version)
|
81
|
+
body = @client.response_handler(response)
|
82
|
+
set_all(body)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Creates a new self-signed appliance certificate based on the certificate data provided.
|
86
|
+
# @raise [OneviewSDK::IncompleteResource] if the client is not set
|
87
|
+
# @raise [StandardError] if the resource creation fails
|
88
|
+
# @return [Resource] self
|
89
|
+
def create_self_signed
|
90
|
+
ensure_client
|
91
|
+
response = @client.rest_put(self.class::BASE_URI, { 'body' => @data }, @api_version)
|
92
|
+
body = @client.response_handler(response)
|
93
|
+
set_all(body)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
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/client_certificate'
|
13
|
+
|
14
|
+
module OneviewSDK
|
15
|
+
module API300
|
16
|
+
module C7000
|
17
|
+
# Client certificate resource implementation for API300 C7000
|
18
|
+
class ClientCertificate < OneviewSDK::API200::ClientCertificate
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -16,14 +16,6 @@ module OneviewSDK
|
|
16
16
|
module C7000
|
17
17
|
# Connection template resource implementation for API300 C7000
|
18
18
|
class ConnectionTemplate < OneviewSDK::API200::ConnectionTemplate
|
19
|
-
|
20
|
-
# Get the default network connection template
|
21
|
-
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
22
|
-
# @return [OneviewSDK::API300::C7000::ConnectionTemplate] Connection template
|
23
|
-
def self.get_default(client)
|
24
|
-
response = client.rest_get(BASE_URI + '/defaultConnectionTemplate')
|
25
|
-
OneviewSDK::API300::C7000::ConnectionTemplate.new(client, client.response_handler(response))
|
26
|
-
end
|
27
19
|
end
|
28
20
|
end
|
29
21
|
end
|
File without changes
|
File without changes
|
@@ -16,6 +16,7 @@ module OneviewSDK
|
|
16
16
|
module C7000
|
17
17
|
# Ethernet network resource implementation for API300 C7000
|
18
18
|
class EthernetNetwork < OneviewSDK::API200::EthernetNetwork
|
19
|
+
include OneviewSDK::API300::C7000::Scope::ScopeHelperMethods
|
19
20
|
|
20
21
|
# Create a resource object, associate it with a client, and set its properties.
|
21
22
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
File without changes
|
File without changes
|
@@ -16,6 +16,7 @@ module OneviewSDK
|
|
16
16
|
module C7000
|
17
17
|
# FC network resource implementation for API300 C7000
|
18
18
|
class FCNetwork < OneviewSDK::API200::FCNetwork
|
19
|
+
include OneviewSDK::API300::C7000::Scope::ScopeHelperMethods
|
19
20
|
|
20
21
|
# Create a resource object, associate it with a client, and set its properties.
|
21
22
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
@@ -16,6 +16,7 @@ module OneviewSDK
|
|
16
16
|
module C7000
|
17
17
|
# FCoE network resource implementation for API300 C7000
|
18
18
|
class FCoENetwork < OneviewSDK::API200::FCoENetwork
|
19
|
+
include OneviewSDK::API300::C7000::Scope::ScopeHelperMethods
|
19
20
|
|
20
21
|
# Create a resource object, associate it with a client, and set its properties.
|
21
22
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/oneview-sdk/resource/api300/{synergy/logical_switch.rb → c7000/internal_link_set.rb}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
# (C) Copyright
|
1
|
+
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# You may not use this file except in compliance with the License.
|
@@ -9,17 +9,39 @@
|
|
9
9
|
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
10
10
|
# language governing permissions and limitations under the License.
|
11
11
|
|
12
|
-
require_relative '
|
12
|
+
require_relative 'resource'
|
13
13
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
|
-
module
|
17
|
-
#
|
18
|
-
class
|
16
|
+
module C7000
|
17
|
+
# Internal Link Set resource implementation for API300 C7000
|
18
|
+
class InternalLinkSet < Resource
|
19
|
+
BASE_URI = '/rest/internal-link-sets'.freeze
|
20
|
+
|
21
|
+
# Method is unavailable
|
22
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
23
|
+
def create(*)
|
24
|
+
unavailable_method
|
25
|
+
end
|
26
|
+
|
27
|
+
# Method is unavailable
|
28
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
29
|
+
def delete(*)
|
30
|
+
unavailable_method
|
31
|
+
end
|
32
|
+
|
33
|
+
# Method is unavailable
|
34
|
+
# @raise [OneviewSDK::MethodUnavailable] method is not available
|
35
|
+
def update(*)
|
36
|
+
unavailable_method
|
37
|
+
end
|
38
|
+
|
19
39
|
# Retrieves all internal link sets
|
20
40
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
21
41
|
def self.get_internal_link_sets(client)
|
22
|
-
|
42
|
+
response = client.rest_get(BASE_URI)
|
43
|
+
response = client.response_handler(response)
|
44
|
+
response['members']
|
23
45
|
end
|
24
46
|
|
25
47
|
# Retrieves the internal link set with name
|
@@ -27,7 +49,8 @@ module OneviewSDK
|
|
27
49
|
# @param [String] name The internal link set name
|
28
50
|
# @return [Array] Internal Link Set Array
|
29
51
|
def self.get_internal_link_set(client, name)
|
30
|
-
|
52
|
+
results = get_internal_link_sets(client)
|
53
|
+
results.find { |internal_link_set| internal_link_set['name'] == name }
|
31
54
|
end
|
32
55
|
end
|
33
56
|
end
|