Skip to content

Commit

Permalink
Merge pull request #412 from HewlettPackard/API1600/AllNetworks
Browse files Browse the repository at this point in the history
Adding API1600 support for Ethernet/FC/FCoE network resources
  • Loading branch information
yuvirani committed May 20, 2020
2 parents 2c13b72 + 4f1b1bd commit a85b823
Show file tree
Hide file tree
Showing 15 changed files with 212 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,9 @@ This release extends support of the SDK to OneView REST API version 1600 (OneVie
#### Features supported
- Enclosure
- Enclosure Group
- Ethernet Network
- FC Network
- FCOE Network
- Logical Enclosure
- Server Hardware
- Server Hardware Type
Expand Down
42 changes: 21 additions & 21 deletions endpoints-support.md
Expand Up @@ -74,15 +74,15 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<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: |
| **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: |
|<sub>/rest/ethernet-networks</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/ethernet-networks/bulk</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/ethernet-networks/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/ethernet-networks/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/ethernet-networks/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/ethernet-networks/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/ethernet-networks/{id}/associatedProfiles</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/ethernet-networks/{id}/associatedUplinkGroups</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |
|<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: |
|<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: |
|<sub>/rest/ethernet-networks/bulk</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/ethernet-networks/{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/ethernet-networks/{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/ethernet-networks/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/ethernet-networks/{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/ethernet-networks/{id}/associatedProfiles</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/ethernet-networks/{id}/associatedUplinkGroups</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: | :white_check_mark: |
| **Events** |
|<sub>/rest/events</sub> | GET | :white_check_mark: | :white_check_mark: |
|<sub>/rest/events</sub> | POST | :white_check_mark: | :white_check_mark: |
Expand All @@ -93,19 +93,19 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/fabrics/{id}/reserved-vlan-range</sub> | GET | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fabrics/{id}/reserved-vlan-range</sub> | PUT | :white_check_mark: | :white_check_mark: |
| **FC Networks** |
|<sub>/rest/fc-networks</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fc-networks</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fc-networks/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fc-networks/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/fc-networks/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fc-networks/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fc-networks</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/fc-networks</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/fc-networks/{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/fc-networks/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/fc-networks/{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/fc-networks/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **FCoE Networks** |
|<sub>/rest/fcoe-networks</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fcoe-networks</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fcoe-networks/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fcoe-networks/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/fcoe-networks/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fcoe-networks/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/fcoe-networks</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/fcoe-networks</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/fcoe-networks/{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/fcoe-networks/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/fcoe-networks/{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/fcoe-networks/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Firmware Bundles** |
|<sub>/rest/firmware-bundles</sub> | POST | :white_check_mark: | :white_check_mark: |
| **Firmware Drivers** |
Expand Down
2 changes: 1 addition & 1 deletion examples/shared_samples/fc_network.rb
Expand Up @@ -44,7 +44,7 @@
connectionTemplateUri: nil,
autoLoginRedistribution: true,
fabricType: 'FabricAttach',
initialScopeUris: ['/rest/scopes/a5f8ca3d-2cea-4f82-b880-344572eb7271', '/rest/scopes/e0f6b95a-67a6-4718-b42c-1f7d426b730c']
initialScopeUris: ['/rest/scopes/e025d93b-b08a-42cb-af56-b67a750c65b7', '/rest/scopes/92517890-87e4-47b5-9b33-ba78bd878293']
}

fc = fc_network_class.new(@client, options)
Expand Down
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/c7000/ethernet_network.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 '../../api1200/c7000/ethernet_network'

module OneviewSDK
module API1600
module C7000
# Ethernet network resource implementation for API1600 C7000
class EthernetNetwork < OneviewSDK::API1200::C7000::EthernetNetwork
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/c7000/fc_network.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 '../../api1200/c7000/fc_network'

module OneviewSDK
module API1600
module C7000
# FC network resource implementation for API1600 C7000
class FCNetwork < OneviewSDK::API1200::C7000::FCNetwork
end
end
end
end
23 changes: 23 additions & 0 deletions lib/oneview-sdk/resource/api1600/c7000/fcoe_network.rb
@@ -0,0 +1,23 @@
# (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 '../../api1200/c7000/fcoe_network'

module OneviewSDK
module API1600
module C7000
# FCoE network resource implementation for API1600 C7000
class FCoENetwork < OneviewSDK::API1200::C7000::FCoENetwork

end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/synergy/ethernet_network.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 '../../api1200/synergy/ethernet_network'

module OneviewSDK
module API1600
module Synergy
# Ethernet network resource implementation for API1600 Synergy
class EthernetNetwork < OneviewSDK::API1200::Synergy::EthernetNetwork
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/synergy/fc_network.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 '../../api1200/synergy/fc_network'

module OneviewSDK
module API1600
module Synergy
# FC network resource implementation for API1600 Synergy
class FCNetwork < OneviewSDK::API1200::Synergy::FCNetwork
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/synergy/fcoe_network.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 '../../api1200/synergy/fcoe_network'

module OneviewSDK
module API1600
module Synergy
# FCoE network resource implementation for API1600 Synergy
class FCoENetwork < OneviewSDK::API1200::Synergy::FCoENetwork
end
end
end
end
9 changes: 9 additions & 0 deletions spec/unit/resource/api1600/c7000/ethernet_network_spec.rb
@@ -0,0 +1,9 @@
require 'spec_helper'

RSpec.describe OneviewSDK::API1600::C7000::EthernetNetwork do
include_context 'shared context'

it 'inherits from OneviewSDK::API1200::C7000::EthernetNetwork' do
expect(described_class).to be < OneviewSDK::API1200::C7000::EthernetNetwork
end
end
9 changes: 9 additions & 0 deletions spec/unit/resource/api1600/c7000/fc_network_spec.rb
@@ -0,0 +1,9 @@
require 'spec_helper'

RSpec.describe OneviewSDK::API1600::C7000::FCNetwork do
include_context 'shared context'

it 'inherits from OneviewSDK::API1200::C7000::FCNetwork' do
expect(described_class).to be < OneviewSDK::API1200::C7000::FCNetwork
end
end
9 changes: 9 additions & 0 deletions spec/unit/resource/api1600/c7000/fcoe_network_spec.rb
@@ -0,0 +1,9 @@
require 'spec_helper'

RSpec.describe OneviewSDK::API1600::C7000::FCoENetwork do
include_context 'shared context'

it 'inherits from OneviewSDK::API1200::C7000::FCoENetwork' do
expect(described_class).to be < OneviewSDK::API1200::C7000::FCoENetwork
end
end
9 changes: 9 additions & 0 deletions spec/unit/resource/api1600/synergy/ethernet_network_spec.rb
@@ -0,0 +1,9 @@
require 'spec_helper'

RSpec.describe OneviewSDK::API1600::Synergy::EthernetNetwork do
include_context 'shared context'

it 'inherits from OneviewSDK::API1200::Synergy::EthernetNetwork' do
expect(described_class).to be < OneviewSDK::API1200::Synergy::EthernetNetwork
end
end

0 comments on commit a85b823

Please sign in to comment.