Skip to content

Commit

Permalink
Merge 5eb193b into 88c02af
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvirani committed Sep 11, 2020
2 parents 88c02af + 5eb193b commit ecbac3e
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ This release extends support to OneView Rest API version 2000 (OneView v5.40) fo
- Firmware Driver
- Hypervisor Cluster Profile
- Hypervisor Manager
- LIG Uplink Set
- Logical Enclosure
- Logical Interconnect Group
- Network Set
- OS Deployment Plan
- Scope
Expand Down
16 changes: 8 additions & 8 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/logical-enclosures/{id}/support-dumps</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: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/updateFromGroup</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: | :white_check_mark: |
| **Logical Interconnect Groups** |
|<sub>/rest/logical-interconnect-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/logical-interconnect-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/logical-interconnect-groups/defaultSettings</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/logical-interconnect-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/logical-interconnect-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/logical-interconnect-groups/{id}</sub> | 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: |
|<sub>/rest/logical-interconnect-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/logical-interconnect-groups/{id}/settings</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/logical-interconnect-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: | :white_check_mark: |
|<sub>/rest/logical-interconnect-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: | :white_check_mark: |
|<sub>/rest/logical-interconnect-groups/defaultSettings</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: | :white_check_mark: |
|<sub>/rest/logical-interconnect-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: | :white_check_mark: |
|<sub>/rest/logical-interconnect-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: | :white_check_mark: |
|<sub>/rest/logical-interconnect-groups/{id}</sub> | 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: | :heavy_minus_sign: |
|<sub>/rest/logical-interconnect-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: | :white_check_mark: |
|<sub>/rest/logical-interconnect-groups/{id}/settings</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: | :white_check_mark: |
| **Logical Interconnects** |
|<sub>/rest/logical-interconnects</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/logical-interconnects/locations/interconnects</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
Expand Down
12 changes: 8 additions & 4 deletions examples/shared_samples/logical_interconnect_group.rb
Original file line number Diff line number Diff line change
@@ -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 @@ -23,10 +23,12 @@
# for example, if api_version = 800 & variant = C7000 then, resource that can be created will be in form
# OneviewSDK::API800::C7000::LogicalInterconnectGroup

# Resource Class used in this sample
lig_class = OneviewSDK.resource_named('LogicalInterconnectGroup', @client.api_version)
# NOTE: Set the variant type before running example
variant = 'Synergy'
# variant = OneviewSDK.const_get("API#{@client.api_version}").variant unless @client.api_version < 300

variant = OneviewSDK.const_get("API#{@client.api_version}").variant unless @client.api_version < 300
# Resource Class used in this sample
lig_class = OneviewSDK.resource_named('LogicalInterconnectGroup', @client.api_version, variant)

# Ethernet network class used in this sample
ethernet_class = OneviewSDK.resource_named('EthernetNetwork', @client.api_version)
Expand Down Expand Up @@ -118,6 +120,7 @@
if variant == 'Synergy'
lig['redundancyType'] = 'Redundant'
lig['interconnectBaySet'] = 3
lig['enclosureType'] = 'SY12000'

# Adds the following interconnects to the bays 3 and 6 with an Interconnect Type, respectively
lig.add_interconnect(3, VIRTUAL_CONNECT_SE_40_SYNERGY)
Expand Down Expand Up @@ -161,6 +164,7 @@
puts "#{type} was updated successfully:"
puts lig.data

puts eth01['uri']
if variant == 'Synergy'
puts "\nAdding an internal network with uri = #{eth01['uri']}"
lig.retrieve!
Expand Down
21 changes: 21 additions & 0 deletions lib/oneview-sdk/resource/api2000/c7000/lig_uplink_set.rb
Original file line number Diff line number Diff line change
@@ -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_relative '../../api1800/c7000/lig_uplink_set'

module OneviewSDK
module API2000
module C7000
class LIGUplinkSet < OneviewSDK::API1800::C7000::LIGUplinkSet
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# (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/logical_interconnect_group'

module OneviewSDK
module API2000
module C7000
# Logical interconnect group resource implementation on API2000 C7000
class LogicalInterconnectGroup < OneviewSDK::API1800::C7000::LogicalInterconnectGroup
def self.api_version
2000
end
end
end
end
end
21 changes: 21 additions & 0 deletions lib/oneview-sdk/resource/api2000/synergy/lig_uplink_set.rb
Original file line number Diff line number Diff line change
@@ -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_relative '../../api1800/synergy/lig_uplink_set'

module OneviewSDK
module API2000
module Synergy
class LIGUplinkSet < OneviewSDK::API1800::Synergy::LIGUplinkSet
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# (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/synergy/logical_interconnect_group'

module OneviewSDK
module API2000
module Synergy
# Logical interconnect group resource implementation for API2000 Synergy
class LogicalInterconnectGroup < OneviewSDK::API1800::Synergy::LogicalInterconnectGroup
def self.api_version
2000
end
end
end
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api2000/c7000/lig_uplink_set.rb
Original file line number Diff line number Diff line change
@@ -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::API2000::C7000::LIGUplinkSet do
include_context 'shared context'

it 'inherits from OneviewSDK::API1800::C7000::LIGUplinkSet' do
expect(described_class).to be < OneviewSDK::API1800::C7000::LIGUplinkSet
end
end
Original file line number Diff line number Diff line change
@@ -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::API2000::C7000::LogicalInterconnectGroup do
include_context 'shared context'

it 'inherits from OneviewSDK::API1800::C7000::LogicalInterconnectGroup' do
expect(described_class).to be < OneviewSDK::API1800::C7000::LogicalInterconnectGroup
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api2000/synergy/lig_uplink_set.rb
Original file line number Diff line number Diff line change
@@ -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::API2000::Synergy::LIGUplinkSet do
include_context 'shared context'

it 'inherits from OneviewSDK::API1800::Synergy::LIGUplinkSet' do
expect(described_class).to be < OneviewSDK::API1800::Synergy::LIGUplinkSet
end
end
Original file line number Diff line number Diff line change
@@ -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::API2000::Synergy::LogicalInterconnectGroup do
include_context 'shared context'

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

0 comments on commit ecbac3e

Please sign in to comment.