Skip to content

Commit

Permalink
Merge pull request #445 from HewlettPackard/StorageAPI1800
Browse files Browse the repository at this point in the history
API1800 support for Storage System and Storage Pool
  • Loading branch information
yuvirani committed Jul 16, 2020
2 parents ecb39b8 + 5f47e6b commit c893ac0
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 40 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This release extends support to OneView Rest API version 1800 (OneView v5.30) fo
- FCOE Network
- Network Set
- Scope
- Storage Pool
- Storage System
- Uplink Set

## v5.13.0
Expand Down
34 changes: 17 additions & 17 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,24 +387,24 @@ OneviewSDK::Datacenter.find_by(@client, width: 11000).map(&:remove)
|<sub>/rest/server-profiles/{id}/messages</sub> | GET | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/server-profiles/{id}/transformation</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Storage Pools** |
|<sub>/rest/storage-pools</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/storage-pools</sub> | POST | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/storage-pools/reachable-storage-pools</sub> | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools/{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/storage-pools/{id}</sub> | PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-pools/{id}</sub> | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/storage-pools</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/storage-pools</sub> | POST | :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/storage-pools/reachable-storage-pools</sub> | GET | :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/storage-pools/{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/storage-pools/{id}</sub> | PUT | :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/storage-pools/{id}</sub> | DELETE | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
| **Storage Systems** |
|<sub>/rest/storage-systems</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/storage-systems</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/storage-systems/host-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/storage-systems/{arrayId}/storage-pools</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/storage-systems/{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/storage-systems/{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/storage-systems/{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/storage-systems/{id}/managedPorts</sub> | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/storage-systems/{id}/managedPorts/{portId}</sub> | GET | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |:heavy_minus_sign: |
|<sub>/rest/storage-systems/{id}/reachable-ports</sub> | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems/{id}/templates</sub> | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
|<sub>/rest/storage-systems</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/storage-systems</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/storage-systems/host-types</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/storage-systems/{arrayId}/storage-pools</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/storage-systems/{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/storage-systems/{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/storage-systems/{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/storage-systems/{id}/managedPorts</sub> | GET | :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/storage-systems/{id}/managedPorts/{portId}</sub> | GET | :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/storage-systems/{id}/reachable-ports</sub> | GET | :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/storage-systems/{id}/templates</sub> | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
| **Storage Volume Attachments** |
|<sub>/rest/storage-volume-attachments</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/storage-volume-attachments/{id}</sub> | GET | :white_check_mark: | :white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |:white_check_mark: |
Expand Down
20 changes: 6 additions & 14 deletions examples/shared_samples/storage_pool.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 @@ -15,20 +15,12 @@
# NOTE: You'll need to add the following instance variables to the _client.rb file with valid URIs for your environment:
# @storage_system_ip

# All supported APIs for Storage Pool:
# - API200 for C7000 and Synergy
# - API300 for C7000 and Synergy
# - API500 for C7000 and Synergy
# - API600 for C7000 and Synergy
# Supported API Versions:
# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800

# Supported Variants:
# C7000 and Synergy for all API versions

# Resources classes that you can use for StoragePool in this example:
# storage_pool_class = OneviewSDK::API200::StoragePool
# storage_pool_class = OneviewSDK::API300::C7000::StoragePool
# storage_pool_class = OneviewSDK::API300::Synergy::StoragePool
# storage_pool_class = OneviewSDK::API500::C7000::StoragePool
# storage_pool_class = OneviewSDK::API500::Synergy::StoragePool
# storage_pool_class = OneviewSDK::API600::C7000::StoragePool
# storage_pool_class = OneviewSDK::API600::Synergy::StoragePool
storage_pool_class = OneviewSDK.resource_named('StoragePool', @client.api_version)

if @client.api_version <= 300
Expand Down
14 changes: 5 additions & 9 deletions examples/shared_samples/storage_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@
# @storage_system_username
# @storage_system_password

# All supported APIs for Storage System:
# - API200 for C7000 and Synergy
# - API300 for C7000 and Synergy
# - API500 for C7000 and Synergy (see /examples/api500/storage_system.rb)
# - API600 for C7000 and Synergy (see /examples/api600/storage_system.rb)
# - API800 for C7000 and Synergy (see /examples/api600/storage_system.rb)
# - API1000 for C7000 and Synergy (see /examples/api600/storage_system.rb)
# - API1200 for C7000 and Synergy (see /examples/api600/storage_system.rb)
# - API1600 for C7000 and Synergy (see /examples/api600/storage_system.rb)
# Supported API Versions:
# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800

# Supported Variants:
# C7000 and Synergy for all API versions
#
raise 'ERROR: Must set @storage_system_ip in _client.rb' unless @storage_system_ip
raise 'ERROR: Must set @storage_system_username in _client.rb' unless @storage_system_username
raise 'ERROR: Must set @storage_system_password in _client.rb' unless @storage_system_password
Expand Down
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1800/c7000/storage_pool.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/storage_pool'

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

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

module OneviewSDK
module API1800
module Synergy
# Storage pool resource implementation for API1800 Synergy
class StoragePool < OneviewSDK::API1800::C7000::StoragePool
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1800/synergy/storage_system.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 '../c7000/storage_system'

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

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

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

it 'inherits from OneviewSDK::API1800::C7000::StoragePool' do
expect(described_class).to be < OneviewSDK::API1800::C7000::StoragePool
end
end
Loading

0 comments on commit c893ac0

Please sign in to comment.