From 95110e0dd37dadfed246246e373bf3409467cec5 Mon Sep 17 00:00:00 2001 From: VenkateshRavula Date: Thu, 9 Jul 2020 16:05:01 +0530 Subject: [PATCH 01/10] 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 02/10] 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 From c7216c41b1275ce92d27a4a27ce019befd1d45c8 Mon Sep 17 00:00:00 2001 From: yuvirani Date: Wed, 15 Jul 2020 16:15:49 +0530 Subject: [PATCH 03/10] API1800 support for Enclosure and EG --- CHANGELOG.md | 2 + endpoints-support.md | 44 +++++++++---------- examples/shared_samples/enclosure.rb | 22 ++-------- examples/shared_samples/enclosure_group.rb | 36 +++++++-------- .../resource/api1800/c7000/enclosure.rb | 22 ++++++++++ .../resource/api1800/c7000/enclosure_group.rb | 22 ++++++++++ .../resource/api1800/synergy/enclosure.rb | 22 ++++++++++ .../api1800/synergy/enclosure_group.rb | 22 ++++++++++ .../api1800/c7000/enclosure_group_spec.rb | 10 +++++ .../resource/api1800/c7000/enclosure_spec.rb | 9 ++++ .../api1800/synergy/enclosure_group_spec.rb | 10 +++++ .../api1800/synergy/enclosure_spec.rb | 9 ++++ 12 files changed, 171 insertions(+), 59 deletions(-) create mode 100644 lib/oneview-sdk/resource/api1800/c7000/enclosure.rb create mode 100644 lib/oneview-sdk/resource/api1800/c7000/enclosure_group.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/enclosure.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/enclosure_group.rb create mode 100644 spec/unit/resource/api1800/c7000/enclosure_group_spec.rb create mode 100644 spec/unit/resource/api1800/c7000/enclosure_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/enclosure_group_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/enclosure_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf7c18cf..b46eda46b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This release extends support to OneView Rest API version 1800 (OneView v5.30) fo #### Features supported - Ethernet Network +- Enclosure +- Enclosure Group ## v5.13.0 diff --git a/endpoints-support.md b/endpoints-support.md index 2f966f1da..34f40922c 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -50,29 +50,29 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/drive-enclosures/{id}/port-map | GET | :white_check_mark: | :white_check_mark: | |/rest/drive-enclosures/{id}/refreshState | PUT | :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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |:white_check_mark: |:white_check_mark: | +|/rest/enclosure-groups/{id}/script | GET | :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/enclosure-groups/{id}/script | PUT | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | | **Enclosures** | -|/rest/enclosures | GET | :white_check_mark: | :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: |:white_check_mark: | -|/rest/enclosures/{id} | GET | :white_check_mark: | :white_check_mark: | :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: |: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: |: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: |: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: |: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: |: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: |:white_check_mark: | -|/rest/enclosures/{id}/script | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |: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: |: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: |:white_check_mark: | -|/rest/enclosures/{id}/https/certificaterequest | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/https/certificaterequest | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/enclosures/{id}/https/certificaterequest | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/script | GET | :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/enclosures/{id}/sso | GET | :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/enclosures/{id}/utilization | 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/enclosures/{id}/https/certificaterequest | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/https/certificaterequest | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/https/certificaterequest | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | | **Ethernet Networks** | |/rest/ethernet-networks | 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/ethernet-networks | 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: | diff --git a/examples/shared_samples/enclosure.rb b/examples/shared_samples/enclosure.rb index 267d8d496..ad09c1de9 100644 --- a/examples/shared_samples/enclosure.rb +++ b/examples/shared_samples/enclosure.rb @@ -16,25 +16,11 @@ # It will create a bulk of ethernet networks and then delete them. # # Supported APIs: -# - 200, 300, 500, 600 - -# Resources that can be created according to parameters: -# api_version = 200 & variant = any to OneviewSDK::API200::Enclosure -# api_version = 300 & variant = C7000 to enclosure_class -# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::Enclosure -# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::Enclosure -# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::Enclosure -# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::Enclosure -# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::Enclosure -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::Enclosure -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::Enclosure -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::Enclosure -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::Enclosure -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::Enclosure -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::Enclosure -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::Enclosure -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::Enclosure +# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800 +# Supported Variants: +# C7000 and Synergy for all API versions +# # Resource Class used in this sample enclosure_class = OneviewSDK.resource_named('Enclosure', @client.api_version) diff --git a/examples/shared_samples/enclosure_group.rb b/examples/shared_samples/enclosure_group.rb index cf3e3e60b..b94e81ba7 100644 --- a/examples/shared_samples/enclosure_group.rb +++ b/examples/shared_samples/enclosure_group.rb @@ -15,24 +15,10 @@ # NOTE: This will create an enclosure group named 'OneViewSDK Test Enclosure Group', then delete it. # # Supported APIs: -# - 200, 300, 500, 600, 800, 1200, and 1600. - -# Resources that can be created according to parameters: -# api_version = 200 & variant = any to OneviewSDK::API200::EnclosureGroup -# api_version = 300 & variant = C7000 to encl_group_class -# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::EnclosureGroup -# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::EnclosureGroup -# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::EnclosureGroup -# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::EnclosureGroup -# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::EnclosureGroup -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::EnclosureGroup -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::EnclosureGroup -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::EnclosureGroup -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::EnclosureGroup -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::EnclosureGroup -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::EnclosureGroup -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::EnclosureGroup -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::EnclosureGroup +# - 200, 300, 500, 600, 800, 1200, 1600 and 1800. + +# Supported Variants: +# C7000 and Synergy for all API versions # Resource Class used in this sample encl_group_class = OneviewSDK.resource_named('EnclosureGroup', @client.api_version) @@ -43,7 +29,19 @@ type = 'enclosure group' encl_group_name = 'OneViewSDK Test Enclosure Group' -item = encl_group_class.new(@client, name: encl_group_name) +interconnect_bay_mapping = [ + { interconnectBay: 3, logicalInterconnectGroupUri: '/rest/logical-interconnect-groups/6aabd433-7ed0-4c59-963c-c3f36bbd4f85' }, + { interconnectBay: 6, logicalInterconnectGroupUri: '/rest/logical-interconnect-groups/6aabd433-7ed0-4c59-963c-c3f36bbd4f85' } +] + +options = { + name: encl_group_name, + ipAddressingMode: 'External', + enclosureCount: 1, + interconnectBayMappings: interconnect_bay_mapping +} + +item = encl_group_class.new(@client, options) lig = lig_class.get_all(@client).first item.add_logical_interconnect_group(lig) diff --git a/lib/oneview-sdk/resource/api1800/c7000/enclosure.rb b/lib/oneview-sdk/resource/api1800/c7000/enclosure.rb new file mode 100644 index 000000000..b2a2a50ce --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/enclosure.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/enclosure' + +module OneviewSDK + module API1800 + module C7000 + # Enclosure resource implementation for API1800 C7000 + class Enclosure < OneviewSDK::API1600::C7000::Enclosure + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/c7000/enclosure_group.rb b/lib/oneview-sdk/resource/api1800/c7000/enclosure_group.rb new file mode 100644 index 000000000..afb64808f --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/enclosure_group.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/enclosure_group' + +module OneviewSDK + module API1800 + module C7000 + # Enclosure group resource implementation on API1800 C7000 + class EnclosureGroup < OneviewSDK::API1600::C7000::EnclosureGroup + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/enclosure.rb b/lib/oneview-sdk/resource/api1800/synergy/enclosure.rb new file mode 100644 index 000000000..6b5f3d572 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/enclosure.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/enclosure' + +module OneviewSDK + module API1800 + module Synergy + # Enclosure resource implementation for API1800 Synergy + class Enclosure < OneviewSDK::API1600::Synergy::Enclosure + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/enclosure_group.rb b/lib/oneview-sdk/resource/api1800/synergy/enclosure_group.rb new file mode 100644 index 000000000..c8ed8576d --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/enclosure_group.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/enclosure_group' + +module OneviewSDK + module API1800 + module Synergy + # Enclosure group resource implementation on API1800 Synergy + class EnclosureGroup < OneviewSDK::API1600::Synergy::EnclosureGroup + end + end + end +end diff --git a/spec/unit/resource/api1800/c7000/enclosure_group_spec.rb b/spec/unit/resource/api1800/c7000/enclosure_group_spec.rb new file mode 100644 index 000000000..1a6d6186e --- /dev/null +++ b/spec/unit/resource/api1800/c7000/enclosure_group_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +klass = OneviewSDK::API1800::C7000::EnclosureGroup +RSpec.describe klass do + include_context 'shared context' + + it 'inherits from API1600' do + expect(described_class).to be < OneviewSDK::API1600::C7000::EnclosureGroup + end +end diff --git a/spec/unit/resource/api1800/c7000/enclosure_spec.rb b/spec/unit/resource/api1800/c7000/enclosure_spec.rb new file mode 100644 index 000000000..c78b063c2 --- /dev/null +++ b/spec/unit/resource/api1800/c7000/enclosure_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1600::C7000::Enclosure do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1200::C7000::Enclosure' do + expect(described_class).to be < OneviewSDK::API1200::C7000::Enclosure + end +end diff --git a/spec/unit/resource/api1800/synergy/enclosure_group_spec.rb b/spec/unit/resource/api1800/synergy/enclosure_group_spec.rb new file mode 100644 index 000000000..77d7909a4 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/enclosure_group_spec.rb @@ -0,0 +1,10 @@ +require 'spec_helper' + +klass = OneviewSDK::API1800::Synergy::EnclosureGroup +RSpec.describe klass do + include_context 'shared context' + + it 'inherits from API1600' do + expect(described_class).to be < OneviewSDK::API1600::Synergy::EnclosureGroup + end +end diff --git a/spec/unit/resource/api1800/synergy/enclosure_spec.rb b/spec/unit/resource/api1800/synergy/enclosure_spec.rb new file mode 100644 index 000000000..d3a8b8de6 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/enclosure_spec.rb @@ -0,0 +1,9 @@ +require 'spec_helper' + +RSpec.describe OneviewSDK::API1600::Synergy::Enclosure do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1200::Synergy::Enclosure' do + expect(described_class).to be < OneviewSDK::API1200::Synergy::Enclosure + end +end From e7d77f8ce1735e4c13475a21e7dc974325f4e878 Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 12:06:38 +0530 Subject: [PATCH 04/10] incorporating review comments --- endpoints-support.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/endpoints-support.md b/endpoints-support.md index 46a2721a9..5d5f5d36a 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -55,8 +55,8 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/enclosure-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/enclosure-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/enclosure-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/enclosure-groups/{id}/script | GET | :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/enclosure-groups/{id}/script | PUT | :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/enclosure-groups/{id}/script | 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/enclosure-groups/{id}/script | 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: | | **Enclosures** | |/rest/enclosures | 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/enclosures | 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: | @@ -67,8 +67,8 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/enclosures/{id}/environmentalConfiguration | 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/enclosures/{id}/environmentalConfiguration | 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/enclosures/{id}/refreshState | 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/enclosures/{id}/script | GET | :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/enclosures/{id}/sso | GET | :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/enclosures/{id}/script | GET | :white_check_mark: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/enclosures/{id}/sso | 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/enclosures/{id}/utilization | 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/enclosures/{id}/https/certificaterequest | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | |/rest/enclosures/{id}/https/certificaterequest | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | From 69f887a7428e8c76aebe2dd7d854b6d76ac7eb1b Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 12:22:09 +0530 Subject: [PATCH 05/10] Fix versions in spec files --- endpoints-support.md | 2 +- spec/unit/resource/api1800/c7000/enclosure_spec.rb | 6 +++--- spec/unit/resource/api1800/synergy/enclosure_spec.rb | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/endpoints-support.md b/endpoints-support.md index 5d5f5d36a..1bf4cda23 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -67,7 +67,7 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/enclosures/{id}/environmentalConfiguration | 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/enclosures/{id}/environmentalConfiguration | 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/enclosures/{id}/refreshState | 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/enclosures/{id}/script | GET | :white_check_mark: | :heavy_minus_sign: | :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: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :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: |: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: |:white_check_mark: |:white_check_mark: | |/rest/enclosures/{id}/https/certificaterequest | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | diff --git a/spec/unit/resource/api1800/c7000/enclosure_spec.rb b/spec/unit/resource/api1800/c7000/enclosure_spec.rb index c78b063c2..13640c813 100644 --- a/spec/unit/resource/api1800/c7000/enclosure_spec.rb +++ b/spec/unit/resource/api1800/c7000/enclosure_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -RSpec.describe OneviewSDK::API1600::C7000::Enclosure do +RSpec.describe OneviewSDK::API1800::C7000::Enclosure do include_context 'shared context' - it 'inherits from OneviewSDK::API1200::C7000::Enclosure' do - expect(described_class).to be < OneviewSDK::API1200::C7000::Enclosure + it 'inherits from OneviewSDK::API1600::C7000::Enclosure' do + expect(described_class).to be < OneviewSDK::API1600::C7000::Enclosure end end diff --git a/spec/unit/resource/api1800/synergy/enclosure_spec.rb b/spec/unit/resource/api1800/synergy/enclosure_spec.rb index d3a8b8de6..6dd8c5643 100644 --- a/spec/unit/resource/api1800/synergy/enclosure_spec.rb +++ b/spec/unit/resource/api1800/synergy/enclosure_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -RSpec.describe OneviewSDK::API1600::Synergy::Enclosure do +RSpec.describe OneviewSDK::API1800::Synergy::Enclosure do include_context 'shared context' - it 'inherits from OneviewSDK::API1200::Synergy::Enclosure' do - expect(described_class).to be < OneviewSDK::API1200::Synergy::Enclosure + it 'inherits from OneviewSDK::API1600::Synergy::Enclosure' do + expect(described_class).to be < OneviewSDK::API1600::Synergy::Enclosure end end From eccbe595bec4cea0e68271d8e5374e443e49ec25 Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 12:50:56 +0530 Subject: [PATCH 06/10] API1800 support for Storage resources --- CHANGELOG.md | 2 ++ endpoints-support.md | 34 +++++++++---------- examples/shared_samples/storage_pool.rb | 18 +++------- examples/shared_samples/storage_system.rb | 14 +++----- .../resource/api1800/c7000/storage_pool.rb | 22 ++++++++++++ .../resource/api1800/c7000/storage_system.rb | 22 ++++++++++++ .../resource/api1800/synergy/storage_pool.rb | 22 ++++++++++++ .../api1800/synergy/storage_system.rb | 22 ++++++++++++ .../api1800/c7000/storage_pool_spec.rb | 20 +++++++++++ .../api1800/c7000/storage_system_spec.rb | 20 +++++++++++ .../api1800/synergy/storage_pool_spec.rb | 20 +++++++++++ .../api1800/synergy/storage_system_spec.rb | 20 +++++++++++ 12 files changed, 197 insertions(+), 39 deletions(-) create mode 100644 lib/oneview-sdk/resource/api1800/c7000/storage_pool.rb create mode 100644 lib/oneview-sdk/resource/api1800/c7000/storage_system.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/storage_pool.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/storage_system.rb create mode 100644 spec/unit/resource/api1800/c7000/storage_pool_spec.rb create mode 100644 spec/unit/resource/api1800/c7000/storage_system_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/storage_pool_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/storage_system_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f387e25b..aa2fc43ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This release extends support to OneView Rest API version 1800 (OneView v5.30) fo - FCOE Network - Network Set - Scope +- Storage System +- Storage Pool - Uplink Set ## v5.13.0 diff --git a/endpoints-support.md b/endpoints-support.md index e2f86d75f..7b4193272 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -387,24 +387,24 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/server-profiles/{id}/messages | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |: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: |: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: |:white_check_mark: | -|/rest/storage-pools | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | -|/rest/storage-pools/reachable-storage-pools | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :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: |:white_check_mark: | -|/rest/storage-pools/{id} | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |: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: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-pools/reachable-storage-pools | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |: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: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |:white_check_mark: | -|/rest/storage-systems/{id}/managedPorts | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | -|/rest/storage-systems/{id}/managedPorts/{portId} | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | -|/rest/storage-systems/{id}/reachable-ports | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/storage-systems/{id}/templates | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |: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: |: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: |: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: |: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: |: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: |: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: |: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: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id}/managedPorts | GET | :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/storage-systems/{id}/managedPorts/{portId} | GET | :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/storage-systems/{id}/reachable-ports | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/storage-systems/{id}/templates | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |: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: |: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: |:white_check_mark: | diff --git a/examples/shared_samples/storage_pool.rb b/examples/shared_samples/storage_pool.rb index 37b8a1e65..f00f18da8 100644 --- a/examples/shared_samples/storage_pool.rb +++ b/examples/shared_samples/storage_pool.rb @@ -15,20 +15,12 @@ # NOTE: You'll need to add the following instance variables to the _client.rb file with valid URIs for your environment: # @storage_system_ip -# All supported APIs for Storage Pool: -# - API200 for C7000 and Synergy -# - API300 for C7000 and Synergy -# - API500 for C7000 and Synergy -# - API600 for C7000 and Synergy +# Supported API Versions: +# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800 + +# Supported Variants: +# C7000 and Synergy for all API versions -# Resources classes that you can use for StoragePool in this example: -# storage_pool_class = OneviewSDK::API200::StoragePool -# storage_pool_class = OneviewSDK::API300::C7000::StoragePool -# storage_pool_class = OneviewSDK::API300::Synergy::StoragePool -# storage_pool_class = OneviewSDK::API500::C7000::StoragePool -# storage_pool_class = OneviewSDK::API500::Synergy::StoragePool -# storage_pool_class = OneviewSDK::API600::C7000::StoragePool -# storage_pool_class = OneviewSDK::API600::Synergy::StoragePool storage_pool_class = OneviewSDK.resource_named('StoragePool', @client.api_version) if @client.api_version <= 300 diff --git a/examples/shared_samples/storage_system.rb b/examples/shared_samples/storage_system.rb index be7239e5c..a856d2e06 100644 --- a/examples/shared_samples/storage_system.rb +++ b/examples/shared_samples/storage_system.rb @@ -16,16 +16,12 @@ # @storage_system_username # @storage_system_password -# All supported APIs for Storage System: -# - API200 for C7000 and Synergy -# - API300 for C7000 and Synergy -# - API500 for C7000 and Synergy (see /examples/api500/storage_system.rb) -# - API600 for C7000 and Synergy (see /examples/api600/storage_system.rb) -# - API800 for C7000 and Synergy (see /examples/api600/storage_system.rb) -# - API1000 for C7000 and Synergy (see /examples/api600/storage_system.rb) -# - API1200 for C7000 and Synergy (see /examples/api600/storage_system.rb) -# - API1600 for C7000 and Synergy (see /examples/api600/storage_system.rb) +# Supported API Versions: +# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800 +# Supported Variants: +# C7000 and Synergy for all API versions +# raise 'ERROR: Must set @storage_system_ip in _client.rb' unless @storage_system_ip raise 'ERROR: Must set @storage_system_username in _client.rb' unless @storage_system_username raise 'ERROR: Must set @storage_system_password in _client.rb' unless @storage_system_password diff --git a/lib/oneview-sdk/resource/api1800/c7000/storage_pool.rb b/lib/oneview-sdk/resource/api1800/c7000/storage_pool.rb new file mode 100644 index 000000000..30e555dce --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/storage_pool.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/storage_pool' + +module OneviewSDK + module API1800 + module C7000 + # Storage pool resource implementation for API1800 C7000 + class StoragePool < OneviewSDK::API1600::C7000::StoragePool + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/c7000/storage_system.rb b/lib/oneview-sdk/resource/api1800/c7000/storage_system.rb new file mode 100644 index 000000000..184472be9 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/storage_system.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/storage_system' + +module OneviewSDK + module API1800 + module C7000 + # Storage System resource implementation for API1800 C7000 + class StorageSystem < OneviewSDK::API1600::C7000::StorageSystem + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/storage_pool.rb b/lib/oneview-sdk/resource/api1800/synergy/storage_pool.rb new file mode 100644 index 000000000..587da3789 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/storage_pool.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 '../c7000/storage_pool' + +module OneviewSDK + module API1800 + module Synergy + # Storage pool resource implementation for API1800 Synergy + class StoragePool < OneviewSDK::API1800::C7000::StoragePool + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/storage_system.rb b/lib/oneview-sdk/resource/api1800/synergy/storage_system.rb new file mode 100644 index 000000000..dc8049775 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/storage_system.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 '../c7000/storage_system' + +module OneviewSDK + module API1800 + module Synergy + # Storage system resource implementation for API1800 Synergy + class StorageSystem < OneviewSDK::API1800::C7000::StorageSystem + end + end + end +end diff --git a/spec/unit/resource/api1800/c7000/storage_pool_spec.rb b/spec/unit/resource/api1800/c7000/storage_pool_spec.rb new file mode 100644 index 000000000..e5141cdd3 --- /dev/null +++ b/spec/unit/resource/api1800/c7000/storage_pool_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::StoragePool do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::StoragePool' do + expect(described_class).to be < OneviewSDK::API1600::C7000::StoragePool + end +end diff --git a/spec/unit/resource/api1800/c7000/storage_system_spec.rb b/spec/unit/resource/api1800/c7000/storage_system_spec.rb new file mode 100644 index 000000000..013411c7b --- /dev/null +++ b/spec/unit/resource/api1800/c7000/storage_system_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::StorageSystem do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::StorageSystem' do + expect(described_class).to be < OneviewSDK::API1600::C7000::StorageSystem + end +end diff --git a/spec/unit/resource/api1800/synergy/storage_pool_spec.rb b/spec/unit/resource/api1800/synergy/storage_pool_spec.rb new file mode 100644 index 000000000..d26731445 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/storage_pool_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::StoragePool do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1800::C7000::StoragePool' do + expect(described_class).to be < OneviewSDK::API1800::C7000::StoragePool + end +end diff --git a/spec/unit/resource/api1800/synergy/storage_system_spec.rb b/spec/unit/resource/api1800/synergy/storage_system_spec.rb new file mode 100644 index 000000000..6ce7cf7d0 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/storage_system_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::StorageSystem do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1800::C7000::StorageSystem' do + expect(described_class).to be < OneviewSDK::API1800::C7000::StorageSystem + end +end From 70a91a0339afdd9e0a26a6f8b021c679eb03a619 Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 12:55:41 +0530 Subject: [PATCH 07/10] Change order --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa2fc43ee..ce6e9b6e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,8 @@ This release extends support to OneView Rest API version 1800 (OneView v5.30) fo - FCOE Network - Network Set - Scope -- Storage System - Storage Pool +- Storage System - Uplink Set ## v5.13.0 From 8311153999ac10e729634043497fc341ba82df6f Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 12:56:59 +0530 Subject: [PATCH 08/10] Remove unnecessary values --- endpoints-support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints-support.md b/endpoints-support.md index 7b4193272..66e2a04e4 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -388,11 +388,11 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/server-profiles/{id}/transformation | GET | :white_check_mark: | :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: |:white_check_mark: |:white_check_mark: | -|/rest/storage-pools | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-pools | POST | :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/storage-pools/reachable-storage-pools | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |: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: |:white_check_mark: |:white_check_mark: | |/rest/storage-pools/{id} | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | +|/rest/storage-pools/{id} | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |: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: |: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: |:white_check_mark: |:white_check_mark: | From 2cdf3fd0df47488469b91eb054a872ca2286b0f4 Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 13:11:26 +0530 Subject: [PATCH 09/10] Change copy rihts --- examples/shared_samples/storage_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shared_samples/storage_pool.rb b/examples/shared_samples/storage_pool.rb index f00f18da8..eb98e7507 100644 --- a/examples/shared_samples/storage_pool.rb +++ b/examples/shared_samples/storage_pool.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. From db8db31ada3268d5d9a2a269313024d619b0db69 Mon Sep 17 00:00:00 2001 From: yuvirani Date: Thu, 16 Jul 2020 14:12:27 +0530 Subject: [PATCH 10/10] API1800 for Hypervisor Resources --- CHANGELOG.md | 4 +++ endpoints-support.md | 32 +++++++++---------- .../hypervisor_cluster_profile.rb | 22 +++---------- examples/shared_samples/hypervisor_manager.rb | 20 ++---------- examples/shared_samples/server_certificate.rb | 16 +++------- .../c7000/hypervisor_cluster_profile.rb | 22 +++++++++++++ .../api1800/c7000/hypervisor_manager.rb | 22 +++++++++++++ .../api1800/c7000/server_certificate.rb | 22 +++++++++++++ .../synergy/hypervisor_cluster_profile.rb | 22 +++++++++++++ .../api1800/synergy/hypervisor_manager.rb | 22 +++++++++++++ .../api1800/synergy/server_certificate.rb | 22 +++++++++++++ .../c7000/hypervisor_cluster_profile_spec.rb | 20 ++++++++++++ .../api1800/c7000/hypervisor_manager_spec.rb | 20 ++++++++++++ .../api1800/c7000/server_certificate_spec.rb | 20 ++++++++++++ .../hypervisor_cluster_profile_spec.rb | 21 ++++++++++++ .../synergy/hypervisor_manager_spec.rb | 20 ++++++++++++ .../synergy/server_certificate_spec.rb | 20 ++++++++++++ 17 files changed, 284 insertions(+), 63 deletions(-) create mode 100644 lib/oneview-sdk/resource/api1800/c7000/hypervisor_cluster_profile.rb create mode 100644 lib/oneview-sdk/resource/api1800/c7000/hypervisor_manager.rb create mode 100644 lib/oneview-sdk/resource/api1800/c7000/server_certificate.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/hypervisor_cluster_profile.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/hypervisor_manager.rb create mode 100644 lib/oneview-sdk/resource/api1800/synergy/server_certificate.rb create mode 100644 spec/unit/resource/api1800/c7000/hypervisor_cluster_profile_spec.rb create mode 100644 spec/unit/resource/api1800/c7000/hypervisor_manager_spec.rb create mode 100644 spec/unit/resource/api1800/c7000/server_certificate_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/hypervisor_cluster_profile_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/hypervisor_manager_spec.rb create mode 100644 spec/unit/resource/api1800/synergy/server_certificate_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 198348628..f542f7a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,16 @@ This release extends support to OneView Rest API version 1800 (OneView v5.30) fo - Ethernet Network - FC Network - FCOE Network +- Hypervisor Cluster Profile +- Hypervisor Manager - Network Set - Scope +- Server Certificate - Storage Pool - Storage System - Uplink Set + ## v5.13.0 #### Notes diff --git a/endpoints-support.md b/endpoints-support.md index 5fe4e7b26..d991e3771 100644 --- a/endpoints-support.md +++ b/endpoints-support.md @@ -117,18 +117,18 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/firmware-drivers/{id} | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |/rest/firmware-drivers/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Hypervisor Managers** | -|/rest/hypervisor-managers | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-managers | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-managers/{id} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | -|/rest/hypervisor-managers/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-managers/{id} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-managers | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-managers | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-managers/{id} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-managers/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-managers/{id} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **Hypervisor Cluster Profiles** | -|/rest/hypervisor-cluster-profiles | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-cluster-profiles | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-cluster-profiles/{id} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-cluster-profiles/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-cluster-profiles/{id}/compliance-preview | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -|/rest/hypervisor-cluster-profiles/{id} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-cluster-profiles | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-cluster-profiles | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-cluster-profiles/{id} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-cluster-profiles/{id} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-cluster-profiles/{id}/compliance-preview | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +|/rest/hypervisor-cluster-profiles/{id} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | **ID Pools** | |/rest/id-pools/{poolType} | GET | :white_check_mark: | :white_check_mark: | |/rest/id-pools/{poolType} | PUT | :white_check_mark: | :white_check_mark: | @@ -329,11 +329,11 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove) |/rest/scopes/resources/{resource_uri} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: | |/rest/scopes/resources/{resource_uri} | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: | | **Server Certificate** | -|/rest/certificates/https/remote/{address} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/certificates/servers | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/certificates/servers/{aliasName} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/certificates/servers/{aliasName} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | -|/rest/certificates/servers/{aliasName} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | +|/rest/certificates/https/remote/{address} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/certificates/servers | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/certificates/servers/{aliasName} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/certificates/servers/{aliasName} | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: | +|/rest/certificates/servers/{aliasName} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |: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: |: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: |:white_check_mark: | diff --git a/examples/shared_samples/hypervisor_cluster_profile.rb b/examples/shared_samples/hypervisor_cluster_profile.rb index 2277756fb..ecb507d0b 100644 --- a/examples/shared_samples/hypervisor_cluster_profile.rb +++ b/examples/shared_samples/hypervisor_cluster_profile.rb @@ -14,25 +14,11 @@ # Example: Create/Update/Delete hypervisor cluster profile # NOTE: This will create a hypervisor cluster profile named 'cluster5', update it and then delete it. # -# Supported APIs: -# - API800 for C7000 -# - API800 for Synergy -# - API1000 for C7000 -# - API1000 for Synergy -# - API1200 for C7000 -# - API1200 for Synergy -# - API1600 for C7000 -# - API1600 for Synergy +# Supported API Versions: +# - 800, 1000, 1200, 1600 and 1800 -# Resources that can be created according to parameters: -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::HypervisorClusterProfile -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::HypervisorClusterProfile -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::HypervisorClusterProfile -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::HypervisorClusterProfile -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::HypervisorClusterProfile -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::HypervisorClusterProfile -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::HypervisorClusterProfile -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::HypervisorClusterProfile +# Supported Variants: +# - C7000 and Synergy for all API versions # Resource Class used in this sample hypervisor_cluster_profile_class = OneviewSDK.resource_named('HypervisorClusterProfile', @client.api_version) diff --git a/examples/shared_samples/hypervisor_manager.rb b/examples/shared_samples/hypervisor_manager.rb index aab1dca65..bd2fb3131 100644 --- a/examples/shared_samples/hypervisor_manager.rb +++ b/examples/shared_samples/hypervisor_manager.rb @@ -15,24 +15,10 @@ # NOTE: This will create a hypervisor manager named 'vcenter.corp.com', update it and then delete it. # # Supported APIs: -# - API800 for C7000 -# - API800 for Synergy -# - API1000 for C7000 -# - API1000 for Synergy -# - API1200 for C7000 -# - API1200 for Synergy -# - API1600 for C7000 -# - API1600 for Synergy +# - 800, 1000, 1200, 1600 and 1800 -# Resources that can be created according to parameters: -# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::HypervisorManager -# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::HypervisorManager -# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::HypervisorManager -# api_version = 1000 & variant = Synergy to OneviewSDK::API1000::Synergy::HypervisorManager -# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::HypervisorManager -# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::HypervisorManager -# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::HypervisorManager -# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::HypervisorManager +# Supported Variants: +# - C7000 and Synergy for all API versions raise 'ERROR: Must set @hypervisor_manager_ip in _client.rb' unless @hypervisor_manager_ip raise 'ERROR: Must set @hypervisor_manager_username in _client.rb' unless @hypervisor_manager_username diff --git a/examples/shared_samples/server_certificate.rb b/examples/shared_samples/server_certificate.rb index d96ea051a..267e443e4 100644 --- a/examples/shared_samples/server_certificate.rb +++ b/examples/shared_samples/server_certificate.rb @@ -15,18 +15,10 @@ # @hypervisor_manager_ip # All supported APIs for Server Certificate: -# - 600, 800, 1000, 1200, 1600 -# # Resources classes that you can use for Server Certificate in this example: -# server_certificate_class = OneviewSDK::API600::C7000::ServerCertificate -# server_certificate_class = OneviewSDK::API600::Synergy::ServerCertificate -# server_certificate_class = OneviewSDK::API800::C7000::ServerCertificate -# server_certificate_class = OneviewSDK::API800::Synergy::ServerCertificate -# server_certificate_class = OneviewSDK::API1000::C7000::ServerCertificate -# server_certificate_class = OneviewSDK::API1000::Synergy::ServerCertificate -# server_certificate_class = OneviewSDK::API1200::C7000::ServerCertificate -# server_certificate_class = OneviewSDK::API1200::Synergy::ServerCertificate -# server_certificate_class = OneviewSDK::API1600::C7000::ServerCertificate -# server_certificate_class = OneviewSDK::API1600::Synergy::ServerCertificate +# - 600, 800, 1000, 1200, 1600 and 1800 + +# Supported Variants: +# - C7000 and Synergy for all API versions # Initialize the resources server_certificate_class = OneviewSDK.resource_named('ServerCertificate', @client.api_version) diff --git a/lib/oneview-sdk/resource/api1800/c7000/hypervisor_cluster_profile.rb b/lib/oneview-sdk/resource/api1800/c7000/hypervisor_cluster_profile.rb new file mode 100644 index 000000000..f8242066c --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/hypervisor_cluster_profile.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/hypervisor_cluster_profile' + +module OneviewSDK + module API1800 + module C7000 + # Hypervisor cluster profile resource implementation for API1800 C7000 + class HypervisorClusterProfile < OneviewSDK::API1600::C7000::HypervisorClusterProfile + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/c7000/hypervisor_manager.rb b/lib/oneview-sdk/resource/api1800/c7000/hypervisor_manager.rb new file mode 100644 index 000000000..576908d0d --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/hypervisor_manager.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/hypervisor_manager' + +module OneviewSDK + module API1800 + module C7000 + # Hypervisor Manager resource implementation for API1800 C7000 + class HypervisorManager < OneviewSDK::API1600::C7000::HypervisorManager + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/c7000/server_certificate.rb b/lib/oneview-sdk/resource/api1800/c7000/server_certificate.rb new file mode 100644 index 000000000..f18067962 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/c7000/server_certificate.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/server_certificate' + +module OneviewSDK + module API1800 + module C7000 + # Server certificate resource implementation for API1800 C7000 + class ServerCertificate < OneviewSDK::API1600::C7000::ServerCertificate + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/hypervisor_cluster_profile.rb b/lib/oneview-sdk/resource/api1800/synergy/hypervisor_cluster_profile.rb new file mode 100644 index 000000000..1d33a97f2 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/hypervisor_cluster_profile.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 '../../api1800/c7000/hypervisor_cluster_profile' + +module OneviewSDK + module API1800 + module Synergy + # Hypervisor cluster profile resource implementation for API1800 Synergy + class HypervisorClusterProfile < OneviewSDK::API1800::C7000::HypervisorClusterProfile + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/hypervisor_manager.rb b/lib/oneview-sdk/resource/api1800/synergy/hypervisor_manager.rb new file mode 100644 index 000000000..7bad1fb92 --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/hypervisor_manager.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/hypervisor_manager' + +module OneviewSDK + module API1800 + module Synergy + # Hypervisor Manager resource implementation for API1800 Synergy + class HypervisorManager < OneviewSDK::API1600::Synergy::HypervisorManager + end + end + end +end diff --git a/lib/oneview-sdk/resource/api1800/synergy/server_certificate.rb b/lib/oneview-sdk/resource/api1800/synergy/server_certificate.rb new file mode 100644 index 000000000..9d07cb89c --- /dev/null +++ b/lib/oneview-sdk/resource/api1800/synergy/server_certificate.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/server_certificate' + +module OneviewSDK + module API1800 + module Synergy + # Server certificate resource implementation for API 1800 Synergy + class ServerCertificate < OneviewSDK::API1600::Synergy::ServerCertificate + end + end + end +end diff --git a/spec/unit/resource/api1800/c7000/hypervisor_cluster_profile_spec.rb b/spec/unit/resource/api1800/c7000/hypervisor_cluster_profile_spec.rb new file mode 100644 index 000000000..36a4fc69e --- /dev/null +++ b/spec/unit/resource/api1800/c7000/hypervisor_cluster_profile_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::HypervisorClusterProfile do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::HypervisorClusterProfile' do + expect(described_class).to be < OneviewSDK::API1600::C7000::HypervisorClusterProfile + end +end diff --git a/spec/unit/resource/api1800/c7000/hypervisor_manager_spec.rb b/spec/unit/resource/api1800/c7000/hypervisor_manager_spec.rb new file mode 100644 index 000000000..e44a95f00 --- /dev/null +++ b/spec/unit/resource/api1800/c7000/hypervisor_manager_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::HypervisorManager do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::HypervisorManager' do + expect(described_class).to be < OneviewSDK::API1600::C7000::HypervisorManager + end +end diff --git a/spec/unit/resource/api1800/c7000/server_certificate_spec.rb b/spec/unit/resource/api1800/c7000/server_certificate_spec.rb new file mode 100644 index 000000000..3824b67bc --- /dev/null +++ b/spec/unit/resource/api1800/c7000/server_certificate_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::ServerCertificate do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::C7000::ServerCertificate' do + expect(described_class).to be < OneviewSDK::API1600::C7000::ServerCertificate + end +end diff --git a/spec/unit/resource/api1800/synergy/hypervisor_cluster_profile_spec.rb b/spec/unit/resource/api1800/synergy/hypervisor_cluster_profile_spec.rb new file mode 100644 index 000000000..f5d75d593 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/hypervisor_cluster_profile_spec.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 'spec_helper' + +RSpec.describe OneviewSDK::API1800::Synergy::HypervisorClusterProfile do + include_context 'shared context' + + # it inherit latest changes from API1800 C7000 lib file + it 'inherits from OneviewSDK::API1800::C7000::HypervisorClusterProfile' do + expect(described_class).to be < OneviewSDK::API1800::C7000::HypervisorClusterProfile + end +end diff --git a/spec/unit/resource/api1800/synergy/hypervisor_manager_spec.rb b/spec/unit/resource/api1800/synergy/hypervisor_manager_spec.rb new file mode 100644 index 000000000..7065846c5 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/hypervisor_manager_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::HypervisorManager do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::Synergy::HypervisorManager' do + expect(described_class).to be < OneviewSDK::API1600::Synergy::HypervisorManager + end +end diff --git a/spec/unit/resource/api1800/synergy/server_certificate_spec.rb b/spec/unit/resource/api1800/synergy/server_certificate_spec.rb new file mode 100644 index 000000000..5a4437e54 --- /dev/null +++ b/spec/unit/resource/api1800/synergy/server_certificate_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::ServerCertificate do + include_context 'shared context' + + it 'inherits from OneviewSDK::API1600::Synergy::ServerCertificate' do + expect(described_class).to be < OneviewSDK::API1600::Synergy::ServerCertificate + end +end