oneview-sdk 5.15.0 → 5.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +18 -13
  4. data/endpoints-support.md +257 -257
  5. data/lib/oneview-sdk.rb +1 -1
  6. data/lib/oneview-sdk/client.rb +3 -2
  7. data/lib/oneview-sdk/resource.rb +1 -1
  8. data/lib/oneview-sdk/resource/api2000.rb +66 -0
  9. data/lib/oneview-sdk/resource/api2000/c7000.rb +27 -0
  10. data/lib/oneview-sdk/resource/api2000/c7000/connection_template.rb +22 -0
  11. data/lib/oneview-sdk/resource/api2000/c7000/enclosure.rb +22 -0
  12. data/lib/oneview-sdk/resource/api2000/c7000/enclosure_group.rb +22 -0
  13. data/lib/oneview-sdk/resource/api2000/c7000/ethernet_network.rb +22 -0
  14. data/lib/oneview-sdk/resource/api2000/c7000/fc_network.rb +22 -0
  15. data/lib/oneview-sdk/resource/api2000/c7000/fcoe_network.rb +22 -0
  16. data/lib/oneview-sdk/resource/api2000/c7000/firmware_driver.rb +22 -0
  17. data/lib/oneview-sdk/resource/api2000/c7000/hypervisor_cluster_profile.rb +22 -0
  18. data/lib/oneview-sdk/resource/api2000/c7000/hypervisor_manager.rb +22 -0
  19. data/lib/oneview-sdk/resource/api2000/c7000/interconnect.rb +26 -0
  20. data/lib/oneview-sdk/resource/api2000/c7000/lig_uplink_set.rb +21 -0
  21. data/lib/oneview-sdk/resource/api2000/c7000/logical_enclosure.rb +22 -0
  22. data/lib/oneview-sdk/resource/api2000/c7000/logical_interconnect.rb +33 -0
  23. data/lib/oneview-sdk/resource/api2000/c7000/logical_interconnect_group.rb +25 -0
  24. data/lib/oneview-sdk/resource/api2000/c7000/network_set.rb +22 -0
  25. data/lib/oneview-sdk/resource/api2000/c7000/scope.rb +22 -0
  26. data/lib/oneview-sdk/resource/api2000/c7000/server_certificate.rb +22 -0
  27. data/lib/oneview-sdk/resource/api2000/c7000/server_hardware.rb +22 -0
  28. data/lib/oneview-sdk/resource/api2000/c7000/server_hardware_type.rb +25 -0
  29. data/lib/oneview-sdk/resource/api2000/c7000/server_profile.rb +22 -0
  30. data/lib/oneview-sdk/resource/api2000/c7000/server_profile_template.rb +22 -0
  31. data/lib/oneview-sdk/resource/api2000/c7000/storage_pool.rb +22 -0
  32. data/lib/oneview-sdk/resource/api2000/c7000/storage_system.rb +22 -0
  33. data/lib/oneview-sdk/resource/api2000/c7000/uplink_set.rb +22 -0
  34. data/lib/oneview-sdk/resource/api2000/c7000/volume.rb +22 -0
  35. data/lib/oneview-sdk/resource/api2000/c7000/volume_attachment.rb +22 -0
  36. data/lib/oneview-sdk/resource/api2000/c7000/volume_template.rb +22 -0
  37. data/lib/oneview-sdk/resource/api2000/synergy.rb +27 -0
  38. data/lib/oneview-sdk/resource/api2000/synergy/connection_template.rb +22 -0
  39. data/lib/oneview-sdk/resource/api2000/synergy/enclosure.rb +22 -0
  40. data/lib/oneview-sdk/resource/api2000/synergy/enclosure_group.rb +22 -0
  41. data/lib/oneview-sdk/resource/api2000/synergy/ethernet_network.rb +22 -0
  42. data/lib/oneview-sdk/resource/api2000/synergy/fc_network.rb +22 -0
  43. data/lib/oneview-sdk/resource/api2000/synergy/fcoe_network.rb +22 -0
  44. data/lib/oneview-sdk/resource/api2000/synergy/firmware_driver.rb +22 -0
  45. data/lib/oneview-sdk/resource/api2000/synergy/hypervisor_cluster_profile.rb +22 -0
  46. data/lib/oneview-sdk/resource/api2000/synergy/hypervisor_manager.rb +22 -0
  47. data/lib/oneview-sdk/resource/api2000/synergy/interconnect.rb +25 -0
  48. data/lib/oneview-sdk/resource/api2000/synergy/lig_uplink_set.rb +21 -0
  49. data/lib/oneview-sdk/resource/api2000/synergy/logical_enclosure.rb +22 -0
  50. data/lib/oneview-sdk/resource/api2000/synergy/logical_interconnect.rb +22 -0
  51. data/lib/oneview-sdk/resource/api2000/synergy/logical_interconnect_group.rb +25 -0
  52. data/lib/oneview-sdk/resource/api2000/synergy/network_set.rb +22 -0
  53. data/lib/oneview-sdk/resource/api2000/synergy/os_deployment_plan.rb +22 -0
  54. data/lib/oneview-sdk/resource/api2000/synergy/scope.rb +22 -0
  55. data/lib/oneview-sdk/resource/api2000/synergy/server_certificate.rb +22 -0
  56. data/lib/oneview-sdk/resource/api2000/synergy/server_hardware.rb +22 -0
  57. data/lib/oneview-sdk/resource/api2000/synergy/server_hardware_type.rb +22 -0
  58. data/lib/oneview-sdk/resource/api2000/synergy/server_profile.rb +25 -0
  59. data/lib/oneview-sdk/resource/api2000/synergy/server_profile_template.rb +22 -0
  60. data/lib/oneview-sdk/resource/api2000/synergy/storage_pool.rb +22 -0
  61. data/lib/oneview-sdk/resource/api2000/synergy/storage_system.rb +22 -0
  62. data/lib/oneview-sdk/resource/api2000/synergy/uplink_set.rb +22 -0
  63. data/lib/oneview-sdk/resource/api2000/synergy/volume.rb +22 -0
  64. data/lib/oneview-sdk/resource/api2000/synergy/volume_attachment.rb +22 -0
  65. data/lib/oneview-sdk/resource/api2000/synergy/volume_template.rb +22 -0
  66. data/lib/oneview-sdk/version.rb +1 -1
  67. metadata +60 -2
