Skip to content

Commit

Permalink
Merge pull request #413 from HewlettPackard/HypervisorManagers
Browse files Browse the repository at this point in the history
Added API1600 support to hypervisor managers
  • Loading branch information
VenkateshRavula committed May 26, 2020
2 parents bf1485c + 75f57a3 commit ec5b0b2
Show file tree
Hide file tree
Showing 11 changed files with 175 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This release extends support of the SDK to OneView REST API version 1600 (OneVie
- Ethernet Network
- FC Network
- FCOE Network
- Hypervisor Manager
- Logical Enclosure
- OS Deployment Plan
- Server Hardware
Expand Down
10 changes: 5 additions & 5 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/firmware-drivers/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/firmware-drivers/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
| **Hypervisor Managers** |
|<sub>/rest/hypervisor-managers</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers/{id}</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:|
|<sub>/rest/hypervisor-managers/{id}</sub> | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers/{id}</sub> | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers/{id}</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :white_check_mark: |
|<sub>/rest/hypervisor-managers/{id}</sub> | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-managers/{id}</sub> | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Hypervisor Cluster Profiles** |
|<sub>/rest/hypervisor-cluster-profiles</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/hypervisor-cluster-profiles</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Expand Down
6 changes: 5 additions & 1 deletion examples/shared_samples/hypervisor_manager.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2018 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 @@ -21,6 +21,8 @@
# - 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 = 800 & variant = C7000 to OneviewSDK::API800::C7000::HypervisorManager
Expand All @@ -29,6 +31,8 @@
# 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

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
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/c7000/hypervisor_manager.rb
Original file line number Diff line number Diff line change
@@ -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/hypervisor_manager'

module OneviewSDK
module API1600
module C7000
# Hypervisor Manager resource implementation for API1600 C7000
class HypervisorManager < OneviewSDK::API1200::C7000::HypervisorManager
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/synergy/hypervisor_manager.rb
Original file line number Diff line number Diff line change
@@ -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/hypervisor_manager'

module OneviewSDK
module API1600
module Synergy
# Hypervisor Manager resource implementation for API1600 Synergy
class HypervisorManager < OneviewSDK::API1200::Synergy::HypervisorManager
end
end
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1000/c7000/hypervisor_manager_spec.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::API1000::C7000::HypervisorManager do
include_context 'shared context'

it 'inherits from OneviewSDK::API800::C7000::HypervisorManager' do
expect(described_class).to be < OneviewSDK::API800::C7000::HypervisorManager
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1000/synergy/hypervisor_manager_spec.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::API1000::Synergy::HypervisorManager do
include_context 'shared context'

it 'inherits from OneviewSDK::API800::Synergy::HypervisorManager' do
expect(described_class).to be < OneviewSDK::API800::Synergy::HypervisorManager
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1200/c7000/hypervisor_manager_spec.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::API1200::C7000::HypervisorManager do
include_context 'shared context'

it 'inherits from OneviewSDK::API1000::C7000::HypervisorManager' do
expect(described_class).to be < OneviewSDK::API1000::C7000::HypervisorManager
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1200/synergy/hypervisor_manager_spec.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::API1200::Synergy::HypervisorManager do
include_context 'shared context'

it 'inherits from OneviewSDK::API1000::Synergy::HypervisorManager' do
expect(described_class).to be < OneviewSDK::API1000::Synergy::HypervisorManager
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1600/c7000/hypervisor_manager_spec.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::API1600::C7000::HypervisorManager do
include_context 'shared context'

it 'inherits from OneviewSDK::API1200::C7000::HypervisorManager' do
expect(described_class).to be < OneviewSDK::API1200::C7000::HypervisorManager
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1600/synergy/hypervisor_manager_spec.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::API1600::Synergy::HypervisorManager do
include_context 'shared context'

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

0 comments on commit ec5b0b2

Please sign in to comment.