Skip to content

Commit

Permalink
Merge pull request #463 from HewlettPackard/API2000_Volumes
Browse files Browse the repository at this point in the history
API2000 support for Storage resources
  • Loading branch information
yuvirani committed Sep 10, 2020
2 parents 1e6edd8 + 03d76ab commit aefc985
Show file tree
Hide file tree
Showing 27 changed files with 476 additions and 51 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ This release extends support to OneView Rest API version 2000 (OneView v5.40) fo
- Server Certificate
- Server Profile
- Server Profile Template
- Storage Pool
- Storage System
- Volume
- Volume Attachment
- Volume Template

#### Bug fixes & Enhancements:
- Enahanced the method to set the default API version to appliance's max API version instead of hardcoded 200.
- Enhanced the method to set the default API version to appliance's max API version instead of hardcoded 200.

## v5.15.0

Expand Down
90 changes: 45 additions & 45 deletions endpoints-support.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/shared_samples/storage_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# @storage_system_ip

# Supported API Versions:
# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800
# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 and 2000

# Supported Variants:
# C7000 and Synergy for all API versions
Expand Down
2 changes: 1 addition & 1 deletion examples/shared_samples/storage_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# @storage_system_password

# Supported API Versions:
# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800
# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 and 2000

# Supported Variants:
# C7000 and Synergy for all API versions
Expand Down
2 changes: 1 addition & 1 deletion examples/shared_samples/volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

# Supported API Versions
# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800
# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 and 2000

# Supported Variants:
# C7000 and Synergy for all API versions
Expand Down
2 changes: 1 addition & 1 deletion examples/shared_samples/volume_attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
require_relative '../_client' # Gives access to @client

# All supported APIs for Volume Attachment:
# - 200, 300, 500, 600, 800, 1000, 1200, 1600 and 1800
# - 200, 300, 500, 600, 800, 1000, 1200, 1600, 1800 and 2000

# Supported Variants:
# C7000 and Synergy for all API versions
Expand Down
2 changes: 1 addition & 1 deletion examples/shared_samples/volume_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# @storage_system_ip

# All supported APIs for Volume Template:
# - 200, 300, 500. 600, 800, 1000, 1200, 1600 and 1800
# - 200, 300, 500. 600, 800, 1000, 1200, 1600, 1800 and 2000

raise 'Must set @storage_system_ip in _client.rb' unless @storage_system_ip

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

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

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

module OneviewSDK
module API2000
module C7000
# Volume resource implementation on API2000 C7000
class Volume < OneviewSDK::API1800::C7000::Volume
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/c7000/volume_attachment.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 '../../api1800/c7000/volume_attachment'

module OneviewSDK
module API2000
module C7000
# Storage Volume Attachment resource implementation for API2000 C7000
class VolumeAttachment < OneviewSDK::API1800::C7000::VolumeAttachment
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/c7000/volume_template.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 '../../api1800/c7000/volume_template'

module OneviewSDK
module API2000
module C7000
# Volume Template resource implementation for API2000 C7000
class VolumeTemplate < OneviewSDK::API1800::C7000::VolumeTemplate
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/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 API2000
module Synergy
# Storage pool resource implementation for API2000 Synergy
class StoragePool < OneviewSDK::API2000::C7000::StoragePool
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/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 API2000
module Synergy
# Storage system resource implementation for API2000 Synergy
class StorageSystem < OneviewSDK::API2000::C7000::StorageSystem
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/synergy/volume.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/volume'

module OneviewSDK
module API2000
module Synergy
# Volume resource implementation for API2000 Synergy
class Volume < OneviewSDK::API2000::C7000::Volume
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/synergy/volume_attachment.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/volume_attachment'

module OneviewSDK
module API2000
module Synergy
# Storage Volume Attachment resource implementation for API2000 Synergy
class VolumeAttachment < OneviewSDK::API2000::C7000::VolumeAttachment
end
end
end
end
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api2000/synergy/volume_template.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/volume_template'

module OneviewSDK
module API2000
module Synergy
# Volume Template resource implementation for API2000 Synergy
class VolumeTemplate < OneviewSDK::API2000::C7000::VolumeTemplate
end
end
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api2000/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::API2000::C7000::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
20 changes: 20 additions & 0 deletions spec/unit/resource/api2000/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::API2000::C7000::StorageSystem do
include_context 'shared context'

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

it 'inherits from OneviewSDK::API1800::C7000::VolumeAttachment' do
expect(described_class).to be < OneviewSDK::API1800::C7000::VolumeAttachment
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api2000/c7000/volume_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::API2000::C7000::Volume do
include_context 'shared context'

it 'inherits from OneviewSDK::API1800::C7000::Volume' do
expect(described_class).to be < OneviewSDK::API1800::C7000::Volume
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api2000/c7000/volume_template_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::API2000::C7000::VolumeTemplate do
include_context 'shared context'

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

0 comments on commit aefc985

Please sign in to comment.