@@ -26,7 +26,7 @@ module OneviewSDK
26
26
  env_i3s = %w[I3S_URL I3S_SSL_ENABLED]
27
27
  ENV_VARS = env_sdk.concat(env_i3s).freeze
28
28
 
29
- SUPPORTED_API_VERSIONS = [200, 300, 500, 600, 800, 1000, 1200, 1600, 1800].freeze
29
+ SUPPORTED_API_VERSIONS = [200, 300, 500, 600, 800, 1000, 1200, 1600, 1800, 2000].freeze
30
30
  DEFAULT_API_VERSION = 200
31
31
  @api_version = DEFAULT_API_VERSION
32
32
  @api_version_updated = false # Whether or not the API version has been set by the user
@@ -35,7 +35,7 @@ module OneviewSDK
35
35
  # @option options [String] :domain ('LOCAL') The name of the domain directory used for authentication
36
36
  # @option options [String] :token (ENV['ONEVIEWSDK_TOKEN']) The token to use for authentication with OneView appliance
37
37
  # Use the token or the username and password (not both). The token has precedence.
38
- # @option options [Integer] :api_version (200) This is the API version to use by default for requests
38
+ # @option options [Integer] :api_version (1800) Appliance's max API version to be used by default for requests
39
39
  # @option options [Boolean] :ssl_enabled (true) Use ssl for requests? Respects ENV['ONEVIEWSDK_SSL_ENABLED']
40
40
  # @option options [Integer] :timeout (nil) Override the default request timeout value
41
41
  def initialize(options = {})
@@ -51,7 +51,7 @@ module OneviewSDK
51
51
  if options[:api_version] && options[:api_version].to_i > @max_api_version
52
52
  logger.warn "API version #{options[:api_version]} is greater than the appliance API version (#{@max_api_version})"
53
53
  end
