Skip to content

Commit

Permalink
Merge f24df71 into e876cf6
Browse files Browse the repository at this point in the history
  • Loading branch information
chebroluharika authored May 13, 2020
2 parents e876cf6 + f24df71 commit fa1b790
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This release extends support of the SDK to OneView REST API version 1600 (OneVie

#### Features supported
- Enclosure
- Server Hardware Type

## v5.11.0

Expand Down
8 changes: 4 additions & 4 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/server-hardware/{id}/firmware | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/server-hardware/discovery | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Server Hardware Types** |
|<sub>/rest/server-hardware-types</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/server-hardware-types/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/server-hardware-types/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/server-hardware-types/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/server-hardware-types</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/server-hardware-types/{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/server-hardware-types/{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/server-hardware-types/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Server Profile Templates** |
|<sub>/rest/server-profile-templates</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/server-profile-templates</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |
Expand Down
13 changes: 3 additions & 10 deletions examples/shared_samples/server_hardware_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,9 @@
# Example: Actions with a Server Hardware Type
#
# Supported APIs:
# - 200, 300, 500, 600

# Resources that can be created according to parameters:
# api_version = 200 & variant = any to OneviewSDK::API200::ServerHardwareType
# api_version = 300 & variant = C7000 to OneviewSDK::API300::C7000::ServerHardwareType
# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::ServerHardwareType
# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::ServerHardwareType
# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::ServerHardwareType
# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::ServerHardwareType
# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::ServerHardwareType
# - 200, 300, 500, 600, 800, 1000, 1200, 1600
# Supported API variants:
# C7000, Synergy

# Resource Class used in this sample
shw_type_class = OneviewSDK.resource_named('ServerHardwareType', @client.api_version)
Expand Down
25 changes: 25 additions & 0 deletions lib/oneview-sdk/resource/api1600/c7000/server_hardware_type.rb
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 '../../api1200/c7000/server_hardware_type'

module OneviewSDK
module API1600
module C7000
# Server hardware type resource implementation for API1600 C7000
class ServerHardwareType < OneviewSDK::API1200::C7000::ServerHardwareType
def self.api_version
1600
end
end
end
end
end
25 changes: 25 additions & 0 deletions lib/oneview-sdk/resource/api1600/synergy/server_hardware_type.rb
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 '../c7000/server_hardware_type'

module OneviewSDK
module API1600
module Synergy
# Server hardware type resource implementation for API1600 Synergy
class ServerHardwareType < OneviewSDK::API1600::C7000::ServerHardwareType
def self.api_version
1600
end
end
end
end
end
9 changes: 9 additions & 0 deletions spec/unit/resource/api1600/c7000/server_hardware_type_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

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

it 'inherits from OneviewSDK::API1200::C7000::ServerHardwareType' do
expect(described_class).to be < OneviewSDK::API1200::C7000::ServerHardwareType
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

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

it 'inherits from OneviewSDK::API1600::C7000::ServerHardwareType' do
expect(described_class).to be < OneviewSDK::API1600::C7000::ServerHardwareType
end
end

0 comments on commit fa1b790

Please sign in to comment.