From 95110e0dd37dadfed246246e373bf3409467cec5 Mon Sep 17 00:00:00 2001 From: VenkateshRavula Date: Thu, 9 Jul 2020 16:05:01 +0530 Subject: [PATCH 1/2] Added api1800 support to network set and uplinkset --- CHANGELOG.md | 3 ++ endpoints-support.md | 34 +++++++-------- .../shared_samples/connection_template.rb | 28 ++++--------- examples/shared_samples/network_set.rb | 42 ++++--------------- examples/shared_samples/uplink_set.rb | 23 +++------- .../api1800/c7000/connection_template.rb | 22 ++++++++++ .../resource/api1800/c7000/network_set.rb | 22 ++++++++++ .../resource/api1800/c7000/uplink_set.rb | 22 ++++++++++ .../api1800/synergy/connection_template.rb | 22 ++++++++++ .../resource/api1800/synergy/network_set.rb | 22 ++++++++++ .../resource/api1800/synergy/uplink_set.rb | 22 ++++++++++ .../api1800/c7000/connection_template_spec.rb | 20 +++++++++ .../api1800/c7000/network_set_spec.rb | 20 +++++++++ .../resource/api1800/c7000/uplink_set_spec.rb | 20 +++++++++ .../synergy/connection_template_spec.rb | 20 +++++++++ .../api1800/synergy/network_set_spec.rb | 20 +++++++++ .../api1800/synergy/uplink_set_spec.rb | 20 +++++++++ 17 files changed, 291 insertions(+), 91 deletions(-) create mode 100644 lib/oneview-sdk/resource/api1800/c7000/connection_template.rb create mode 100644 lib/oneview-sdk/resource/api1800/c7000/network_set.rb create mode 100644 lib/oneview-sdk/resource/api1800/c7000/uplink_set.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/connection_template.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/network_set.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/uplink_set.rb create mode 100644 spec/unit/resource/api1800/c7000/connection_template_spec.rb create mode 100644 spec/unit/resource/api1800/c7000/network_set_spec.rb create mode 100644 spec/unit/resource/api1800/c7000/uplink_set_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/connection_template_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/network_set_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/uplink_set_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf7c18cf..d9ffcaf54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ This release extends support to OneView Rest API version 1800 (OneView v5.30) for the hardware variants C7000 and Synergy to the following features: #### Features supported +- Connection Template - Ethernet Network +- Network Set +- Uplink Set ## v5.13.0 diff --git a/endpoints-support.md b/endpoints-support.md index 2f966f1da..47a1357de 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -31,10 +31,10 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/alerts/{id} |DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/alerts/AlertChangeLog/{id} |DELETE | :white_check_mark: |:white_check_mark: | :white_check_mark: | | **Connection Templates** | -|/rest/connection-templates |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/connection-templates/defaultConnectionTemplate |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/connection-templates/{id} |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/connection-templates/{id} |PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/connection-templates |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/connection-templates/defaultConnectionTemplate |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/connection-templates/{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/connection-templates/{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: | | **Datacenters** | |/rest/datacenters | GET | :white_check_mark: | :white_check_mark: | |/rest/datacenters | POST | :white_check_mark: | :white_check_mark: | @@ -240,14 +240,14 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/fc-sans/managed-sans/{id}/issues | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/fc-sans/managed-sans/WWN+ | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | | **Network Sets** | -|/rest/network-sets | GET | :white_check_mark: | :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: | :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: | :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: | :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: | :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: | :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: | :white_check_mark: | -|/rest/network-sets/{id} | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |:heavy_minus_sign: | :heavy_minus_sign: | :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: | :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: | :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: | :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: | :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: | :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: | :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: | :white_check_mark: | :white_check_mark: | +|/rest/network-sets/{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: | | **OS Deployment Plans** | |/rest/os-deployment-plans/ | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/os-deployment-plans/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | @@ -442,11 +442,11 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/unmanaged-devices/{id} | DELETE | :white_check_mark: | :white_check_mark: | |/rest/unmanaged-devices/{id}/environmentalConfiguration | GET | :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: |: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: | :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: | :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: | :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: | :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: | :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: | :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: | :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: | :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: | :white_check_mark: | :white_check_mark: | | **Users** | |/rest/users | GET | :white_check_mark: | :white_check_mark: | |/rest/users | POST | :white_check_mark: | :white_check_mark: | diff --git a/examples/shared_samples/connection_template.rb b/examples/shared_samples/connection_template.rb index 26400cdaf..798c22cf3 100644 --- a/examples/shared_samples/connection_template.rb +++ b/examples/shared_samples/connection_template.rb @@ -14,24 +14,10 @@ # Example: Manage connection templates # # Supported APIs: -# - 200, 300, 500, 600, 800, 1000, 1200, 1600 +# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 -# Resources that can be created according to parameters: -# api_version = 200 & variant = any to OneviewSDK::API200::ConnectionTemplate -# api_version = 300 & variant = C7000 to OneviewSDK::API300::C7000::ConnectionTemplate -# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::ConnectionTemplate -# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::ConnectionTemplate -# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::ConnectionTemplate -# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::ConnectionTemplate -# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::ConnectionTemplate -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::ConnectionTemplate -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::ConnectionTemplate -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::ConnectionTemplate -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::ConnectionTemplate -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::ConnectionTemplate -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::ConnectionTemplate -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::ConnectionTemplate -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::ConnectionTemplate +# Supported variants: +# - C7000 and Synergy for all api versions # Resource Class used in this sample @@ -61,8 +47,8 @@ puts "\nUpdating a connection template with name='#{item['name']}" puts "\n adding value 100 for maximumBandwidth and typicalBandwidth:" -item['bandwidth']['maximumBandwidth'] += 100 -item['bandwidth']['typicalBandwidth'] += 100 +item['bandwidth']['maximumBandwidth'] -= 100 +item['bandwidth']['typicalBandwidth'] -= 100 item.update item.retrieve! puts "\nConnection template with name='#{item['name']}' bandwidth specification changed:" @@ -70,8 +56,8 @@ puts "(- typicalBandwidth: #{item['bandwidth']['typicalBandwidth']})\n" puts "\nReturnig to original state." -item['bandwidth']['maximumBandwidth'] -= 100 -item['bandwidth']['typicalBandwidth'] -= 100 +item['bandwidth']['maximumBandwidth'] += 100 +item['bandwidth']['typicalBandwidth'] += 100 item.update item.retrieve! puts "\nConnection template with name='#{item['name']}' returned to original state:" diff --git a/examples/shared_samples/network_set.rb b/examples/shared_samples/network_set.rb index 00148be89..035f0cc1a 100644 --- a/examples/shared_samples/network_set.rb +++ b/examples/shared_samples/network_set.rb @@ -13,43 +13,15 @@ # Example: Create/Update/Delete networks set # NOTE: This will create a network set named 'NetworkSet_1', update it and then delete it. -# It's necessary an ethernet network created. +# PRE-REQUISITE:Tagged ethernet networks should be created. # # Supported APIs: -# - API200 for C7000 -# - API300 for C7000 -# - API300 for Synergy -# - API500 for C7000 -# - API500 for Synergy -# - API600 for C7000 -# - API600 for Synergy -# - API800 for C7000 -# - API800 for Synergy -# - API1000 for C7000 -# - API1000 for Synergy -# - API1200 for C7000 -# - API1200 for Synergy -# - API1600 for C7000 -# - API1600 for Synergy - -# Resources that can be created according to parameters: -# api_version = 200 & variant = any to OneviewSDK::API200::NetworkSet -# api_version = 300 & variant = C7000 to OneviewSDK::API300::C7000::NetworkSet -# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::NetworkSet -# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::NetworkSet -# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::NetworkSet -# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::NetworkSet -# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::NetworkSet -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::NetworkSet -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::NetworkSet -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::NetworkSet -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::NetworkSet -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::NetworkSet -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::NetworkSet -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::NetworkSet -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::NetworkSet -# -# +# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 + +# Supported variants: +# - C7000 and Synergy for all api versions + + # Resource Class used in this sample network_set_class = OneviewSDK.resource_named('NetworkSet', @client.api_version) diff --git a/examples/shared_samples/uplink_set.rb b/examples/shared_samples/uplink_set.rb index 5751506db..462a481cf 100644 --- a/examples/shared_samples/uplink_set.rb +++ b/examples/shared_samples/uplink_set.rb @@ -17,25 +17,12 @@ # NOTE 3: To add an ethernet network, the interconnect must support ethernet network. # # Supported APIs: -# - 200, 300, 500, 600, 800, 1000, 1200, 1600 +# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 + +# Supported variants: +# - C7000 and Synergy for all api versions + -# Resources that can be created according to parameters: -# api_version = 200 & variant = any to OneviewSDK::API200::UplinkSet -# api_version = 300 & variant = C7000 to OneviewSDK::API300::C7000::UplinkSet -# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::UplinkSet -# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::UplinkSet -# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::UplinkSet -# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::UplinkSet -# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::UplinkSet -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::UplinkSet -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::UplinkSet -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::UplinkSet -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::UplinkSet -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::UplinkSet -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::UplinkSet -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::UplinkSet -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::UplinkSet -# # Resource Class used in this sample uplink_set_class = OneviewSDK.resource_named('UplinkSet', @client.api_version) ethernet_class = OneviewSDK.resource_named('EthernetNetwork', @client.api_version) diff --git a/lib/oneview-sdk/resource/api1800/c7000/connection_template.rb b/lib/oneview-sdk/resource/api1800/c7000/connection_template.rb new file mode 100644 index 000000000..44d727c55 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/connection_template.rb @@ -0,0 +1,22 @@ +# (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 '../../api1600/c7000/connection_template' + +module OneviewSDK + module API1800 + module C7000 + # Connection template resource implementation for API1800 C7000 + class ConnectionTemplate < OneviewSDK::API1600::C7000::ConnectionTemplate + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/c7000/network_set.rb b/lib/oneview-sdk/resource/api1800/c7000/network_set.rb new file mode 100644 index 000000000..45d856892 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/network_set.rb @@ -0,0 +1,22 @@ +# (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 '../../api1600/c7000/network_set' + +module OneviewSDK + module API1800 + module C7000 + # Network set resource implementation for API1800 C7000 + class NetworkSet < OneviewSDK::API1600::C7000::NetworkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/c7000/uplink_set.rb b/lib/oneview-sdk/resource/api1800/c7000/uplink_set.rb new file mode 100644 index 000000000..6ddb11362 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/uplink_set.rb @@ -0,0 +1,22 @@ +# (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 '../../api1600/c7000/uplink_set' + +module OneviewSDK + module API1800 + module C7000 + # Uplink set resource implementation for API1800 C7000 + class UplinkSet < OneviewSDK::API1600::C7000::UplinkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/connection_template.rb b/lib/oneview-sdk/resource/api1800/synergy/connection_template.rb new file mode 100644 index 000000000..9700d27ba --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/connection_template.rb @@ -0,0 +1,22 @@ +# (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 '../../api1600/synergy/connection_template' + +module OneviewSDK + module API1800 + module Synergy + # Connection template resource implementation for API1800 Synergy + class ConnectionTemplate < OneviewSDK::API1600::Synergy::ConnectionTemplate + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/network_set.rb b/lib/oneview-sdk/resource/api1800/synergy/network_set.rb new file mode 100644 index 000000000..802f2fe88 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/network_set.rb @@ -0,0 +1,22 @@ +# (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 '../../api1600/c7000/network_set' + +module OneviewSDK + module API1800 + module Synergy + # Network set resource implementation for API1800 Synergy + class NetworkSet < OneviewSDK::API1600::C7000::NetworkSet + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/uplink_set.rb b/lib/oneview-sdk/resource/api1800/synergy/uplink_set.rb new file mode 100644 index 000000000..850215f5d --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/uplink_set.rb @@ -0,0 +1,22 @@ +# (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 '../../api1600/synergy/uplink_set' + +module OneviewSDK + module API1800 + module Synergy + # Uplink set resource implementation for API1800 Synergy + class UplinkSet < OneviewSDK::API1600::Synergy::UplinkSet + end + end + end +end diff --git a/spec/unit/resource/api1800/c7000/connection_template_spec.rb b/spec/unit/resource/api1800/c7000/connection_template_spec.rb new file mode 100644 index 000000000..eef019efe --- /dev/null +++ b/spec/unit/resource/api1800/c7000/connection_template_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::API1800::C7000::ConnectionTemplate do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::ConnectionTemplate' do + expect(described_class).to be < OneviewSDK::API1600::C7000::ConnectionTemplate + end +end diff --git a/spec/unit/resource/api1800/c7000/network_set_spec.rb b/spec/unit/resource/api1800/c7000/network_set_spec.rb new file mode 100644 index 000000000..1aa9c412c --- /dev/null +++ b/spec/unit/resource/api1800/c7000/network_set_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::API1800::C7000::NetworkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::NetworkSet' do + expect(described_class).to be < OneviewSDK::API1600::C7000::NetworkSet + end +end diff --git a/spec/unit/resource/api1800/c7000/uplink_set_spec.rb b/spec/unit/resource/api1800/c7000/uplink_set_spec.rb new file mode 100644 index 000000000..b453634d0 --- /dev/null +++ b/spec/unit/resource/api1800/c7000/uplink_set_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::API1800::C7000::UplinkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::UplinkSet' do + expect(described_class).to be < OneviewSDK::API1600::C7000::UplinkSet + end +end diff --git a/spec/unit/resource/api1800/synergy/connection_template_spec.rb b/spec/unit/resource/api1800/synergy/connection_template_spec.rb new file mode 100644 index 000000000..f5f738673 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/connection_template_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::API1800::Synergy::ConnectionTemplate do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::Synergy::ConnectionTemplate' do + expect(described_class).to be < OneviewSDK::API1600::Synergy::ConnectionTemplate + end +end diff --git a/spec/unit/resource/api1800/synergy/network_set_spec.rb b/spec/unit/resource/api1800/synergy/network_set_spec.rb new file mode 100644 index 000000000..b771ecb82 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/network_set_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::API1800::Synergy::NetworkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::NetworkSet' do + expect(described_class).to be < OneviewSDK::API1600::C7000::NetworkSet + end +end diff --git a/spec/unit/resource/api1800/synergy/uplink_set_spec.rb b/spec/unit/resource/api1800/synergy/uplink_set_spec.rb new file mode 100644 index 000000000..f4483033d --- /dev/null +++ b/spec/unit/resource/api1800/synergy/uplink_set_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::API1800::Synergy::UplinkSet do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::Synergy::UplinkSet' do + expect(described_class).to be < OneviewSDK::API1600::Synergy::UplinkSet + end +end From e0a1d7e6114ab0c289e051ca7d6d3381adb48bcf Mon Sep 17 00:00:00 2001 From: VenkateshRavula Date: Fri, 10 Jul 2020 10:57:52 +0530 Subject: [PATCH 2/2] incorporate review comments --- examples/shared_samples/connection_template.rb | 2 +- lib/oneview-sdk/resource/api1800/synergy/network_set.rb | 4 ++-- spec/unit/resource/api1800/synergy/network_set_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/shared_samples/connection_template.rb b/examples/shared_samples/connection_template.rb index 798c22cf3..4bb904dde 100644 --- a/examples/shared_samples/connection_template.rb +++ b/examples/shared_samples/connection_template.rb @@ -46,7 +46,7 @@ puts "(- typicalBandwidth: #{item['bandwidth']['typicalBandwidth']})\n" puts "\nUpdating a connection template with name='#{item['name']}" -puts "\n adding value 100 for maximumBandwidth and typicalBandwidth:" +puts "\n Reducing value 100 for maximumBandwidth and typicalBandwidth:" item['bandwidth']['maximumBandwidth'] -= 100 item['bandwidth']['typicalBandwidth'] -= 100 item.update diff --git a/lib/oneview-sdk/resource/api1800/synergy/network_set.rb b/lib/oneview-sdk/resource/api1800/synergy/network_set.rb index 802f2fe88..b528a464e 100644 --- a/lib/oneview-sdk/resource/api1800/synergy/network_set.rb +++ b/lib/oneview-sdk/resource/api1800/synergy/network_set.rb @@ -9,13 +9,13 @@ # CONDITIONS OF ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -require_relative '../../api1600/c7000/network_set' +require_relative '../../api1800/c7000/network_set' module OneviewSDK module API1800 module Synergy # Network set resource implementation for API1800 Synergy - class NetworkSet < OneviewSDK::API1600::C7000::NetworkSet + class NetworkSet < OneviewSDK::API1800::C7000::NetworkSet end end end diff --git a/spec/unit/resource/api1800/synergy/network_set_spec.rb b/spec/unit/resource/api1800/synergy/network_set_spec.rb index b771ecb82..6d57753bb 100644 --- a/spec/unit/resource/api1800/synergy/network_set_spec.rb +++ b/spec/unit/resource/api1800/synergy/network_set_spec.rb @@ -14,7 +14,7 @@ RSpec.describe OneviewSDK::API1800::Synergy::NetworkSet do include_context 'shared context' - it 'inherits from OneviewSDK::API1600::C7000::NetworkSet' do - expect(described_class).to be < OneviewSDK::API1600::C7000::NetworkSet + it 'inherits from OneviewSDK::API1800::C7000::NetworkSet' do + expect(described_class).to be < OneviewSDK::API1800::C7000::NetworkSet end end