54
- @api_version = options[:api_version] || [OneviewSDK::DEFAULT_API_VERSION, @max_api_version].min
54
+ @api_version = options[:api_version] || @max_api_version
55
55
  # Set the default OneviewSDK module API version
56
56
  OneviewSDK.api_version = @api_version unless OneviewSDK.api_version_updated? || !OneviewSDK::SUPPORTED_API_VERSIONS.include?(@api_version)
57
57
  @ssl_enabled = true
@@ -63,6 +63,7 @@ module OneviewSDK
63
63
  end
64
64
  end
65
65
  @ssl_enabled = options[:ssl_enabled] unless options[:ssl_enabled].nil?
66
+ @variant = options[:variant] || ENV['ONEVIEWSDK_VARIANT']
66
67
  @timeout = options[:timeout] unless options[:timeout].nil?
67
68
  @cert_store = OneviewSDK::SSLHelper.load_trusted_certs if @ssl_enabled
68
69
  @token = options[:token] || ENV['ONEVIEWSDK_TOKEN']
@@ -30,7 +30,7 @@ module OneviewSDK
30
30
  # @param [OneviewSDK::Client] client The client object for the OneView appliance
31
31
  # @param [Hash] params The options for this resource (key-value pairs)
32
32
  # @param [Integer] api_ver The api version to use when interracting with this resource.
33
- # Defaults to the client.api_version if it exists, or the OneviewSDK::Client::DEFAULT_API_VERSION.
33
+ # Defaults to the client.api_version if it exists, or Appliance's max API version to be used by default for requests
34
34
  def initialize(client, params = {}, api_ver = nil)
35
35
  raise InvalidClient, 'Must specify a valid client'\
36
36
  unless client.is_a?(OneviewSDK::Client) || client.is_a?(OneviewSDK::ImageStreamer::Client)
