Skip to content

Commit

Permalink
API1800 support for Scope
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvirani committed Jul 8, 2020
1 parent 897e7a9 commit 267d409
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 41 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 to OneView Rest API version 1800 (OneView v5.30) fo

#### Features supported
- Ethernet Network
- Scope

## v5.13.0

Expand Down
20 changes: 10 additions & 10 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,16 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/sas-logical-jbods/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark:
|<sub>/rest/sas-logical-jbods/{id}/drives</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark:
| **Scopes** |
|<sub>/rest/scopes</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/scopes</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/scopes/{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/scopes/{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/scopes/{id}</sub> | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/scopes/{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/scopes/{id}/resource-assignments</sub> | PATCH | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign:| :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/scopes/resources/{resource_uri}</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/scopes/resources/{resource_uri}</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/scopes/resources/{resource_uri}</sub> | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/scopes</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/scopes</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/scopes/{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/scopes/{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/scopes/{id}</sub> | PATCH | :heavy_minus_sign: | :white_check_mark: | :white_check_mark:| :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: |
|<sub>/rest/scopes/{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/scopes/{id}/resource-assignments</sub> | PATCH | :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/scopes/resources/{resource_uri}</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/scopes/resources/{resource_uri}</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: |
|<sub>/rest/scopes/resources/{resource_uri}</sub> | PATCH | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:| :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: | :white_check_mark: |
| **Server Certificate** |
|<sub>/rest/certificates/https/remote/{address}</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/certificates/servers</sub> | POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
Expand Down
34 changes: 3 additions & 31 deletions examples/shared_samples/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,10 @@
# NOTE: It is necessary a server hardware and an enclosure previous created
#
# Supported APIs:
# - API200 for C7000
# - API300 for C7000
# - API300 for Synergy
# - API500 for C7000
# - API500 for Synergy
# - API600 for C7000
# - API600 for Synergy
# - API800 for C7000
# - API800 for Synergy
# - API1000 for C7000
# - 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 = 300 & variant = C7000 to OneviewSDK::API300::C7000::Scope
# api_version = 300 & variant = Synergy to OneviewSDK::API300::Synergy::Scope
# api_version = 500 & variant = C7000 to OneviewSDK::API500::C7000::Scope
# api_version = 500 & variant = Synergy to OneviewSDK::API500::Synergy::Scope
# api_version = 600 & variant = C7000 to OneviewSDK::API600::C7000::Scope
# api_version = 600 & variant = Synergy to OneviewSDK::API600::Synergy::Scope
# api_version = 800 & variant = C7000 to OneviewSDK::API800::C7000::Scope
# api_version = 800 & variant = Synergy to OneviewSDK::API800::Synergy::Scope
# api_version = 1000 & variant = C7000 to OneviewSDK::API1000::C7000::Scope
# api_version = 1000 & variant = Synergy to OneviewSDK::API1000:Synergy::Scope
# api_version = 1200 & variant = C7000 to OneviewSDK::API1200::C7000::Scope
# api_version = 1200 & variant = Synergy to OneviewSDK::API1200::Synergy::Scope
# api_version = 1600 & variant = C7000 to OneviewSDK::API1600::C7000::Scope
# api_version = 1600 & variant = Synergy to OneviewSDK::API1600::Synergy::Scope
# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800

# Supported Variants
# C7000 and Synergy for all API versions

# NOTE: Scopes doesn't support versions smaller than 300.

Expand Down
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1800/c7000/scope.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 '../../api1600/c7000/scope'

module OneviewSDK
module API1800
module C7000
# Scope resource implementation for API1800 C7000
class Scope < OneviewSDK::API1600::C7000::Scope
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1800/synergy/scope.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 '../../api1600/c7000/scope'

module OneviewSDK
module API1800
module Synergy
# Scope resource implementation for API1800 Synergy
class Scope < OneviewSDK::API1600::C7000::Scope
end
end
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1800/c7000/scope_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::API1800::C7000::Scope do
include_context 'shared context'

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

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

0 comments on commit 267d409

Please sign in to comment.