Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
HarikaChebrolu committed May 26, 2020
2 parents 994f2b3 + 88bd2f9 commit e72d818
Show file tree
Hide file tree
Showing 18 changed files with 274 additions and 47 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -23,6 +23,7 @@ This release extends support of the SDK to OneView REST API version 1600 (OneVie
- Server Hardware Type
- Server Profile
- Server Profile Template
- Volume Template

## v5.11.0

Expand Down
72 changes: 36 additions & 36 deletions endpoints-support.md

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion examples/shared_samples/logical_interconnect.rb
Expand Up @@ -15,9 +15,12 @@
#
# Supported APIs:
# - 200, 300, 500, 600, 800, 1000, 1200
# Supported variants:
# Supported Variants:
# - C7000, Synergy

# for example, if api_version = 800 & variant = C7000 then, resource that can be created will be in form
# OneviewSDK::API800::C7000::LogicalInterconnect

# Resource Class used in this sample
logical_interconnect_class = OneviewSDK.resource_named('LogicalInterconnect', @client.api_version)

Expand Down
8 changes: 7 additions & 1 deletion examples/shared_samples/volume_template.rb
@@ -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 Down Expand Up @@ -27,6 +27,8 @@
# volume_template_class = OneviewSDK::API500::Synergy::VolumeTemplate
# volume_template_class = OneviewSDK::API600::C7000::VolumeTemplate
# volume_template_class = OneviewSDK::API600::Synergy::VolumeTemplate
# volume_template_class = OneviewSDK::API1600::C7000::VolumeTemplate
# volume_template_class = OneviewSDK::API1600::Synergy::VolumeTemplate

# Resources classes that you can use for Storage System in this example:
# storage_system_class = OneviewSDK::API200::StorageSystem
Expand All @@ -36,6 +38,8 @@
# storage_system_class = OneviewSDK::API500::Synergy::StorageSystem
# storage_system_class = OneviewSDK::API600::C7000::StorageSystem
# storage_system_class = OneviewSDK::API600::Synergy::StorageSystem
# storage_system_class = OneviewSDK::API1600::C7000::StorageSystem
# storage_system_class = OneviewSDK::API1600::Synergy::StorageSystem

# Resources classes that you can use for Storage Pool in this example:
# storage_pool_class = OneviewSDK::API200::StoragePool
Expand All @@ -45,6 +49,8 @@
# 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::API1600::C7000::StoragePool
# storage_pool_class = OneviewSDK::API1600::Synergy::StoragePool

# Resource classses used in this sample
volume_template_class = OneviewSDK.resource_named('VolumeTemplate', @client.api_version)
Expand Down
Expand Up @@ -26,10 +26,6 @@ def initialize(client, params = {}, api_ver = nil)
@data['type'] ||= 'logical-interconnectV8'
super
end

def self.api_version
1600
end
end
end
end
Expand Down
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/c7000/volume_template.rb
@@ -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/volume_template'

module OneviewSDK
module API1600
module C7000
# Volume Template resource implementation for API1600 C7000
class VolumeTemplate < OneviewSDK::API1200::C7000::VolumeTemplate
end
end
end
end
Expand Up @@ -26,10 +26,6 @@ def initialize(client, params = {}, api_ver = nil)
@data['type'] ||= 'logical-interconnectV8'
super
end

def self.api_version
1600
end
end
end
end
Expand Down
22 changes: 22 additions & 0 deletions lib/oneview-sdk/resource/api1600/synergy/volume_template.rb
@@ -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 API1600
module Synergy
# Volume Template resource implementation for API1600 Synergy
class VolumeTemplate < OneviewSDK::API1600::C7000::VolumeTemplate
end
end
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1000/c7000/volume_template_spec.rb
@@ -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::VolumeTemplate do
include_context 'shared context'

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

it 'inherits from OneviewSDK::API1000::C7000::VolumeTemplate' do
expect(described_class).to be < OneviewSDK::API1000::C7000::VolumeTemplate
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api1200/c7000/volume_template_spec.rb
@@ -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::VolumeTemplate do
include_context 'shared context'

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

it 'inherits from OneviewSDK::API1200::C7000::VolumeTemplate' do
expect(described_class).to be < OneviewSDK::API1200::C7000::VolumeTemplate
end
end
12 changes: 11 additions & 1 deletion spec/unit/resource/api1600/c7000/logical_interconnect_spec.rb
@@ -1,3 +1,14 @@
# (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::LogicalInterconnect do
Expand All @@ -6,7 +17,6 @@
it 'inherits from OneviewSDK::API1200::C7000::LogicalInterconnect' do
expect(described_class).to be < OneviewSDK::API1200::C7000::LogicalInterconnect
end

describe '#initialize' do
it 'should be initialize the instance with default values' do
item = described_class.new(@client_1600)
Expand Down
20 changes: 20 additions & 0 deletions spec/unit/resource/api1600/c7000/volume_template_spec.rb
@@ -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::VolumeTemplate do
include_context 'shared context'

it 'inherits from OneviewSDK::API1200::C7000::VolumeTemplate' do
expect(described_class).to be < OneviewSDK::API1200::C7000::VolumeTemplate
end
end
11 changes: 11 additions & 0 deletions spec/unit/resource/api1600/synergy/logical_interconnect_spec.rb
@@ -1,3 +1,14 @@
# (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::LogicalInterconnect do
Expand Down
20 changes: 20 additions & 0 deletions spec/unit/resource/api1600/synergy/volume_template_spec.rb
@@ -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::VolumeTemplate do
include_context 'shared context'

it 'inherits from OneviewSDK::API1600::C7000::VolumeTemplate' do
expect(described_class).to be < OneviewSDK::API1600::C7000::VolumeTemplate
end
end
20 changes: 20 additions & 0 deletions spec/unit/resource/api800/c7000/volume_template_spec.rb
@@ -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::API800::C7000::VolumeTemplate do
include_context 'shared context'

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

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

0 comments on commit e72d818

Please sign in to comment.