Skip to content

Commit

Permalink
Merge branch 'master' into API1800_serverhardware
Browse files Browse the repository at this point in the history
  • Loading branch information
VenkateshRavula committed Jul 16, 2020
2 parents f10dfe9 + cb70a63 commit 1452726
Show file tree
Hide file tree
Showing 52 changed files with 944 additions and 254 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,14 +4,24 @@
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
- Enclosure
- Enclosure Group
- Ethernet Network
- FC Network
- FCOE Network
- Hypervisor Cluster Profile
- Hypervisor Manager
- Network Set
- Scope
- Server Certificate
- Server Hardware
- Server Hardware Type
- Server Profile
- Server Profile Template
- Storage Pool
- Storage System
- Uplink Set

## v5.13.0

Expand Down
144 changes: 72 additions & 72 deletions endpoints-support.md

Large diffs are not rendered by default.

30 changes: 8 additions & 22 deletions examples/shared_samples/connection_template.rb
Expand Up @@ -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
Expand Down Expand Up @@ -60,18 +46,18 @@
puts "(- typicalBandwidth: #{item['bandwidth']['typicalBandwidth']})\n"

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
puts "\n Reducing value 100 for maximumBandwidth and typicalBandwidth:"
item['bandwidth']['maximumBandwidth'] -= 100
item['bandwidth']['typicalBandwidth'] -= 100
item.update
item.retrieve!
puts "\nConnection template with name='#{item['name']}' bandwidth specification changed:"
puts "(- maximumBandwidth: #{item['bandwidth']['maximumBandwidth']})"
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:"
Expand Down
22 changes: 4 additions & 18 deletions examples/shared_samples/enclosure.rb
Expand Up @@ -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)

Expand Down
36 changes: 17 additions & 19 deletions examples/shared_samples/enclosure_group.rb
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
22 changes: 4 additions & 18 deletions examples/shared_samples/hypervisor_cluster_profile.rb
Expand Up @@ -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)
Expand Down
20 changes: 3 additions & 17 deletions examples/shared_samples/hypervisor_manager.rb
Expand Up @@ -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
Expand Down
42 changes: 7 additions & 35 deletions examples/shared_samples/network_set.rb
Expand Up @@ -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)

Expand Down
16 changes: 4 additions & 12 deletions examples/shared_samples/server_certificate.rb
Expand Up @@ -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)
Expand Down
20 changes: 6 additions & 14 deletions 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.
Expand All @@ -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
Expand Down
14 changes: 5 additions & 9 deletions examples/shared_samples/storage_system.rb
Expand Up @@ -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
Expand Down
23 changes: 5 additions & 18 deletions examples/shared_samples/uplink_set.rb
Expand Up @@ -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)
Expand Down
22 changes: 22 additions & 0 deletions 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

0 comments on commit 1452726

Please sign in to comment.