From b46c153169307fe453350b6a1e4df287795ed282 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Mon, 4 Nov 2019 22:30:09 +0530 Subject: [PATCH 01/13] api1000 support template --- .rubocop.yml | 2 +- README.md | 6 +- lib/oneview-sdk.rb | 2 +- lib/oneview-sdk/resource/api1000.rb | 66 +++++++++++++++++++ lib/oneview-sdk/resource/api1000/c7000.rb | 27 ++++++++ .../resource/api1000/c7000/enclosure.rb | 22 +++++++ .../resource/api1000/c7000/enclosure_group.rb | 22 +++++++ .../api1000/c7000/ethernet_network.rb | 22 +++++++ .../resource/api1000/c7000/fc_network.rb | 22 +++++++ .../resource/api1000/c7000/fcoe_network.rb | 23 +++++++ .../resource/api1000/c7000/interconnect.rb | 23 +++++++ .../resource/api1000/c7000/lig_uplink_set.rb | 21 ++++++ .../api1000/c7000/logical_enclosure.rb | 22 +++++++ .../api1000/c7000/logical_interconnect.rb | 32 +++++++++ .../c7000/logical_interconnect_group.rb | 32 +++++++++ .../resource/api1000/c7000/network_set.rb | 21 ++++++ .../resource/api1000/c7000/scope.rb | 22 +++++++ .../resource/api1000/c7000/server_hardware.rb | 22 +++++++ .../api1000/c7000/server_hardware_type.rb | 32 +++++++++ .../resource/api1000/c7000/server_profile.rb | 32 +++++++++ .../api1000/c7000/server_profile_template.rb | 33 ++++++++++ .../resource/api1000/c7000/storage_pool.rb | 22 +++++++ .../resource/api1000/c7000/storage_system.rb | 22 +++++++ .../resource/api1000/c7000/uplink_set.rb | 22 +++++++ .../resource/api1000/c7000/volume.rb | 22 +++++++ .../api1000/c7000/volume_attachment.rb | 22 +++++++ .../resource/api1000/c7000/volume_template.rb | 22 +++++++ lib/oneview-sdk/resource/api1000/synergy.rb | 27 ++++++++ .../resource/api1000/synergy/enclosure.rb | 22 +++++++ .../api1000/synergy/enclosure_group.rb | 22 +++++++ .../api1000/synergy/ethernet_network.rb | 22 +++++++ .../resource/api1000/synergy/fc_network.rb | 22 +++++++ .../resource/api1000/synergy/fcoe_network.rb | 22 +++++++ .../resource/api1000/synergy/interconnect.rb | 22 +++++++ .../api1000/synergy/lig_uplink_set.rb | 21 ++++++ .../api1000/synergy/logical_enclosure.rb | 22 +++++++ .../api1000/synergy/logical_interconnect.rb | 32 +++++++++ .../synergy/logical_interconnect_group.rb | 33 ++++++++++ .../resource/api1000/synergy/network_set.rb | 22 +++++++ .../api1000/synergy/os_deployment_plan.rb | 22 +++++++ .../resource/api1000/synergy/scope.rb | 22 +++++++ .../api1000/synergy/server_hardware.rb | 22 +++++++ .../api1000/synergy/server_hardware_type.rb | 22 +++++++ .../api1000/synergy/server_profile.rb | 25 +++++++ .../synergy/server_profile_template.rb | 22 +++++++ .../resource/api1000/synergy/storage_pool.rb | 22 +++++++ .../api1000/synergy/storage_system.rb | 22 +++++++ .../resource/api1000/synergy/uplink_set.rb | 22 +++++++ .../resource/api1000/synergy/volume.rb | 22 +++++++ .../api1000/synergy/volume_attachment.rb | 22 +++++++ .../api1000/synergy/volume_template.rb | 22 +++++++ spec/shared_context.rb | 19 ++++++ spec/spec_helper.rb | 2 +- spec/unit/cli/version_spec.rb | 2 +- spec/unit/oneview_sdk_spec.rb | 4 +- 55 files changed, 1214 insertions(+), 7 deletions(-) create mode 100644 lib/oneview-sdk/resource/api1000.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/enclosure.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/fc_network.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/fcoe_network.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/interconnect.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/lig_uplink_set.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/logical_enclosure.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/network_set.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/scope.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/server_profile.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/storage_pool.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/storage_system.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/volume.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/volume_attachment.rb create mode 100644 lib/oneview-sdk/resource/api1000/c7000/volume_template.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/enclosure.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/enclosure_group.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/ethernet_network.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/fc_network.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/fcoe_network.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/interconnect.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/logical_enclosure.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/network_set.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/os_deployment_plan.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/scope.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/server_hardware_type.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/server_profile.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/server_profile_template.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/storage_pool.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/storage_system.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/volume.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/volume_attachment.rb create mode 100644 lib/oneview-sdk/resource/api1000/synergy/volume_template.rb diff --git a/.rubocop.yml b/.rubocop.yml index d3b2682d0..8612259d9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -38,7 +38,7 @@ Metrics/PerceivedComplexity: Enabled: false Style/GlobalVars: - AllowedVariables: [$config, $secrets, $client, $client_120, $client_300, $client_300_synergy, $config_synergy, $secrets_synergy, $config_i3s, $client_i3s_300, $client_500, $client_500_synergy, $client_i3s_500, $client_600, $client_600_synergy, $client_i3s_600, $client_800, $client_800_synergy] + AllowedVariables: [$config, $secrets, $client, $client_120, $client_300, $client_300_synergy, $config_synergy, $secrets_synergy, $config_i3s, $client_i3s_300, $client_500, $client_500_synergy, $client_i3s_500, $client_600, $client_600_synergy, $client_i3s_600, $client_800, $client_800_synergy, $client_1000, $client_1000_synergy] Style/FrozenStringLiteralComment: Enabled: false diff --git a/README.md b/README.md index 0dfe893d7..a4af91d5e 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ You may notice resource classes being accessed in a few different ways; for exam require 'oneview-sdk' # Show defaults: -OneviewSDK::SUPPORTED_API_VERSIONS # [200, 300, 500, 600, 800] +OneviewSDK::SUPPORTED_API_VERSIONS # [200, 300, 500, 600, 800, 1000] OneviewSDK::DEFAULT_API_VERSION # 200 OneviewSDK.api_version # 200 OneviewSDK.api_version_updated? # false @@ -204,6 +204,10 @@ OneviewSDK::API800::DEFAULT_VARIANT # 'C7000' OneviewSDK::API800.variant # 'C7000' OneviewSDK::API800.variant_updated? # false +OneviewSDK::API1000::SUPPORTED_VARIANTS # ['C7000', 'Synergy'] +OneviewSDK::API1000::DEFAULT_VARIANT # 'C7000' +OneviewSDK::API1000.variant # 'C7000' +OneviewSDK::API1000.variant_updated? # false # Therefore, there is 1 more namespace level to the real resource class name OneviewSDK::EthernetNetwork # OneviewSDK::API300::C7000::EthernetNetwork OneviewSDK::API300::EthernetNetwork # OneviewSDK::API300::C7000::EthernetNetwork diff --git a/lib/oneview-sdk.rb b/lib/oneview-sdk.rb index 39b625225..2ab3a436f 100644 --- a/lib/oneview-sdk.rb +++ b/lib/oneview-sdk.rb @@ -26,7 +26,7 @@ module OneviewSDK env_i3s = %w[I3S_URL I3S_SSL_ENABLED] ENV_VARS = env_sdk.concat(env_i3s).freeze - SUPPORTED_API_VERSIONS = [200, 300, 500, 600, 800].freeze + SUPPORTED_API_VERSIONS = [200, 300, 500, 600, 800, 1000].freeze DEFAULT_API_VERSION = 200 @api_version = DEFAULT_API_VERSION @api_version_updated = false # Whether or not the API version has been set by the user diff --git a/lib/oneview-sdk/resource/api1000.rb b/lib/oneview-sdk/resource/api1000.rb new file mode 100644 index 000000000..2cf7a6326 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000.rb @@ -0,0 +1,66 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +module OneviewSDK + # Module for API v1000 + module API1000 + SUPPORTED_VARIANTS = %w[C7000 Synergy].freeze + DEFAULT_VARIANT = 'C7000'.freeze + @variant = DEFAULT_VARIANT + @variant_updated = false # Whether or not the API variant has been set by the user + + # Get resource class that matches the type given + # @param [String] type Name of the desired class type + # @param [String] variant Variant (C7000 or Synergy) + # @return [Class] Resource class or nil if not found + def self.resource_named(type, variant = @variant) + raise "API1000 variant '#{variant}' is not supported! Try one of #{SUPPORTED_VARIANTS}" unless SUPPORTED_VARIANTS.include?(variant.to_s) + new_type = type.to_s.downcase.gsub(/[ -_]/, '') + api_module = OneviewSDK::API1000.const_get(variant) + api_module.constants.each do |c| + klass = api_module.const_get(c) + next unless klass.is_a?(Class) + name = klass.name.split('::').last.downcase.delete('_').delete('-') + return klass if new_type =~ /^#{name}[s]?$/ + end + nil + end + + # Get the current API1000 variant + def self.variant + @variant + end + + # Has the API1000 variant been set by the user? + # @return [TrueClass, FalseClass] + def self.variant_updated? + @variant_updated + end + + # Sets the API1000 variant + def self.variant=(variant) + raise "API1000 variant '#{variant}' is not supported! Try one of #{SUPPORTED_VARIANTS}" unless SUPPORTED_VARIANTS.include?(variant) + @variant_updated = true + @variant = variant + end + + # Helps redirect resources to the correct API1000 variant + def self.const_missing(const) + API1000_module = OneviewSDK::API1000.const_get(@variant.to_s) + API1000_module.const_get(const) + rescue NameError + raise NameError, "The #{const} method or resource does not exist for OneView API1000 variant #{@variant}." + end + end +end + +# Load all API1000-specific resources: +Dir[File.dirname(__FILE__) + '/API1000/*.rb'].each { |file| require file } diff --git a/lib/oneview-sdk/resource/api1000/c7000.rb b/lib/oneview-sdk/resource/api1000/c7000.rb new file mode 100644 index 000000000..6c6d385c3 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000.rb @@ -0,0 +1,27 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +module OneviewSDK + module API1000 + # Module for API1000 C7000 + module C7000 + # Get resource class that matches the type given + # @param [String] type Name of the desired class type + # @return [Class] Resource class or nil if not found + def self.resource_named(type) + OneviewSDK::API1000.resource_named(type, 'C7000') + end + end + end +end + +# Load all API-specific resources: +Dir[File.dirname(__FILE__) + '/c7000/*.rb'].each { |file| require file } diff --git a/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb b/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb new file mode 100644 index 000000000..e81f1a9f7 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb @@ -0,0 +1,22 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../API800/c7000/enclosure' + +module OneviewSDK + module API1000 + module C7000 + # Enclosure resource implementation for API1000 C7000 + class Enclosure < OneviewSDK::API800::C7000::Enclosure + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb b/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb new file mode 100644 index 000000000..b85287ea6 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../API800/c7000/enclosure_group' + +module OneviewSDK + module API1000 + module C7000 + # Enclosure group resource implementation on API1000 C7000 + class EnclosureGroup < OneviewSDK::API800::C7000::EnclosureGroup + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb b/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb new file mode 100644 index 000000000..900e38058 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../API800/c7000/ethernet_network' + +module OneviewSDK + module API1000 + module C7000 + # Ethernet network resource implementation for API1000 C7000 + class EthernetNetwork < OneviewSDK::API800::C7000::EthernetNetwork + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/fc_network.rb b/lib/oneview-sdk/resource/api1000/c7000/fc_network.rb new file mode 100644 index 000000000..4b5d2ad3d --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/fc_network.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api600/c7000/fc_network' + +module OneviewSDK + module API1000 + module C7000 + # FC network resource implementation for API1000 C7000 + class FCNetwork < OneviewSDK::API600::C7000::FCNetwork + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/fcoe_network.rb b/lib/oneview-sdk/resource/api1000/c7000/fcoe_network.rb new file mode 100644 index 000000000..dc88a10b0 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/fcoe_network.rb @@ -0,0 +1,23 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/fcoe_network' + +module OneviewSDK + module API1000 + module C7000 + # FCoE network resource implementation for API1000 C7000 + class FCoENetwork < OneviewSDK::API800::C7000::FCoENetwork + + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/interconnect.rb b/lib/oneview-sdk/resource/api1000/c7000/interconnect.rb new file mode 100644 index 000000000..374b18984 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/interconnect.rb @@ -0,0 +1,23 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/interconnect' + +module OneviewSDK + module API1000 + module C7000 + # Interconnect resource implementation on API1000 C7000 + class Interconnect < OneviewSDK::API800::C7000::Interconnect + include OneviewSDK::ResourceHelper::ConfigurationOperation + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/lig_uplink_set.rb b/lib/oneview-sdk/resource/api1000/c7000/lig_uplink_set.rb new file mode 100644 index 000000000..eecb2be9a --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/lig_uplink_set.rb @@ -0,0 +1,21 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/lig_uplink_set' + +module OneviewSDK + module API1000 + module C7000 + class LIGUplinkSet < OneviewSDK::API800::C7000::LIGUplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/logical_enclosure.rb b/lib/oneview-sdk/resource/api1000/c7000/logical_enclosure.rb new file mode 100644 index 000000000..1f60fbd2d --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/logical_enclosure.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/logical_enclosure' + +module OneviewSDK + module API1000 + module C7000 + # Logical Enclosure resource implementation on API1000 C7000 + class LogicalEnclosure < OneviewSDK::API800::C7000::LogicalEnclosure + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb new file mode 100644 index 000000000..3e157a250 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb @@ -0,0 +1,32 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/logical_interconnect' + +module OneviewSDK + module API1000 + module C7000 + # Logical interconnect resource implementation for API1000 C7000 + class LogicalInterconnect < OneviewSDK::API800::C7000::LogicalInterconnect + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values: + @data['type'] ||= 'logical-interconnectV5' + super + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb new file mode 100644 index 000000000..427dc5c53 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb @@ -0,0 +1,32 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/logical_interconnect_group' + +module OneviewSDK + module API1000 + module C7000 + # Logical interconnect group resource implementation on API1000 C7000 + class LogicalInterconnectGroup < OneviewSDK::API800::C7000::LogicalInterconnectGroup + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values: + @data['type'] ||= 'logical-interconnect-groupV5' + super + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/network_set.rb b/lib/oneview-sdk/resource/api1000/c7000/network_set.rb new file mode 100644 index 000000000..7feb75732 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/network_set.rb @@ -0,0 +1,21 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/network_set' + +module OneviewSDK + module API1000 + # Network set resource implementation for API1000 C7000 + class NetworkSet < OneviewSDK::API800::C7000::NetworkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/scope.rb b/lib/oneview-sdk/resource/api1000/c7000/scope.rb new file mode 100644 index 000000000..8063ca6c8 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/scope.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/scope' + +module OneviewSDK + module API1000 + module C7000 + # Scope resource implementation for API1000 C7000 + class Scope < OneviewSDK::API800::C7000::Scope + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb b/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb new file mode 100644 index 000000000..f1d64a528 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/server_hardware' + +module OneviewSDK + module API1000 + module C7000 + # Server Hardware resource implementation on API1000 C7000 + class ServerHardware < OneviewSDK::API800::C7000::ServerHardware + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb b/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb new file mode 100644 index 000000000..b809d8dbd --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb @@ -0,0 +1,32 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/server_hardware_type' + +module OneviewSDK + module API1000 + module C7000 + # Server hardware type resource implementation for API1000 C7000 + class ServerHardwareType < OneviewSDK::API800::C7000::ServerHardwareType + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'server-hardware-type-9' + super + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb b/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb new file mode 100644 index 000000000..5cb7dc632 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb @@ -0,0 +1,32 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/server_profile' + +module OneviewSDK + module API1000 + module C7000 + # Server Profile resource implementation on API1000 C7000 + class ServerProfile < OneviewSDK::API800::C7000::ServerProfile + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'ServerProfileV9' + super + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb b/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb new file mode 100644 index 000000000..d32659b8e --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb @@ -0,0 +1,33 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/server_profile_template' + +module OneviewSDK + module API1000 + module C7000 + # Server Profile Template resource implementation on API1000 C7000 + class ServerProfileTemplate < OneviewSDK::API800::C7000::ServerProfileTemplate + + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'ServerProfileTemplateV5' + super + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/storage_pool.rb b/lib/oneview-sdk/resource/api1000/c7000/storage_pool.rb new file mode 100644 index 000000000..aaebb3fe8 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/storage_pool.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/storage_pool' + +module OneviewSDK + module API1000 + module C7000 + # Storage pool resource implementation for API1000 C7000 + class StoragePool < OneviewSDK::API800::C7000::StoragePool + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb b/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb new file mode 100644 index 000000000..f9175f5d5 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/storage_system' + +module OneviewSDK + module API1000 + module C7000 + # Storage System resource implementation for API1000 C7000 + class StorageSystem < OneviewSDK::API800::C7000::StorageSystem + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb b/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb new file mode 100644 index 000000000..b1a3a6e38 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/uplink_set' + +module OneviewSDK + module API1000 + module C7000 + # Uplink set resource implementation for API1000 C7000 + class UplinkSet < OneviewSDK::API800::C7000::UplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/volume.rb b/lib/oneview-sdk/resource/api1000/c7000/volume.rb new file mode 100644 index 000000000..f42f34881 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/volume.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/volume' + +module OneviewSDK + module API1000 + module C7000 + # Volume resource implementation on API1000 C7000 + class Volume < OneviewSDK::API800::C7000::Volume + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/volume_attachment.rb b/lib/oneview-sdk/resource/api1000/c7000/volume_attachment.rb new file mode 100644 index 000000000..bf9354768 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/volume_attachment.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/volume_attachment' + +module OneviewSDK + module API1000 + module C7000 + # Storage Volume Attachment resource implementation for API1000 C7000 + class VolumeAttachment < OneviewSDK::API800::C7000::VolumeAttachment + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/c7000/volume_template.rb b/lib/oneview-sdk/resource/api1000/c7000/volume_template.rb new file mode 100644 index 000000000..f23c4fcdb --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/c7000/volume_template.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/c7000/volume_template' + +module OneviewSDK + module API1000 + module C7000 + # Volume Template resource implementation for API1000 C7000 + class VolumeTemplate < OneviewSDK::API800::C7000::VolumeTemplate + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy.rb b/lib/oneview-sdk/resource/api1000/synergy.rb new file mode 100644 index 000000000..2d2d906bc --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy.rb @@ -0,0 +1,27 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +module OneviewSDK + module API1000 + # Module for API1000 Synergy + module Synergy + # Get resource class that matches the type given + # @param [String] type Name of the desired class type + # @return [Class] Resource class or nil if not found + def self.resource_named(type) + OneviewSDK::API1000.resource_named(type, 'Synergy') + end + end + end +end + +# Load all API-specific resources: +Dir[File.dirname(__FILE__) + '/synergy/*.rb'].each { |file| require file } diff --git a/lib/oneview-sdk/resource/api1000/synergy/enclosure.rb b/lib/oneview-sdk/resource/api1000/synergy/enclosure.rb new file mode 100644 index 000000000..9bf5273f9 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/enclosure.rb @@ -0,0 +1,22 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/enclosure' + +module OneviewSDK + module API1000 + module Synergy + # Enclosure resource implementation for API1000 Synergy + class Enclosure < OneviewSDK::API800::Synergy::Enclosure + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/enclosure_group.rb b/lib/oneview-sdk/resource/api1000/synergy/enclosure_group.rb new file mode 100644 index 000000000..cac5cc887 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/enclosure_group.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/enclosure_group' + +module OneviewSDK + module API1000 + module Synergy + # Enclosure group resource implementation on API1000 Synergy + class EnclosureGroup < OneviewSDK::API800::Synergy::EnclosureGroup + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/ethernet_network.rb b/lib/oneview-sdk/resource/api1000/synergy/ethernet_network.rb new file mode 100644 index 000000000..132a3fc69 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/ethernet_network.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/ethernet_network' + +module OneviewSDK + module API1000 + module Synergy + # Ethernet network resource implementation for API1000 Synergy + class EthernetNetwork < OneviewSDK::API800::Synergy::EthernetNetwork + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/fc_network.rb b/lib/oneview-sdk/resource/api1000/synergy/fc_network.rb new file mode 100644 index 000000000..059ed86d6 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/fc_network.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/fc_network' + +module OneviewSDK + module API1000 + module Synergy + # FC network resource implementation for API1000 Synergy + class FCNetwork < OneviewSDK::API800::Synergy::FCNetwork + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/fcoe_network.rb b/lib/oneview-sdk/resource/api1000/synergy/fcoe_network.rb new file mode 100644 index 000000000..d730f5e27 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/fcoe_network.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/fcoe_network' + +module OneviewSDK + module API1000 + module Synergy + # FCoE network resource implementation for API1000 Synergy + class FCoENetwork < OneviewSDK::API800::Synergy::FCoENetwork + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/interconnect.rb b/lib/oneview-sdk/resource/api1000/synergy/interconnect.rb new file mode 100644 index 000000000..6002d0a9f --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/interconnect.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/interconnect' + +module OneviewSDK + module API1000 + module Synergy + # Interconnect resource implementation on API1000 Synergy + class Interconnect < OneviewSDK::API1000::C7000::Interconnect + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb b/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb new file mode 100644 index 000000000..5035294d9 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb @@ -0,0 +1,21 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/lig_uplink_set' + +module OneviewSDK + module API1000 + module Synergy + class LIGUplinkSet < OneviewSDK::API8888888800::Synergy::LIGUplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/logical_enclosure.rb b/lib/oneview-sdk/resource/api1000/synergy/logical_enclosure.rb new file mode 100644 index 000000000..86261860c --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/logical_enclosure.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/logical_enclosure' + +module OneviewSDK + module API1000 + module Synergy + # Logical Enclosure resource implementation on API1000 Synergy + class LogicalEnclosure < OneviewSDK::API800::Synergy::LogicalEnclosure + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb new file mode 100644 index 000000000..8bd5750fa --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb @@ -0,0 +1,32 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/logical_interconnect' + +module OneviewSDK + module API1000 + module Synergy + # Logical interconnect resource implementation for API1000 Synergy + class LogicalInterconnect < OneviewSDK::API800::Synergy::LogicalInterconnect + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values: + @data['type'] ||= 'logical-interconnectV5' + super + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb new file mode 100644 index 000000000..906eab667 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb @@ -0,0 +1,33 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/logical_interconnect_group' + +module OneviewSDK + module API1000 + module Synergy + # Logical interconnect group resource implementation for API1000 Synergy + class LogicalInterconnectGroup < OneviewSDK::API800::Synergy::LogicalInterconnectGroup + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values: + @data['type'] ||= 'logical-interconnect-groupV5' + super + end + + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/network_set.rb b/lib/oneview-sdk/resource/api1000/synergy/network_set.rb new file mode 100644 index 000000000..131996311 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/network_set.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api1000/c7000/network_set' + +module OneviewSDK + module API1000 + module Synergy + # Network set resource implementation for API1000 Synergy + class NetworkSet < OneviewSDK::API1000::C7000::NetworkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/os_deployment_plan.rb b/lib/oneview-sdk/resource/api1000/synergy/os_deployment_plan.rb new file mode 100644 index 000000000..d4f7b9e7b --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/os_deployment_plan.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api300/synergy/os_deployment_plan' + +module OneviewSDK + module API1000 + module Synergy + # Network set resource implementation for API1000 Synergy + class OSDeploymentPlan < OneviewSDK::API300::Synergy::OSDeploymentPlan + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/scope.rb b/lib/oneview-sdk/resource/api1000/synergy/scope.rb new file mode 100644 index 000000000..69310e6d2 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/scope.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/scope' + +module OneviewSDK + module API1000 + module Synergy + # Scope resource implementation for API1000 Synergy + class Scope < OneviewSDK::API1000::C7000::Scope + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb b/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb new file mode 100644 index 000000000..feb8fc095 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/server_hardware' + +module OneviewSDK + module API1000 + module Synergy + # Server Hardware resource implementation on API1000 Synergy + class ServerHardware < OneviewSDK::API800::Synergy::ServerHardware + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/server_hardware_type.rb b/lib/oneview-sdk/resource/api1000/synergy/server_hardware_type.rb new file mode 100644 index 000000000..a11ec0044 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/server_hardware_type.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/server_hardware_type' + +module OneviewSDK + module API1000 + module Synergy + # Server hardware type resource implementation for API1000 Synergy + class ServerHardwareType < OneviewSDK::API1000::C7000::ServerHardwareType + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/server_profile.rb b/lib/oneview-sdk/resource/api1000/synergy/server_profile.rb new file mode 100644 index 000000000..46dd0e9a1 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/server_profile.rb @@ -0,0 +1,25 @@ +# (c) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api300/synergy/server_profile' +require_relative '../c7000/server_profile' + +module OneviewSDK + module API1000 + module Synergy + # Server profile resource implementation for API1000 Synergy + class ServerProfile < OneviewSDK::API1000::C7000::ServerProfile + extend OneviewSDK::API300::Synergy::SASLogicalJBODHelper + include OneviewSDK::API300::Synergy::ServerProfileHelper + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/server_profile_template.rb b/lib/oneview-sdk/resource/api1000/synergy/server_profile_template.rb new file mode 100644 index 000000000..48e096e11 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/server_profile_template.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/server_profile_template' + +module OneviewSDK + module API1000 + module Synergy + # Server Profile Template resource implementation for API1000 Synergy + class ServerProfileTemplate < OneviewSDK::API1000::C7000::ServerProfileTemplate + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/storage_pool.rb b/lib/oneview-sdk/resource/api1000/synergy/storage_pool.rb new file mode 100644 index 000000000..1df5e9313 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/storage_pool.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/storage_pool' + +module OneviewSDK + module API1000 + module Synergy + # Storage pool resource implementation for API 1000 Synergy + class StoragePool < OneviewSDK::API1000::C7000::StoragePool + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/storage_system.rb b/lib/oneview-sdk/resource/api1000/synergy/storage_system.rb new file mode 100644 index 000000000..9a69d999a --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/storage_system.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/storage_system' + +module OneviewSDK + module API1000 + module Synergy + # Storage system resource implementation for API 1000 Synergy + class StorageSystem < OneviewSDK::API1000::C7000::StorageSystem + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb b/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb new file mode 100644 index 000000000..aa286df03 --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../../api800/synergy/uplink_set' + +module OneviewSDK + module API1000 + module Synergy + # Uplink set resource implementation for API1000 Synergy + class UplinkSet < OneviewSDK::API800::Synergy::UplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/volume.rb b/lib/oneview-sdk/resource/api1000/synergy/volume.rb new file mode 100644 index 000000000..dc8bb682b --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/volume.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/volume' + +module OneviewSDK + module API1000 + module Synergy + # Volume resource implementation for API1000 Synergy + class Volume < OneviewSDK::API1000::C7000::Volume + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/volume_attachment.rb b/lib/oneview-sdk/resource/api1000/synergy/volume_attachment.rb new file mode 100644 index 000000000..d4e4c5b2a --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/volume_attachment.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/volume_attachment' + +module OneviewSDK + module API1000 + module Synergy + # Storage Volume Attachment resource implementation for API1000 Synergy + class VolumeAttachment < OneviewSDK::API1000::C7000::VolumeAttachment + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1000/synergy/volume_template.rb b/lib/oneview-sdk/resource/api1000/synergy/volume_template.rb new file mode 100644 index 000000000..e8e6ccbdf --- /dev/null +++ b/lib/oneview-sdk/resource/api1000/synergy/volume_template.rb @@ -0,0 +1,22 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +require_relative '../c7000/volume_template' + +module OneviewSDK + module API1000 + module Synergy + # Volume Template resource implementation for API1000 Synergy + class VolumeTemplate < OneviewSDK::API1000::C7000::VolumeTemplate + end + end + end +end diff --git a/spec/shared_context.rb b/spec/shared_context.rb index 6e01d7252..0ce7ba3f2 100644 --- a/spec/shared_context.rb +++ b/spec/shared_context.rb @@ -74,6 +74,15 @@ end end +# Context for API1000 integration testing: +RSpec.shared_context 'integration api1000 context', a: :b do + before :all do + integration_context + $client_1000 ||= OneviewSDK::Client.new($config.merge(api_version: 1000)) + $client_1000_synergy ||= OneviewSDK::Client.new($config_synergy.merge(api_version: 1000)) + end +end + # Context for Image Streamer API300 integration testing: RSpec.shared_context 'integration i3s api300 context', a: :b do before :all do @@ -139,6 +148,13 @@ end end +RSpec.shared_context 'system api1000 context', a: :b do + before(:each) do + load_system_properties + generate_clients(1000) + end +end + # Must set the following environment variables: # ENV['ONEVIEWSDK_INTEGRATION_CONFIG'] = '/full/path/to/one_view/config.json' # ENV['ONEVIEWSDK_INTEGRATION_SECRETS'] = '/full/path/to/one_view/secrets.json' @@ -252,6 +268,9 @@ def generate_clients(api_version) when 800 $client_800 ||= OneviewSDK::Client.new($config.merge(api_version: api_version)) $client_800_synergy ||= OneviewSDK::Client.new($config_synergy.merge(api_version: api_version)) + when 1000 + $client_1000 ||= OneviewSDK::Client.new($config.merge(api_version: api_version)) + $client_1000_synergy ||= OneviewSDK::Client.new($config_synergy.merge(api_version: api_version)) end allow_any_instance_of(OneviewSDK::Client).to receive(:appliance_api_version).and_call_original diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9403d4671..07e40397b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -115,7 +115,7 @@ config.before(:each) do unless config.filter_manager.inclusions.rules[:integration] || config.filter_manager.inclusions.rules[:system] # Mock appliance version and login api requests, as well as loading trusted certs - allow_any_instance_of(OneviewSDK::Client).to receive(:appliance_api_version).and_return(800) + allow_any_instance_of(OneviewSDK::Client).to receive(:appliance_api_version).and_return(1000) allow_any_instance_of(OneviewSDK::Client).to receive(:login).and_return('secretToken') allow_any_instance_of(OneviewSDK::ImageStreamer::Client).to receive(:appliance_i3s_api_version).and_return(600) allow(OneviewSDK::SSLHelper).to receive(:load_trusted_certs).and_return(nil) diff --git a/spec/unit/cli/version_spec.rb b/spec/unit/cli/version_spec.rb index c24e8aa25..29d692d07 100644 --- a/spec/unit/cli/version_spec.rb +++ b/spec/unit/cli/version_spec.rb @@ -11,7 +11,7 @@ end it 'prints the appliance version' do - expect { command }.to output(/OneView appliance API version at .* = 800/).to_stdout_from_any_process + expect { command }.to output(/OneView appliance API version at .* = 1000/).to_stdout_from_any_process end it 'requires the url to be set' do diff --git a/spec/unit/oneview_sdk_spec.rb b/spec/unit/oneview_sdk_spec.rb index b7cc1aba3..987ad475f 100644 --- a/spec/unit/oneview_sdk_spec.rb +++ b/spec/unit/oneview_sdk_spec.rb @@ -5,11 +5,11 @@ it 'has a list of supported api versions' do versions = described_class::SUPPORTED_API_VERSIONS expect(versions).to be_a Array - [200, 300, 500, 600, 800].each { |v| expect(versions).to include(v) } + [200, 300, 500, 600, 800, 1000].each { |v| expect(versions).to include(v) } end it 'returns a valid API version' do - %w[API200 API300 API500 API600 API800].each { |v| expect { OneviewSDK.const_get(v) }.not_to raise_error } + %w[API200 API300 API500 API600 API800 API1000].each { |v| expect { OneviewSDK.const_get(v) }.not_to raise_error } end it 'raises an error when an invalid API300 version is called' do From 489e4cefad5149e75209fa1754fd533b02f04f84 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Tue, 5 Nov 2019 11:45:02 +0530 Subject: [PATCH 02/13] fixing api1000 template issues --- lib/oneview-sdk/resource/api1000.rb | 6 +++--- lib/oneview-sdk/resource/api1000/c7000/enclosure.rb | 2 +- lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb | 2 +- lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb | 2 +- lib/oneview-sdk/resource/api1000/c7000/network_set.rb | 1 + lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb | 2 +- spec/unit/client_spec.rb | 4 ++-- spec/unit/resource_spec.rb | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/oneview-sdk/resource/api1000.rb b/lib/oneview-sdk/resource/api1000.rb index 2cf7a6326..18899ec2d 100644 --- a/lib/oneview-sdk/resource/api1000.rb +++ b/lib/oneview-sdk/resource/api1000.rb @@ -54,8 +54,8 @@ def self.variant=(variant) # Helps redirect resources to the correct API1000 variant def self.const_missing(const) - API1000_module = OneviewSDK::API1000.const_get(@variant.to_s) - API1000_module.const_get(const) + api1000_module = OneviewSDK::API1000.const_get(@variant.to_s) + api1000_module.const_get(const) rescue NameError raise NameError, "The #{const} method or resource does not exist for OneView API1000 variant #{@variant}." end @@ -63,4 +63,4 @@ def self.const_missing(const) end # Load all API1000-specific resources: -Dir[File.dirname(__FILE__) + '/API1000/*.rb'].each { |file| require file } +Dir[File.dirname(__FILE__) + '/api1000/*.rb'].each { |file| require file } diff --git a/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb b/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb index e81f1a9f7..6d43c07f8 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/enclosure.rb @@ -9,7 +9,7 @@ # CONDITIONS OF ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -require_relative '../../API800/c7000/enclosure' +require_relative '../../api800/c7000/enclosure' module OneviewSDK module API1000 diff --git a/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb b/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb index b85287ea6..819f3a2cc 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/enclosure_group.rb @@ -9,7 +9,7 @@ # CONDITIONS OF ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -require_relative '../../API800/c7000/enclosure_group' +require_relative '../../api800/c7000/enclosure_group' module OneviewSDK module API1000 diff --git a/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb b/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb index 900e38058..db0512b94 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/ethernet_network.rb @@ -9,7 +9,7 @@ # CONDITIONS OF ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -require_relative '../../API800/c7000/ethernet_network' +require_relative '../../api800/c7000/ethernet_network' module OneviewSDK module API1000 diff --git a/lib/oneview-sdk/resource/api1000/c7000/network_set.rb b/lib/oneview-sdk/resource/api1000/c7000/network_set.rb index 7feb75732..dc3af962d 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/network_set.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/network_set.rb @@ -13,6 +13,7 @@ module OneviewSDK module API1000 + module C7000 # Network set resource implementation for API1000 C7000 class NetworkSet < OneviewSDK::API800::C7000::NetworkSet end diff --git a/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb b/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb index 5035294d9..b2bfa9e92 100644 --- a/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb +++ b/lib/oneview-sdk/resource/api1000/synergy/lig_uplink_set.rb @@ -14,7 +14,7 @@ module OneviewSDK module API1000 module Synergy - class LIGUplinkSet < OneviewSDK::API8888888800::Synergy::LIGUplinkSet + class LIGUplinkSet < OneviewSDK::API800::Synergy::LIGUplinkSet end end end diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb index 431267a29..7e38f2e6d 100644 --- a/spec/unit/client_spec.rb +++ b/spec/unit/client_spec.rb @@ -84,10 +84,10 @@ end it 'warns if the api level is greater than the appliance api version' do - options = { url: 'https://oneview.example.com', token: 'token123', api_version: 1000 } + options = { url: 'https://oneview.example.com', token: 'token123', api_version: 1200 } client = nil expect { client = OneviewSDK::Client.new(options) }.to output(/is greater than the appliance API version/).to_stdout_from_any_process - expect(client.api_version).to eq(1000) + expect(client.api_version).to eq(1200) end it 'sets @print_wait_dots to false by default' do diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb index b48c88a9a..0205d74dc 100644 --- a/spec/unit/resource_spec.rb +++ b/spec/unit/resource_spec.rb @@ -36,7 +36,7 @@ end it 'can\'t use an api version greater than the client\'s max' do - expect { OneviewSDK::Resource.new(@client_200, {}, 1000) }.to raise_error(OneviewSDK::UnsupportedVersion, /is greater than the client's max/) + expect { OneviewSDK::Resource.new(@client_200, {}, 1200) }.to raise_error(OneviewSDK::UnsupportedVersion, /is greater than the client's max/) end it 'starts with an empty data hash' do From 654e00a1d331823a391515b521151b9d30ec2a78 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Tue, 5 Nov 2019 12:15:58 +0530 Subject: [PATCH 03/13] Adding unit test cases to fix the coverage issue --- .../api1000/c7000/server_profile_template.rb | 2 +- .../c7000/server_profile_template_spec.rb | 16 +++++++ spec/unit/resource/api1000/c7000_spec.rb | 10 ++++ .../synergy/server_profile_template_spec.rb | 16 +++++++ spec/unit/resource/api1000/synergy_spec.rb | 10 ++++ spec/unit/resource/api1000_spec.rb | 47 +++++++++++++++++++ 6 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 spec/unit/resource/api1000/c7000/server_profile_template_spec.rb create mode 100644 spec/unit/resource/api1000/c7000_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/server_profile_template_spec.rb create mode 100644 spec/unit/resource/api1000/synergy_spec.rb create mode 100644 spec/unit/resource/api1000_spec.rb diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb b/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb index d32659b8e..766d29f0f 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/server_profile_template.rb @@ -24,7 +24,7 @@ class ServerProfileTemplate < OneviewSDK::API800::C7000::ServerProfileTemplate def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values - @data['type'] ||= 'ServerProfileTemplateV5' + @data['type'] ||= 'ServerProfileTemplateV6' super end end diff --git a/spec/unit/resource/api1000/c7000/server_profile_template_spec.rb b/spec/unit/resource/api1000/c7000/server_profile_template_spec.rb new file mode 100644 index 000000000..e1c22fb88 --- /dev/null +++ b/spec/unit/resource/api1000/c7000/server_profile_template_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::ServerProfileTemplate do + include_context 'shared context' + + it 'inherits from API800' do + expect(described_class).to be < OneviewSDK::API800::C7000::ServerProfileTemplate + end + + describe '#initialize' do + it 'sets the type correctly' do + item = described_class.new(@client_1000, name: 'server_profile_template') + expect(item[:type]).to eq('ServerProfileTemplateV6') + end + end +end diff --git a/spec/unit/resource/api1000/c7000_spec.rb b/spec/unit/resource/api1000/c7000_spec.rb new file mode 100644 index 000000000..94aa3b323 --- /dev/null +++ b/spec/unit/resource/api1000/c7000_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000 do + describe '#resource_named' do + it 'calls the OneviewSDK::API1000.resource_named method' do + expect(OneviewSDK::API1000).to receive(:resource_named).with('ConnectionTemplate', 'C7000') + described_class.resource_named('ConnectionTemplate') + end + end +end diff --git a/spec/unit/resource/api1000/synergy/server_profile_template_spec.rb b/spec/unit/resource/api1000/synergy/server_profile_template_spec.rb new file mode 100644 index 000000000..36d71397f --- /dev/null +++ b/spec/unit/resource/api1000/synergy/server_profile_template_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::ServerProfileTemplate do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1000::C7000::ServerProfileTemplate' do + expect(described_class).to be < OneviewSDK::API1000::C7000::ServerProfileTemplate + end + + describe '#initialize' do + it 'sets the type correctly' do + item = described_class.new(@client_1000, name: 'server_profile_template') + expect(item[:type]).to eq('ServerProfileTemplateV6') + end + end +end diff --git a/spec/unit/resource/api1000/synergy_spec.rb b/spec/unit/resource/api1000/synergy_spec.rb new file mode 100644 index 000000000..78ace2c87 --- /dev/null +++ b/spec/unit/resource/api1000/synergy_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy do + describe '#resource_named' do + it 'calls the OneviewSDK::API1000.resource_named method' do + expect(OneviewSDK::API1000).to receive(:resource_named).with('ConnectionTemplate', 'Synergy') + described_class.resource_named('ConnectionTemplate') + end + end +end diff --git a/spec/unit/resource/api1000_spec.rb b/spec/unit/resource/api1000_spec.rb new file mode 100644 index 000000000..415d07eaa --- /dev/null +++ b/spec/unit/resource/api1000_spec.rb @@ -0,0 +1,47 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000 do + it 'has a list of supported variants' do + variants = described_class::SUPPORTED_VARIANTS + expect(variants).to be_a Array + %w[C7000 Synergy].each { |v| expect(variants).to include(v) } + end + + it 'returns a valid API1000 variant' do + %w[C7000 Synergy].each { |v| expect { OneviewSDK::API1000.const_get(v) }.not_to raise_error } + end + + it 'raises an error when an invalid API1000 variant is called' do + expect { OneviewSDK::API1000::C6000 } + .to raise_error(NameError, 'The C6000 method or resource does not exist for OneView API1000 variant C7000.') + end + + it 'has a default api variant' do + expect(described_class::DEFAULT_VARIANT).to eq('C7000') + end + + describe '#resource_named' do + it 'gets the correct resource class' do + expect(described_class.resource_named('ServerProfile')).to eq(described_class::ServerProfile) + end + + it 'allows you to override the variant' do + expect(described_class.resource_named('ServerProfile', 'Synergy')).to eq(described_class::Synergy::ServerProfile) + expect(described_class.resource_named('ServerProfile', 'C7000')).to eq(described_class::C7000::ServerProfile) + end + end + + describe '#variant' do + it 'gets the current variant' do + expect(described_class::SUPPORTED_VARIANTS).to include(OneviewSDK::API1000.variant) + end + end + + describe '#variant=' do + it 'sets the current variant' do + OneviewSDK::API1000.variant = 'Synergy' + expect(OneviewSDK::API1000.variant).to eq('Synergy') + expect(OneviewSDK::API1000.variant_updated?).to eq(true) + end + end +end From 27310a20855623f853d0d116e1d3fb8bd82a9dc1 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Thu, 7 Nov 2019 12:41:46 +0530 Subject: [PATCH 04/13] Adding type for uplink set for API1000 --- endpoints-support.md | 62 +++++++++---------- .../resource/api1000/c7000/uplink_set.rb | 10 +++ .../resource/api1000/synergy/uplink_set.rb | 10 +++ 3 files changed, 51 insertions(+), 31 deletions(-) diff --git a/endpoints-support.md b/endpoints-support.md index c95068eff..cb85357ff 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -22,8 +22,8 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) ## HPE OneView -| Endpoints | Verb | V200 | V300 | V500 | V600 | V800 -| --------------------------------------------------------------------------------------- | -------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | +| Endpoints | Verb | V200 | V300 | V500 | V600 | V800 | V1000 +| --------------------------------------------------------------------------------------- | -------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | | **Alerts** | |/rest/alerts |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/alerts |DELETE | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | @@ -101,15 +101,15 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/fc-sans/endpoints | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | |/rest/fc-sans/endpoints/{id} | GET | :heavy_minus_sign: | :heavy_multiplication_x: | :heavy_multiplication_x: | **Ethernet Networks** | -|/rest/ethernet-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks/bulk | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/ethernet-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks/{id}/associatedProfiles | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/ethernet-networks/{id}/associatedUplinkGroups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks/bulk | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | +|/rest/ethernet-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks/{id}/associatedProfiles | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/ethernet-networks/{id}/associatedUplinkGroups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Events** | |/rest/events | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/events | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | @@ -120,19 +120,19 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/fabrics/{id}/reserved-vlan-range | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | |/rest/fabrics/{id}/reserved-vlan-range | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | | **FC Networks** | -|/rest/fc-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fc-networks | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fc-networks/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fc-networks/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/fc-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fc-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fc-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fc-networks | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fc-networks/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fc-networks/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | +|/rest/fc-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fc-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **FCoE Networks** | -|/rest/fcoe-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fcoe-networks | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fcoe-networks/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fcoe-networks/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/fcoe-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/fcoe-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fcoe-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fcoe-networks | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fcoe-networks/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fcoe-networks/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | +|/rest/fcoe-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/fcoe-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Firmware Bundles** | |/rest/firmware-bundles | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Firmware Drivers** | @@ -329,14 +329,14 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/migratable-vc-domains/{id} | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | |/rest/migratable-vc-domains/{id} | DELETE | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | | **Network Sets** | -|/rest/network-sets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets/withoutEthernet | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets/{id}/withoutEthernet | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/network-sets/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/network-sets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/network-sets | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/network-sets/withoutEthernet | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/network-sets/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/network-sets/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/network-sets/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/network-sets/{id}/withoutEthernet | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/network-sets/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | :heavy_minus_sign: | | **OS Deployment Plans** | |/rest/os-deployment-plans/ | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | |/rest/os-deployment-plans/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | diff --git a/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb b/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb index b1a3a6e38..2a273b080 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/uplink_set.rb @@ -16,6 +16,16 @@ module API1000 module C7000 # Uplink set resource implementation for API1000 C7000 class UplinkSet < OneviewSDK::API800::C7000::UplinkSet + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'uplink-setV5' + super + end end end end diff --git a/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb b/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb index aa286df03..d650e008f 100644 --- a/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb +++ b/lib/oneview-sdk/resource/api1000/synergy/uplink_set.rb @@ -16,6 +16,16 @@ module API1000 module Synergy # Uplink set resource implementation for API1000 Synergy class UplinkSet < OneviewSDK::API800::Synergy::UplinkSet + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'uplink-setV5' + super + end end end end From c56ccd7448cf2fb8058f855d3903f9ee2e3e1782 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Tue, 12 Nov 2019 12:04:00 +0530 Subject: [PATCH 05/13] Adding support to LIG and updated endpoint-support.md file --- endpoints-support.md | 102 +++++++++--------- .../logical_interconnect_group.rb | 1 + .../c7000/logical_interconnect_group.rb | 2 +- .../synergy/logical_interconnect_group.rb | 2 +- 4 files changed, 54 insertions(+), 53 deletions(-) diff --git a/endpoints-support.md b/endpoints-support.md index cb85357ff..0f8fbb64a 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -74,13 +74,13 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/drive-enclosures/{id}/port-map | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | |/rest/drive-enclosures/{id}/refreshState | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | | **Enclosure Groups** | -|/rest/enclosure-groups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosure-groups | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosure-groups/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosure-groups/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosure-groups/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosure-groups/{id}/script | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosure-groups/{id}/script | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups/{id}/script | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups/{id}/script | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Enclosures** | |/rest/enclosures | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | |/rest/enclosures | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | @@ -256,14 +256,14 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/logical-enclosures/{id}/support-dumps | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | |/rest/logical-enclosures/{id}/updateFromGroup | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | | **Logical Interconnect Groups** | -|/rest/logical-interconnect-groups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnect-groups | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnect-groups/defaultSettings | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnect-groups/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnect-groups/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnect-groups/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/logical-interconnect-groups/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnect-groups/{id}/settings | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups/defaultSettings | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/logical-interconnect-groups/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnect-groups/{id}/settings | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Logical Interconnects** | |/rest/logical-interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | |/rest/logical-interconnects/locations/interconnects | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | @@ -485,40 +485,40 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/server-profiles/{id}/messages | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | |/rest/server-profiles/{id}/transformation | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Storage Pools** | -|/rest/storage-pools | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-pools | POST | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/storage-pools/reachable-storage-pools | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-pools/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-pools/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | +|/rest/storage-pools | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-pools | POST | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-pools/reachable-storage-pools | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | | **Storage Systems** | -|/rest/storage-systems | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/host-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{arrayId}/storage-pools | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{id}/managedPorts | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/storage-systems/{id}/managedPorts/{portId} | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/storage-systems/{id}/reachable-ports | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{id}/templates | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-systems | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/host-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{arrayId}/storage-pools | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id}/managedPorts | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-systems/{id}/managedPorts/{portId} | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-systems/{id}/reachable-ports | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id}/templates | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Storage Volume Attachments** | -|/rest/storage-volume-attachments | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-volume-attachments/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-volume-attachments/repair | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-volume-attachments/repair | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/storage-volume-attachments/{attachmentId}/paths | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | -|/rest/storage-volume-attachments/{attachmentId)/paths/{id} | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | +|/rest/storage-volume-attachments | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-attachments/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-attachments/repair | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-attachments/repair | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-attachments/{attachmentId}/paths | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-volume-attachments/{attachmentId)/paths/{id} | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | | **Storage Volume Templates** | -|/rest/storage-volume-templates | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volume-templates | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volume-templates/connectable-volume-templates | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/storage-volume-templates/reachable-volume-templates | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volume-templates/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volume-templates/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volume-templates/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volume-templates/{id}/compatible-systems | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates/connectable-volume-templates | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:white_check_mark: | +|/rest/storage-volume-templates/reachable-volume-templates | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volume-templates/{id}/compatible-systems | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Switch Types** | |/rest/switch-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/switch-types/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | @@ -543,11 +543,11 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/unmanaged-devices/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/unmanaged-devices/{id}/environmentalConfiguration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Uplink Sets** | -|/rest/uplink-sets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/uplink-sets | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/uplink-sets/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/uplink-sets/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/uplink-sets/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/uplink-sets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/uplink-sets | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/uplink-sets/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/uplink-sets/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/uplink-sets/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Users** | |/rest/users | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/users | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | diff --git a/examples/shared_samples/logical_interconnect_group.rb b/examples/shared_samples/logical_interconnect_group.rb index 333c7227b..8dff49010 100644 --- a/examples/shared_samples/logical_interconnect_group.rb +++ b/examples/shared_samples/logical_interconnect_group.rb @@ -166,6 +166,7 @@ if variant == 'Synergy' puts "\nAdding an internal network with uri = #{eth01['uri']}" + lig.retrieve! lig.add_internal_network(eth01) lig.update lig.retrieve! diff --git a/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb index 427dc5c53..be1b5fbfa 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect_group.rb @@ -23,7 +23,7 @@ class LogicalInterconnectGroup < OneviewSDK::API800::C7000::LogicalInterconnectG def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values: - @data['type'] ||= 'logical-interconnect-groupV5' + @data['type'] ||= 'logical-interconnect-groupV6' super end end diff --git a/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb index 906eab667..91898d01d 100644 --- a/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb +++ b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect_group.rb @@ -23,7 +23,7 @@ class LogicalInterconnectGroup < OneviewSDK::API800::Synergy::LogicalInterconnec def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values: - @data['type'] ||= 'logical-interconnect-groupV5' + @data['type'] ||= 'logical-interconnect-groupV6' super end From cd0f225e6f9c94d0f1521c6f95d842b61fc8e6ba Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Thu, 14 Nov 2019 13:43:20 +0530 Subject: [PATCH 06/13] Adding API1000 support fpr storage systems, volume, LI,server hardware, SP --- endpoints-support.md | 210 +++++++++--------- examples/api600/storage_system.rb | 6 +- examples/api600/volume.rb | 3 +- .../shared_samples/logical_interconnect.rb | 2 +- .../api1000/c7000/logical_interconnect.rb | 2 +- .../resource/api1000/c7000/server_hardware.rb | 10 + .../api1000/c7000/server_hardware_type.rb | 2 +- .../resource/api1000/c7000/server_profile.rb | 2 +- .../resource/api1000/c7000/storage_system.rb | 13 ++ .../api1000/synergy/logical_interconnect.rb | 2 +- 10 files changed, 138 insertions(+), 114 deletions(-) diff --git a/endpoints-support.md b/endpoints-support.md index 0f8fbb64a..ee9243aed 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -209,20 +209,20 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/interconnect-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/interconnect-types/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Interconnects** | -|/rest/interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/configuration | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/pluggableModuleInformation | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/ports | GET | :heavy_minus_sign: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/interconnects/{id}/ports | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/ports/{portId:.+} | GET | :heavy_minus_sign: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/interconnects/{id}/resetportprotection | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/statistics | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/statistics/{portName:.+} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/statistics/{portName:.+}/subport/{subportNum} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/update-ports | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/interconnects/{id}/nameServers | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/configuration | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/pluggableModuleInformation | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/ports | GET | :heavy_minus_sign: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | +|/rest/interconnects/{id}/ports | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/ports/{portId:.+} | GET | :heavy_minus_sign: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | +|/rest/interconnects/{id}/resetportprotection | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/statistics | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/statistics/{portName:.+} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/statistics/{portName:.+}/subport/{subportNum} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/update-ports | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/interconnects/{id}/nameServers | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Internal Link Sets** | |/rest/internal-link-sets | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/internal-link-sets/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | @@ -244,17 +244,17 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/logical-downlinks/withoutEthernet |GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | |/rest/logical-downlinks/{id}/withoutEthernet |GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | | **Logical Enclosures** | -|/rest/logical-enclosures | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id}/configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id}/script | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id}/script | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id}/support-dumps | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-enclosures/{id}/updateFromGroup | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/logical-enclosures | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id}/configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id}/script | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id}/script | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id}/support-dumps | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-enclosures/{id}/updateFromGroup | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | | **Logical Interconnect Groups** | |/rest/logical-interconnect-groups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/logical-interconnect-groups | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | @@ -265,34 +265,34 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/logical-interconnect-groups/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/logical-interconnect-groups/{id}/settings | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Logical Interconnects** | -|/rest/logical-interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/locations/interconnects | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/logical-interconnects/locations/interconnects | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/logical-interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/compliance | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/ethernetSettings | GET | :heavy_minus_sign: | :heavy_multiplication_x: |:heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/logical-interconnects/{id}/ethernetSettings | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/firmware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/firmware | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/forwarding-information-base | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/logical-interconnects/{id}/forwarding-information-base | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/logical-interconnects/{id}/forwarding-information-base/{dumpFileName}.{suffix} | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/logical-interconnects/{id}/internalNetworks | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/internalVlans | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/qos-aggregated-configuration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/qos-aggregated-configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/settings | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/logical-interconnects/{id}/snmp-configuration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/snmp-configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/support-dumps | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/logical-interconnects/{id}/unassignedUplinkPortsForPortMonitor | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/port-monitor | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/port-monitor | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/telemetry-configurations/{tcId} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/{id}/telemetry-configurations/{tcId} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/logical-interconnects/compliance | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/logical-interconnects/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/logical-interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/locations/interconnects | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/logical-interconnects/locations/interconnects | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/logical-interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | +|/rest/logical-interconnects/{id}/compliance | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | +|/rest/logical-interconnects/{id}/ethernetSettings | GET | :heavy_minus_sign: | :heavy_multiplication_x: |:heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | +|/rest/logical-interconnects/{id}/ethernetSettings | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | +|/rest/logical-interconnects/{id}/firmware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | +|/rest/logical-interconnects/{id}/firmware | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/forwarding-information-base | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | +|/rest/logical-interconnects/{id}/forwarding-information-base | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | +|/rest/logical-interconnects/{id}/forwarding-information-base/{dumpFileName}.{suffix} | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | +|/rest/logical-interconnects/{id}/internalNetworks | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/internalVlans | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/qos-aggregated-configuration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/qos-aggregated-configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/settings | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/logical-interconnects/{id}/snmp-configuration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/snmp-configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/support-dumps | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | +|/rest/logical-interconnects/{id}/unassignedUplinkPortsForPortMonitor | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/port-monitor | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/port-monitor | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/telemetry-configurations/{tcId} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/telemetry-configurations/{tcId} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/compliance | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | +|/rest/logical-interconnects/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | | **Logical Switch Groups** | |/rest/logical-switch-groups | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/logical-switch-groups | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | @@ -338,8 +338,8 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/network-sets/{id}/withoutEthernet | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | |/rest/network-sets/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | :heavy_minus_sign: | | **OS Deployment Plans** | -|/rest/os-deployment-plans/ | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/os-deployment-plans/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/os-deployment-plans/ | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/os-deployment-plans/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **OS Deployment Servers** | |/rest/os-deployment-servers | GET | :heavy_minus_sign: | | | |/rest/os-deployment-servers | POST | :heavy_minus_sign: | | | @@ -422,41 +422,41 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/sas-logical-jbods/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |/rest/sas-logical-jbods/{id}/drives | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | **Scopes** | -|/rest/scopes | POST | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/scopes | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/{id} | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/{id} | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/{id} | DELETE | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/{id}/resource-assignments | PATCH | :heavy_minus_sign: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign:| :heavy_minus_sign: | -|/rest/scopes/resources/{resource_uri} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/resources/{resource_uri} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: | -|/rest/scopes/resources/{resource_uri} | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: | +|/rest/scopes | POST | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/{id} | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/{id} | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/{id} | DELETE | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/{id}/resource-assignments | PATCH | :heavy_minus_sign: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign:| :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/scopes/resources/{resource_uri} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/resources/{resource_uri} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: | +|/rest/scopes/resources/{resource_uri} | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: | | **Server Hardware** | -|/rest/server-hardware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/bios | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/environmentalConfiguration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/environmentalConfiguration | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | -|/rest/server-hardware/{id}/iloSsoUrl | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/javaRemoteConsoleUrl | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/mpFirmwareVersion | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/physicalServerHardware | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/powerState | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/refreshState | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/remoteConsoleUrl | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/utilization | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/*/firmware | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/{id}/firmware | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware/discovery | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: | +|/rest/server-hardware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/bios | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/environmentalConfiguration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/environmentalConfiguration | PUT | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | +|/rest/server-hardware/{id}/iloSsoUrl | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/javaRemoteConsoleUrl | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/mpFirmwareVersion | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/physicalServerHardware | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/powerState | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/refreshState | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/remoteConsoleUrl | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/utilization | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id} | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/*/firmware | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/{id}/firmware | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware/discovery | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Server Hardware Types** | -|/rest/server-hardware-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware-types/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware-types/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/server-hardware-types/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-hardware-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware-types/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware-types/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/server-hardware-types/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Server Profile Templates** | |/rest/server-profile-templates | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/server-profile-templates | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | @@ -467,23 +467,23 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/server-profile-templates/{id}/transformation | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/server-profile-templates/available-networks | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | | **Server Profiles** | -|/rest/server-profiles | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/available-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/available-servers | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/available-storage-system | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/server-profiles/available-storage-systems | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/server-profiles/available-targets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/profile-ports | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id}/compliance-preview | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id}/new-profile-template | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profiles/{id}/messages | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -|/rest/server-profiles/{id}/transformation | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/server-profiles | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/available-networks | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/available-servers | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/available-storage-system | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/server-profiles/available-storage-systems | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/server-profiles/available-targets | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/profile-ports | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id}/compliance-preview | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id}/new-profile-template | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profiles/{id}/messages | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | +|/rest/server-profiles/{id}/transformation | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | | **Storage Pools** | |/rest/storage-pools | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | |/rest/storage-pools | POST | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | diff --git a/examples/api600/storage_system.rb b/examples/api600/storage_system.rb index f950cf825..11ad24b33 100644 --- a/examples/api600/storage_system.rb +++ b/examples/api600/storage_system.rb @@ -56,10 +56,10 @@ # for StorageSystem with family StoreVirtual # options = { # credentials: { -# username: @storage_system_username, -# password: @storage_system_password +# username: @store_virtual_user, +# password: @store_virtual_password # }, -# hostname: @storage_system_ip, +# hostname: @store_virtual_ip, # family: 'StoreVirtual' # } diff --git a/examples/api600/volume.rb b/examples/api600/volume.rb index 6e3d1ddeb..0de5407d4 100644 --- a/examples/api600/volume.rb +++ b/examples/api600/volume.rb @@ -169,6 +169,7 @@ puts "\nVolume updated successfully! New name: #{item2['name']}." puts "\nRemoving a snapshot..." +item3.retrieve! item3.delete_snapshot(snapshot_name) puts "\nSnapshot removed successfully!" @@ -193,7 +194,7 @@ puts "\nExtra managed storage volume paths found: #{paths}" puts "Remove extra presentations from the specified volume on the storage system: \nURI: #{paths['uri']}" -item1.repair +item2.repair puts "\nExtra managed storage volume paths has been repaired" puts "\nRemoving all volumes created in this sample..." diff --git a/examples/shared_samples/logical_interconnect.rb b/examples/shared_samples/logical_interconnect.rb index 3cc386bca..3463637fa 100644 --- a/examples/shared_samples/logical_interconnect.rb +++ b/examples/shared_samples/logical_interconnect.rb @@ -268,7 +268,7 @@ puts "\nOperations with scopes" begin # Scope class used in this sample - scope_class = OneviewSDK.resource_named('Scope', @client.api_version) unless @client.api_version.to_i <= 200 || client.api_version.to_i >= 600 + scope_class = OneviewSDK.resource_named('Scope', @client.api_version) unless @client.api_version.to_i <= 200 || @client.api_version.to_i >= 600 # Creating scopes for this example scope_1 = scope_class.new(@client, name: 'Scope 1') scope_1.create! diff --git a/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb index 3e157a250..9b9af699b 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/logical_interconnect.rb @@ -23,7 +23,7 @@ class LogicalInterconnect < OneviewSDK::API800::C7000::LogicalInterconnect def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values: - @data['type'] ||= 'logical-interconnectV5' + @data['type'] ||= 'logical-interconnectV6' super end end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb b/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb index f1d64a528..c4d2afcd7 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/server_hardware.rb @@ -16,6 +16,16 @@ module API1000 module C7000 # Server Hardware resource implementation on API1000 C7000 class ServerHardware < OneviewSDK::API800::C7000::ServerHardware + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'server-hardware-10' + super + end end end end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb b/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb index b809d8dbd..bd4725b6a 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/server_hardware_type.rb @@ -23,7 +23,7 @@ class ServerHardwareType < OneviewSDK::API800::C7000::ServerHardwareType def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values - @data['type'] ||= 'server-hardware-type-9' + @data['type'] ||= 'server-hardware-type-10' super end end diff --git a/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb b/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb index 5cb7dc632..abe1a98c3 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/server_profile.rb @@ -23,7 +23,7 @@ class ServerProfile < OneviewSDK::API800::C7000::ServerProfile def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values - @data['type'] ||= 'ServerProfileV9' + @data['type'] ||= 'ServerProfileV10' super end end diff --git a/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb b/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb index f9175f5d5..8e089a0ae 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb @@ -16,6 +16,19 @@ module API1000 module C7000 # Storage System resource implementation for API1000 C7000 class StorageSystem < OneviewSDK::API800::C7000::StorageSystem + # Set data and save to OneView + # @param [Hash] attributes The attributes to add/change for this resource (key-value pairs) + # @raise [OneviewSDK::IncompleteResource] if the client or uri is not set + # @raise [StandardError] if the resource save fails + # @return [Resource] self + def update(attributes = {}) + set_all(attributes) + ensure_client && ensure_uri + @data.delete('type') + response = @client.rest_put(@data['uri'] + '/?force=true', { 'body' => @data }, @api_version) + @client.response_handler(response) + self + end end end end diff --git a/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb index 8bd5750fa..0fcdc81c8 100644 --- a/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb +++ b/lib/oneview-sdk/resource/api1000/synergy/logical_interconnect.rb @@ -23,7 +23,7 @@ class LogicalInterconnect < OneviewSDK::API800::Synergy::LogicalInterconnect def initialize(client, params = {}, api_ver = nil) @data ||= {} # Default values: - @data['type'] ||= 'logical-interconnectV5' + @data['type'] ||= 'logical-interconnectV6' super end end From 9c0beaa4c5ad3c0b81c4ea36c91ee3353642b8f8 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Thu, 14 Nov 2019 13:45:51 +0530 Subject: [PATCH 07/13] Resolving issue with removing snapshot as etag doesnot match --- lib/oneview-sdk/resource/api200/volume.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oneview-sdk/resource/api200/volume.rb b/lib/oneview-sdk/resource/api200/volume.rb index 2955c03e9..1d412e73b 100644 --- a/lib/oneview-sdk/resource/api200/volume.rb +++ b/lib/oneview-sdk/resource/api200/volume.rb @@ -123,7 +123,7 @@ def create_snapshot(snapshot, description = nil) # @return [true] if snapshot was created successfully def delete_snapshot(name) result = get_snapshot(name) - response = @client.rest_delete(result['uri'], { 'If-Match' => @data['eTag'] }, @api_version) + response = @client.rest_delete(result['uri'], { 'If-Match' => result['eTag'] }, @api_version) @client.response_handler(response) true end From 76551a330bd4502313680bf807d8dd6920a16dba Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Thu, 14 Nov 2019 14:01:59 +0530 Subject: [PATCH 08/13] Removing whitespaces to fix the build issue --- lib/oneview-sdk/resource/api1000/c7000/storage_system.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb b/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb index 8e089a0ae..0ce86036d 100644 --- a/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb +++ b/lib/oneview-sdk/resource/api1000/c7000/storage_system.rb @@ -24,7 +24,7 @@ class StorageSystem < OneviewSDK::API800::C7000::StorageSystem def update(attributes = {}) set_all(attributes) ensure_client && ensure_uri - @data.delete('type') + @data.delete('type') response = @client.rest_put(@data['uri'] + '/?force=true', { 'body' => @data }, @api_version) @client.response_handler(response) self From 2150659a3d0ba1e55c9486b500fab5b75ae69181 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Thu, 14 Nov 2019 14:40:17 +0530 Subject: [PATCH 09/13] Reverting back changes for removing sanphot and added documentation --- CHANGELOG.md | 10 ++- endpoints-support.md | 87 +++++++++++------------ lib/oneview-sdk/resource/api200/volume.rb | 2 +- 3 files changed, 51 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0bdf3744..0d8ae9d93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,18 @@ #### Notes This release removes the support for Ruby 2.2 and added support for Ruby 2.5. -Extends support of the SDK to OneView Rest API version 800 (OneView v4.10). -This release fixes one bug listed below. +Extends support of the SDK to OneView Rest API version 800/1000 (OneView v4.10/v4.20). +This release also fixes few bugs listed below. #### Features Supported -This release adds support to OneView Rest API version 800 for the hardware variants C7000 and Synergy to the already existing features: +This release adds support to OneView Rest API version 800/1000 for the hardware variants C7000 and Synergy to the already existing features: - Enclosure - Enclosure Group - Ethernet Network - FC Network - FCoE Network - Interconnect +- Interconnect Type - Logical Enclosure - Logical Interconnect - Logical Interconnect Group @@ -21,11 +22,14 @@ This release adds support to OneView Rest API version 800 for the hardware varia - Server Hardware - Server Hardware Types - Server Profile +- Server Profile Template - Storage Pool - Storage System - Uplink Set - Volume +- Volume Attachment - Volume Template +- OS Deployment Plan #### Bug fixes & Enhancements - [#377](https://github.com/HewlettPackard/oneview-sdk-ruby/issues/377) Travis build failed as Listen dependency does not support Ruby 2.2.x. diff --git a/endpoints-support.md b/endpoints-support.md index ee9243aed..bc88b3725 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -22,8 +22,7 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) ## HPE OneView -| Endpoints | Verb | V200 | V300 | V500 | V600 | V800 | V1000 -| --------------------------------------------------------------------------------------- | -------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | +| Endpoints | Verb | V200 | V300 | V500 | V600 | V800 | V1000 | --------------------------------------------------------------------------------------- | -------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | | **Alerts** | |/rest/alerts |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/alerts |DELETE | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | @@ -82,21 +81,21 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/enclosure-groups/{id}/script | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/enclosure-groups/{id}/script | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Enclosures** | -|/rest/enclosures | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/enclosures | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/enclosures/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/environmentalConfiguration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/environmentalConfiguration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/refreshState | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/script | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: | -|/rest/enclosures/{id}/sso | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/utilization | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/https/certificaterequest | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/https/certificaterequest | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/https/certificaterequest | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id} | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/configuration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/environmentalConfiguration | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/environmentalConfiguration | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/refreshState | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/script | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/enclosures/{id}/sso | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/utilization | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/https/certificaterequest | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/https/certificaterequest | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/https/certificaterequest | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Endpoints** | |/rest/fc-sans/endpoints | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | |/rest/fc-sans/endpoints/{id} | GET | :heavy_minus_sign: | :heavy_multiplication_x: | :heavy_multiplication_x: @@ -206,8 +205,8 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/interconnect-link-topologies | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | |/rest/interconnect-link-topologies/{id} | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | | **Interconnect Types** | -|/rest/interconnect-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/interconnect-types/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/interconnect-types | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/interconnect-types/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Interconnects** | |/rest/interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | @@ -268,11 +267,11 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/logical-interconnects | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/logical-interconnects/locations/interconnects | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | |/rest/logical-interconnects/locations/interconnects | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | -|/rest/logical-interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | -|/rest/logical-interconnects/{id}/compliance | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | +|/rest/logical-interconnects/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/logical-interconnects/{id}/compliance | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/logical-interconnects/{id}/ethernetSettings | GET | :heavy_minus_sign: | :heavy_multiplication_x: |:heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | -|/rest/logical-interconnects/{id}/ethernetSettings | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | -|/rest/logical-interconnects/{id}/firmware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |white_check_mark: | +|/rest/logical-interconnects/{id}/ethernetSettings | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/logical-interconnects/{id}/firmware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/logical-interconnects/{id}/firmware | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/logical-interconnects/{id}/forwarding-information-base | GET | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | |/rest/logical-interconnects/{id}/forwarding-information-base | POST | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |:heavy_multiplication_x: | @@ -458,14 +457,14 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/server-hardware-types/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/server-hardware-types/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | | **Server Profile Templates** | -|/rest/server-profile-templates | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates/{id}/new-profile | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates/{id}/transformation | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/server-profile-templates/available-networks | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | +|/rest/server-profile-templates | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates/{id}/new-profile | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates/{id}/transformation | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/server-profile-templates/available-networks | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | | **Server Profiles** | |/rest/server-profiles | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | |/rest/server-profiles | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | @@ -568,20 +567,20 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) | **Version** | |/rest/version | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | | | **Volumes** | -|/rest/storage-volumes | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/attachable-volumes | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/from-existing | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/from-snapshot | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/repair | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/repair | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id}/snapshots | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id}/snapshots | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id}/snapshots/{snapshotId} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | -|/rest/storage-volumes/{id}/snapshots/{snapshotId} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | +|/rest/storage-volumes | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/attachable-volumes | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/from-existing | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/from-snapshot | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/repair | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/repair | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id}/snapshots | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id}/snapshots | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id}/snapshots/{snapshotId} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-volumes/{id}/snapshots/{snapshotId} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: | diff --git a/lib/oneview-sdk/resource/api200/volume.rb b/lib/oneview-sdk/resource/api200/volume.rb index 1d412e73b..2955c03e9 100644 --- a/lib/oneview-sdk/resource/api200/volume.rb +++ b/lib/oneview-sdk/resource/api200/volume.rb @@ -123,7 +123,7 @@ def create_snapshot(snapshot, description = nil) # @return [true] if snapshot was created successfully def delete_snapshot(name) result = get_snapshot(name) - response = @client.rest_delete(result['uri'], { 'If-Match' => result['eTag'] }, @api_version) + response = @client.rest_delete(result['uri'], { 'If-Match' => @data['eTag'] }, @api_version) @client.response_handler(response) true end From 8ef493386a98820f7aaade8fb6a8ddd47a5730b2 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Fri, 15 Nov 2019 12:27:18 +0530 Subject: [PATCH 10/13] Adding unit test cases for API1000 support --- .../c7000/logical_interconnect_group_spec.rb | 16 ++++++++++ .../c7000/logical_interconnect_spec.rb | 15 ++++++++++ .../api1000/c7000/server_hardware_spec.rb | 27 +++++++++++++++++ .../c7000/server_hardware_type_spec.rb | 15 ++++++++++ .../api1000/c7000/server_profile_spec.rb | 16 ++++++++++ .../api1000/c7000/storage_system_spec.rb | 29 +++++++++++++++++++ .../resource/api1000/c7000/uplink_set_spec.rb | 16 ++++++++++ .../logical_interconnect_group_spec.rb | 16 ++++++++++ .../synergy/logical_interconnect_spec.rb | 16 ++++++++++ .../api1000/synergy/server_hardware_spec.rb | 27 +++++++++++++++++ .../synergy/server_hardware_type_spec.rb | 16 ++++++++++ .../api1000/synergy/server_profile_spec.rb | 9 ++++++ .../api1000/synergy/storage_system_spec.rb | 9 ++++++ .../api1000/synergy/uplink_set_spec.rb | 16 ++++++++++ 14 files changed, 243 insertions(+) create mode 100644 spec/unit/resource/api1000/c7000/logical_interconnect_group_spec.rb create mode 100644 spec/unit/resource/api1000/c7000/logical_interconnect_spec.rb create mode 100644 spec/unit/resource/api1000/c7000/server_hardware_spec.rb create mode 100644 spec/unit/resource/api1000/c7000/server_hardware_type_spec.rb create mode 100644 spec/unit/resource/api1000/c7000/server_profile_spec.rb create mode 100644 spec/unit/resource/api1000/c7000/storage_system_spec.rb create mode 100644 spec/unit/resource/api1000/c7000/uplink_set_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/logical_interconnect_group_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/logical_interconnect_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/server_hardware_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/server_profile_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/storage_system_spec.rb create mode 100644 spec/unit/resource/api1000/synergy/uplink_set_spec.rb diff --git a/spec/unit/resource/api1000/c7000/logical_interconnect_group_spec.rb b/spec/unit/resource/api1000/c7000/logical_interconnect_group_spec.rb new file mode 100644 index 000000000..5de6ae824 --- /dev/null +++ b/spec/unit/resource/api1000/c7000/logical_interconnect_group_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::LogicalInterconnectGroup do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::C7000::LogicalInterconnectGroup' do + expect(described_class).to be < OneviewSDK::API800::C7000::LogicalInterconnectGroup + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('logical-interconnect-groupV6') + end + end +end diff --git a/spec/unit/resource/api1000/c7000/logical_interconnect_spec.rb b/spec/unit/resource/api1000/c7000/logical_interconnect_spec.rb new file mode 100644 index 000000000..5d1fa4a16 --- /dev/null +++ b/spec/unit/resource/api1000/c7000/logical_interconnect_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::LogicalInterconnect do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::C7000::LogicalInterconnect' do + expect(described_class).to be < OneviewSDK::API800::C7000::LogicalInterconnect + end + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('logical-interconnectV6') + end + end +end diff --git a/spec/unit/resource/api1000/c7000/server_hardware_spec.rb b/spec/unit/resource/api1000/c7000/server_hardware_spec.rb new file mode 100644 index 000000000..e925964ef --- /dev/null +++ b/spec/unit/resource/api1000/c7000/server_hardware_spec.rb @@ -0,0 +1,27 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. + +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::ServerHardware do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::C7000::ServerHardware' do + expect(described_class).to be < OneviewSDK::API800::C7000::ServerHardware + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('server-hardware-10') + end + end +end diff --git a/spec/unit/resource/api1000/c7000/server_hardware_type_spec.rb b/spec/unit/resource/api1000/c7000/server_hardware_type_spec.rb new file mode 100644 index 000000000..f640835c1 --- /dev/null +++ b/spec/unit/resource/api1000/c7000/server_hardware_type_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::ServerHardwareType do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::C7000::ServerHardwareType' do + expect(described_class).to be < OneviewSDK::API800::C7000::ServerHardwareType + end + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('server-hardware-type-10') + end + end +end diff --git a/spec/unit/resource/api1000/c7000/server_profile_spec.rb b/spec/unit/resource/api1000/c7000/server_profile_spec.rb new file mode 100644 index 000000000..fdc9725ad --- /dev/null +++ b/spec/unit/resource/api1000/c7000/server_profile_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::ServerProfile do + include_context 'shared context' + + it 'inherits from API800' do + expect(described_class).to be < OneviewSDK::API800::C7000::ServerProfile + end + + describe '#initialize' do + it 'sets the type correctly' do + item = described_class.new(@client_1000, name: 'server_profile') + expect(item[:type]).to eq('ServerProfileV10') + end + end +end diff --git a/spec/unit/resource/api1000/c7000/storage_system_spec.rb b/spec/unit/resource/api1000/c7000/storage_system_spec.rb new file mode 100644 index 000000000..281b2076d --- /dev/null +++ b/spec/unit/resource/api1000/c7000/storage_system_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::StorageSystem do + include_context 'shared context' + + let(:client) { @client_1000 } + + it 'inherits from OneviewSDK::API800::C7000::StorageSystem' do + expect(described_class).to be < OneviewSDK::API800::C7000::StorageSystem + end + + describe '#update' do + it 'should call correct uri' do + item = described_class.new(client, uri: '/rest/storage-systems/UUID-1') + fake_response = FakeResponse.new + expected_uri = item['uri'] + '/?force=true' + item.data.delete('type') + expect(client).to receive(:rest_put).with(expected_uri, { 'body' => item.data }, 1000).and_return(fake_response) + item.update + end + + context 'when storage system has not uri' do + it 'should throw IncompleteResource error' do + item = described_class.new(client, name: 'without uri') + expect { item.update }.to raise_error(OneviewSDK::IncompleteResource) + end + end + end +end diff --git a/spec/unit/resource/api1000/c7000/uplink_set_spec.rb b/spec/unit/resource/api1000/c7000/uplink_set_spec.rb new file mode 100644 index 000000000..9746c8635 --- /dev/null +++ b/spec/unit/resource/api1000/c7000/uplink_set_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::C7000::UplinkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::C7000::UplinkSet' do + expect(described_class).to be < OneviewSDK::API800::C7000::UplinkSet + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('uplink-setV5') + end + end +end diff --git a/spec/unit/resource/api1000/synergy/logical_interconnect_group_spec.rb b/spec/unit/resource/api1000/synergy/logical_interconnect_group_spec.rb new file mode 100644 index 000000000..f9c570194 --- /dev/null +++ b/spec/unit/resource/api1000/synergy/logical_interconnect_group_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::LogicalInterconnectGroup do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::Synergy::LogicalInterconnectGroup' do + expect(described_class).to be < OneviewSDK::API800::Synergy::LogicalInterconnectGroup + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('logical-interconnect-groupV6') + end + end +end diff --git a/spec/unit/resource/api1000/synergy/logical_interconnect_spec.rb b/spec/unit/resource/api1000/synergy/logical_interconnect_spec.rb new file mode 100644 index 000000000..7aca4cc41 --- /dev/null +++ b/spec/unit/resource/api1000/synergy/logical_interconnect_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::LogicalInterconnect do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::Synergy::LogicalInterconnect' do + expect(described_class).to be < OneviewSDK::API800::Synergy::LogicalInterconnect + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('logical-interconnectV6') + end + end +end diff --git a/spec/unit/resource/api1000/synergy/server_hardware_spec.rb b/spec/unit/resource/api1000/synergy/server_hardware_spec.rb new file mode 100644 index 000000000..8858e411f --- /dev/null +++ b/spec/unit/resource/api1000/synergy/server_hardware_spec.rb @@ -0,0 +1,27 @@ +# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed +# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. + +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::ServerHardware do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::Synergy::ServerHardware' do + expect(described_class).to be < OneviewSDK::API800::Synergy::ServerHardware + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('server-hardware-10') + end + end +end diff --git a/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb b/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb new file mode 100644 index 000000000..9366748e7 --- /dev/null +++ b/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::ServerHardwareType do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::Synergy::ServerHardwareType' do + expect(described_class).to be < OneviewSDK::API800::Synergy::ServerHardwareType + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('server-hardware-type-10') + end + end +end diff --git a/spec/unit/resource/api1000/synergy/server_profile_spec.rb b/spec/unit/resource/api1000/synergy/server_profile_spec.rb new file mode 100644 index 000000000..6b6a505bc --- /dev/null +++ b/spec/unit/resource/api1000/synergy/server_profile_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::ServerProfile do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1000::C7000::ServerProfile' do + expect(described_class).to be < OneviewSDK::API1000::C7000::ServerProfile + end +end diff --git a/spec/unit/resource/api1000/synergy/storage_system_spec.rb b/spec/unit/resource/api1000/synergy/storage_system_spec.rb new file mode 100644 index 000000000..997127c83 --- /dev/null +++ b/spec/unit/resource/api1000/synergy/storage_system_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::StorageSystem do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1000::C7000::StorageSystem' do + expect(described_class).to be < OneviewSDK::API1000::C7000::StorageSystem + end +end diff --git a/spec/unit/resource/api1000/synergy/uplink_set_spec.rb b/spec/unit/resource/api1000/synergy/uplink_set_spec.rb new file mode 100644 index 000000000..c8b2a9f63 --- /dev/null +++ b/spec/unit/resource/api1000/synergy/uplink_set_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1000::Synergy::UplinkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API800::Synergy::UplinkSet' do + expect(described_class).to be < OneviewSDK::API800::Synergy::UplinkSet + end + + describe '#initialize' do + it 'should be initialize the instance with default values' do + item = described_class.new(@client_1000) + expect(item['type']).to eq('uplink-setV5') + end + end +end From ff71a24810a932bb036523dc747c2ca5da26bcc3 Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Fri, 15 Nov 2019 12:33:05 +0530 Subject: [PATCH 11/13] Removing extra whitespace --- spec/unit/resource/api1000/c7000/uplink_set_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/resource/api1000/c7000/uplink_set_spec.rb b/spec/unit/resource/api1000/c7000/uplink_set_spec.rb index 9746c8635..80b5d4650 100644 --- a/spec/unit/resource/api1000/c7000/uplink_set_spec.rb +++ b/spec/unit/resource/api1000/c7000/uplink_set_spec.rb @@ -6,7 +6,7 @@ it 'inherits from OneviewSDK::API800::C7000::UplinkSet' do expect(described_class).to be < OneviewSDK::API800::C7000::UplinkSet end - + describe '#initialize' do it 'should be initialize the instance with default values' do item = described_class.new(@client_1000) From e1a577a6b10f2b603b6ce9cdc2b1f7f02ebdf6fb Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Fri, 15 Nov 2019 12:45:12 +0530 Subject: [PATCH 12/13] Fixinf unit test cases --- .../resource/api1000/synergy/server_hardware.rb | 10 ++++++++++ .../api1000/synergy/server_hardware_type_spec.rb | 13 +++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb b/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb index feb8fc095..953af9509 100644 --- a/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb +++ b/lib/oneview-sdk/resource/api1000/synergy/server_hardware.rb @@ -16,6 +16,16 @@ module API1000 module Synergy # Server Hardware resource implementation on API1000 Synergy class ServerHardware < OneviewSDK::API800::Synergy::ServerHardware + # Create a resource object, associate it with a client, and set its properties. + # @param [OneviewSDK::Client] client The client object for the OneView appliance + # @param [Hash] params The options for this resource (key-value pairs) + # @param [Integer] api_ver The api version to use when interracting with this resource. + def initialize(client, params = {}, api_ver = nil) + @data ||= {} + # Default values + @data['type'] ||= 'server-hardware-10' + super + end end end end diff --git a/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb b/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb index 9366748e7..d0ad930e1 100644 --- a/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb +++ b/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb @@ -3,14 +3,7 @@ RSpec.describe OneviewSDK::API1000::Synergy::ServerHardwareType do include_context 'shared context' - it 'inherits from OneviewSDK::API800::Synergy::ServerHardwareType' do - expect(described_class).to be < OneviewSDK::API800::Synergy::ServerHardwareType - end - - describe '#initialize' do - it 'should be initialize the instance with default values' do - item = described_class.new(@client_1000) - expect(item['type']).to eq('server-hardware-type-10') - end - end + it 'inherits from OneviewSDK::API1000::C7000::ServerHardwareType' do + expect(described_class).to be < OneviewSDK::API1000::C7000::ServerHardwareType + end end From 74633857742761908b3d34f3391339ae7c278e9c Mon Sep 17 00:00:00 2001 From: Priyanka Sood Date: Fri, 15 Nov 2019 12:48:39 +0530 Subject: [PATCH 13/13] removed white space --- spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb b/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb index d0ad930e1..98e9df33d 100644 --- a/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb +++ b/spec/unit/resource/api1000/synergy/server_hardware_type_spec.rb @@ -5,5 +5,5 @@ it 'inherits from OneviewSDK::API1000::C7000::ServerHardwareType' do expect(described_class).to be < OneviewSDK::API1000::C7000::ServerHardwareType - end + end end