diff --git a/CHANGELOG.md b/CHANGELOG.md index 5322aa42a..fdf2051cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,9 @@ This release extends support to OneView Rest API version 2000 (OneView v5.40) fo - Firmware Driver - Hypervisor Cluster Profile - Hypervisor Manager +- LIG Uplink Set - Logical Enclosure +- Logical Interconnect Group - Network Set - OS Deployment Plan - Scope diff --git a/endpoints-support.md b/endpoints-support.md index ad21e4954..e8c8236f5 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -180,14 +180,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: | :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: | :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: | :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: | :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: | :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: | :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: | :white_check_mark: | :white_check_mark: | -|/rest/logical-interconnect-groups/{id} | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |: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: | :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: | :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: | :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: | :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: | :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: | :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: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/logical-interconnect-groups/{id} | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | :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: | :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: | :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: |:white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/logical-interconnects/locations/interconnects | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | diff --git a/examples/shared_samples/logical_interconnect_group.rb b/examples/shared_samples/logical_interconnect_group.rb index 5631952ab..c6c6c12cd 100644 --- a/examples/shared_samples/logical_interconnect_group.rb +++ b/examples/shared_samples/logical_interconnect_group.rb @@ -1,4 +1,4 @@ -# (C) Copyright 2017 Hewlett Packard Enterprise Development LP +# (C) Copyright 2020 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. @@ -23,10 +23,12 @@ # for example, if api_version = 800 & variant = C7000 then, resource that can be created will be in form # OneviewSDK::API800::C7000::LogicalInterconnectGroup -# Resource Class used in this sample -lig_class = OneviewSDK.resource_named('LogicalInterconnectGroup', @client.api_version) +# NOTE: Set the variant type before running example +variant = 'Synergy' +# variant = OneviewSDK.const_get("API#{@client.api_version}").variant unless @client.api_version < 300 -variant = OneviewSDK.const_get("API#{@client.api_version}").variant unless @client.api_version < 300 +# Resource Class used in this sample +lig_class = OneviewSDK.resource_named('LogicalInterconnectGroup', @client.api_version, variant) # Ethernet network class used in this sample ethernet_class = OneviewSDK.resource_named('EthernetNetwork', @client.api_version) @@ -118,6 +120,7 @@ if variant == 'Synergy' lig['redundancyType'] = 'Redundant' lig['interconnectBaySet'] = 3 + lig['enclosureType'] = 'SY12000' # Adds the following interconnects to the bays 3 and 6 with an Interconnect Type, respectively lig.add_interconnect(3, VIRTUAL_CONNECT_SE_40_SYNERGY) @@ -161,6 +164,7 @@ puts "#{type} was updated successfully:" puts lig.data +puts eth01['uri'] if variant == 'Synergy' puts "\nAdding an internal network with uri = #{eth01['uri']}" lig.retrieve! diff --git a/lib/oneview-sdk/resource/api2000/c7000/lig_uplink_set.rb b/lib/oneview-sdk/resource/api2000/c7000/lig_uplink_set.rb new file mode 100644 index 000000000..094710d8f --- /dev/null +++ b/lib/oneview-sdk/resource/api2000/c7000/lig_uplink_set.rb @@ -0,0 +1,21 @@ +# (C) Copyright 2020 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 '../../api1800/c7000/lig_uplink_set' + +module OneviewSDK + module API2000 + module C7000 + class LIGUplinkSet < OneviewSDK::API1800::C7000::LIGUplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api2000/c7000/logical_interconnect_group.rb b/lib/oneview-sdk/resource/api2000/c7000/logical_interconnect_group.rb new file mode 100644 index 000000000..5ff09586e --- /dev/null +++ b/lib/oneview-sdk/resource/api2000/c7000/logical_interconnect_group.rb @@ -0,0 +1,25 @@ +# (C) Copyright 2020 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 '../../api1800/c7000/logical_interconnect_group' + +module OneviewSDK + module API2000 + module C7000 + # Logical interconnect group resource implementation on API2000 C7000 + class LogicalInterconnectGroup < OneviewSDK::API1800::C7000::LogicalInterconnectGroup + def self.api_version + 2000 + end + end + end + end +end diff --git a/lib/oneview-sdk/resource/api2000/synergy/lig_uplink_set.rb b/lib/oneview-sdk/resource/api2000/synergy/lig_uplink_set.rb new file mode 100644 index 000000000..974ea98dd --- /dev/null +++ b/lib/oneview-sdk/resource/api2000/synergy/lig_uplink_set.rb @@ -0,0 +1,21 @@ +# (C) Copyright 2020 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 '../../api1800/synergy/lig_uplink_set' + +module OneviewSDK + module API2000 + module Synergy + class LIGUplinkSet < OneviewSDK::API1800::Synergy::LIGUplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api2000/synergy/logical_interconnect_group.rb b/lib/oneview-sdk/resource/api2000/synergy/logical_interconnect_group.rb new file mode 100644 index 000000000..c747c2065 --- /dev/null +++ b/lib/oneview-sdk/resource/api2000/synergy/logical_interconnect_group.rb @@ -0,0 +1,25 @@ +# (C) Copyright 2020 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 '../../api1800/synergy/logical_interconnect_group' + +module OneviewSDK + module API2000 + module Synergy + # Logical interconnect group resource implementation for API2000 Synergy + class LogicalInterconnectGroup < OneviewSDK::API1800::Synergy::LogicalInterconnectGroup + def self.api_version + 2000 + end + end + end + end +end diff --git a/spec/unit/resource/api2000/c7000/lig_uplink_set.rb b/spec/unit/resource/api2000/c7000/lig_uplink_set.rb new file mode 100644 index 000000000..bd7eb7adf --- /dev/null +++ b/spec/unit/resource/api2000/c7000/lig_uplink_set.rb @@ -0,0 +1,20 @@ +# (C) Copyright 2020 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::API2000::C7000::LIGUplinkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1800::C7000::LIGUplinkSet' do + expect(described_class).to be < OneviewSDK::API1800::C7000::LIGUplinkSet + end +end diff --git a/spec/unit/resource/api2000/c7000/logical_interconnect_group_spec.rb b/spec/unit/resource/api2000/c7000/logical_interconnect_group_spec.rb new file mode 100644 index 000000000..f42d8ce62 --- /dev/null +++ b/spec/unit/resource/api2000/c7000/logical_interconnect_group_spec.rb @@ -0,0 +1,20 @@ +# (C) Copyright 2020 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::API2000::C7000::LogicalInterconnectGroup do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1800::C7000::LogicalInterconnectGroup' do + expect(described_class).to be < OneviewSDK::API1800::C7000::LogicalInterconnectGroup + end +end diff --git a/spec/unit/resource/api2000/synergy/lig_uplink_set.rb b/spec/unit/resource/api2000/synergy/lig_uplink_set.rb new file mode 100644 index 000000000..b34a96e54 --- /dev/null +++ b/spec/unit/resource/api2000/synergy/lig_uplink_set.rb @@ -0,0 +1,20 @@ +# (C) Copyright 2020 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::API2000::Synergy::LIGUplinkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1800::Synergy::LIGUplinkSet' do + expect(described_class).to be < OneviewSDK::API1800::Synergy::LIGUplinkSet + end +end diff --git a/spec/unit/resource/api2000/synergy/logical_interconnect_group_spec.rb b/spec/unit/resource/api2000/synergy/logical_interconnect_group_spec.rb new file mode 100644 index 000000000..a58b238a7 --- /dev/null +++ b/spec/unit/resource/api2000/synergy/logical_interconnect_group_spec.rb @@ -0,0 +1,20 @@ +# (C) Copyright 2020 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::API2000::Synergy::LogicalInterconnectGroup do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1800::Synergy::LogicalInterconnectGroup' do + expect(described_class).to be < OneviewSDK::API1800::Synergy::LogicalInterconnectGroup + end +end