@@ -0,0 +1,66 @@
1
+ # (c) Copyright 2020 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 for API v2000
14
+ module API2000
15
+ SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze
16
+ DEFAULT_VARIANT = 'C7000'.freeze
17
+ @variant = DEFAULT_VARIANT
18
+ @variant_updated = false # Whether or not the API variant has been set by the user
19
+
20
+ # Get resource class that matches the type given
21
+ # @param [String] type Name of the desired class type
22
+ # @param [String] variant Variant (C7000 or Synergy)
23
+ # @return [Class] Resource class or nil if not found
24
+ def self.resource_named(type, variant = @variant)
25
+ raise "API2000 variant '#{variant}' is not supported! Try one of #{SUPPORTED_VARIANTS}" unless SUPPORTED_VARIANTS.include?(variant.to_s)
26
+ new_type = type.to_s.downcase.gsub(/[ -_]/, '')
27
+ api_module = OneviewSDK::API2000.const_get(variant)
28
+ api_module.constants.each do |c|
29
+ klass = api_module.const_get(c)
30
+ next unless klass.is_a?(Class)
31
+ name = klass.name.split('::').last.downcase.delete('_').delete('-')
32
+ return klass if new_type =~ /^#{name}[s]?$/
33
+ end
34
+ nil
35
+ end
36
+
37
+ # Get the current API2000 variant
38
+ def self.variant
39
+ @variant
40
+ end
41
+
42
+ # Has the API2000 variant been set by the user?
43
+ # @return [TrueClass, FalseClass]
44
+ def self.variant_updated?
45
+ @variant_updated
46
+ end
47
+
48
+ # Sets the API2000 variant
49
+ def self.variant=(variant)
50
+ raise "API2000 variant '#{variant}' is not supported! Try one of #{SUPPORTED_VARIANTS}" unless SUPPORTED_VARIANTS.include?(variant)
51
+ @variant_updated = true
52
+ @variant = variant
53
+ end
54
+
55
+ # Helps redirect resources to the correct API2000 variant
56
+ def self.const_missing(const)
57
+ api2000_module = OneviewSDK::API2000.const_get(@variant.to_s)
58
+ api2000_module.const_get(const)
59
+ rescue NameError
60
+ raise NameError, "The #{const} method or resource does not exist for OneView API2000 variant #{@variant}."
61
+ end
62
+ end
63
+ end
64
+
65
+ # Load all API2000-specific resources:
66
+ Dir[File.dirname(__FILE__) + '/api2000/*.rb'].each { |file| require file }
@@ -0,0 +1,27 @@
1
+ # (c) Copyright 2020 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 API2000
14
+ # Module for API2000 C7000
15
+ module C7000
16
+ # Get resource class that matches the type given
17
+ # @param [String] type Name of the desired class type
18
+ # @return [Class] Resource class or nil if not found
19
+ def self.resource_named(type)
20
+ OneviewSDK::API2000.resource_named(type, 'C7000')
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ # Load all API-specific resources:
27
+ Dir[File.dirname(__FILE__) + '/c7000/*.rb'].each { |file| require file }
@@ -0,0 +1,22 @@
1
+ # (c) Copyright 2020 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 '../../api1800/c7000/connection_template'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Connection template resource implementation for API2000 C7000
18
+ class ConnectionTemplate < OneviewSDK::API1800::C7000::ConnectionTemplate
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (c) Copyright 2020 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 '../../api1800/c7000/enclosure'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Enclosure resource implementation for API2000 C7000
18
+ class Enclosure < OneviewSDK::API1800::C7000::Enclosure
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/enclosure_group'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Enclosure group resource implementation on API2000 C7000
18
+ class EnclosureGroup < OneviewSDK::API1800::C7000::EnclosureGroup
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/ethernet_network'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Ethernet network resource implementation for API2000 C7000
18
+ class EthernetNetwork < OneviewSDK::API1800::C7000::EthernetNetwork
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/fc_network'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # FC network resource implementation for API2000 C7000
18
+ class FCNetwork < OneviewSDK::API1800::C7000::FCNetwork
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/fcoe_network'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # FCoE network resource implementation for API2000 C7000
18
+ class FCoENetwork < OneviewSDK::API1800::C7000::FCoENetwork
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/firmware_driver'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # FirmwareDriver resource implementation for API2000 C7000
18
+ class FirmwareDriver < OneviewSDK::API1800::C7000::FirmwareDriver
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (c) Copyright 2020 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 '../../api1800/c7000/hypervisor_cluster_profile'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Hypervisor cluster profile resource implementation for API2000 C7000
18
+ class HypervisorClusterProfile < OneviewSDK::API1800::C7000::HypervisorClusterProfile
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/hypervisor_manager'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Hypervisor Manager resource implementation for API2000 C7000
18
+ class HypervisorManager < OneviewSDK::API1800::C7000::HypervisorManager
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,26 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/interconnect'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Interconnect resource implementation on API2000 C7000
18
+ class Interconnect < OneviewSDK::API1800::C7000::Interconnect
19
+ include OneviewSDK::ResourceHelper::ConfigurationOperation
20
+ def self.api_version
21
+ 2000
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,21 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/lig_uplink_set'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ class LIGUplinkSet < OneviewSDK::API1800::C7000::LIGUplinkSet
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,22 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/logical_enclosure'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Logical Enclosure resource implementation on API2000 C7000
18
+ class LogicalEnclosure < OneviewSDK::API1800::C7000::LogicalEnclosure
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,33 @@
1
+ # (C) Copyright 2020 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 '../../api1800/c7000/logical_interconnect'
13
+
14
+ module OneviewSDK
15
+ module API2000
16
+ module C7000
17
+ # Logical interconnect resource implementation for API2000 C7000
18
+ class LogicalInterconnect < OneviewSDK::API1800::C7000::LogicalInterconnect
19
+ # Validates the bulk update from group operation and gets the consolidated inconsistency report
20
+ def bulk_inconsistency_validate
21
+ raise IncompleteResource, 'Please retrieve the Logical Interconnect before trying to validate' unless @data['uri']
22
+ options = {
23
+ 'logicalInterconnectUris' => @data['logicalInterconnectUris']
24
+ }
25
+ response = @client.rest_post("#{BASE_URI}/bulk-inconsistency-validation", { 'body' => options }, @api_version)
26
+ body = @client.response_handler(response)
27
+ set_all(body)
28
+ end
29
+
30
+ end
31
+ end
32
+ end
33
+ end