Skip to content

Commit

Permalink
API1800 support for Enclosure and EG
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvirani committed Jul 15, 2020
1 parent 897e7a9 commit c7216c4
Show file tree
Hide file tree
Showing 12 changed files with 171 additions and 59 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
44 changes: 22 additions & 22 deletions endpoints-support.md
Expand Up @@ -50,29 +50,29 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/drive-enclosures/{id}/port-map</sub> | GET | :white_check_mark: | :white_check_mark: |
|<sub>/rest/drive-enclosures/{id}/refreshState</sub> | PUT | :white_check_mark: | :white_check_mark: |
| **Enclosure Groups** |
|<sub>/rest/enclosure-groups</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups/{id}/script</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups/{id}/script</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosure-groups</sub> | 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: |
|<sub>/rest/enclosure-groups</sub> | 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: |
|<sub>/rest/enclosure-groups/{id}</sub> | 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: |
|<sub>/rest/enclosure-groups/{id}</sub> | 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: |
|<sub>/rest/enclosure-groups/{id}</sub> | 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: |
|<sub>/rest/enclosure-groups/{id}/script</sub> | 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: |
|<sub>/rest/enclosure-groups/{id}/script</sub> | 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** |
|<sub>/rest/enclosures</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/configuration</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/environmentalConfiguration</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/environmentalConfiguration</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/refreshState</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/script</sub> | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/enclosures/{id}/sso</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/utilization</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/https/certificaterequest</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/https/certificaterequest</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures/{id}/https/certificaterequest</sub> | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/enclosures</sub> | 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: |
|<sub>/rest/enclosures</sub> | 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: |
|<sub>/rest/enclosures/{id}</sub> | 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: |
|<sub>/rest/enclosures/{id}</sub> | 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: |
|<sub>/rest/enclosures/{id}</sub> | 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: |
|<sub>/rest/enclosures/{id}/configuration</sub> | 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: |
|<sub>/rest/enclosures/{id}/environmentalConfiguration</sub> | 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: |
|<sub>/rest/enclosures/{id}/environmentalConfiguration</sub> | 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: |
|<sub>/rest/enclosures/{id}/refreshState</sub> | 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: |
|<sub>/rest/enclosures/{id}/script</sub> | 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: |
|<sub>/rest/enclosures/{id}/sso</sub> | 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: |
|<sub>/rest/enclosures/{id}/utilization</sub> | 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: |
|<sub>/rest/enclosures/{id}/https/certificaterequest</sub> | 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: |
|<sub>/rest/enclosures/{id}/https/certificaterequest</sub> | 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: |
|<sub>/rest/enclosures/{id}/https/certificaterequest</sub> | 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** |
|<sub>/rest/ethernet-networks</sub> | 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: |
|<sub>/rest/ethernet-networks</sub> | 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: |
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: 22 additions & 0 deletions 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
22 changes: 22 additions & 0 deletions 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

0 comments on commit c7216c4

Please sign in to comment.