-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
124 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# (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/interconnect' | ||
|
||
module OneviewSDK | ||
module API1600 | ||
module C7000 | ||
# Interconnect resource implementation on API1600 C7000 | ||
class Interconnect < OneviewSDK::API1200::C7000::Interconnect | ||
include OneviewSDK::ResourceHelper::ConfigurationOperation | ||
# Create a resource object, associate it with a client, and set its properties. | ||
# @param [OneviewSDK::Client] client The client object for the OneView appliance | ||
# @param [Hash] params The options for this resource (key-value pairs) | ||
# @param [Integer] api_ver The api version to use when interracting with this resource. | ||
def initialize(client, params = {}, api_ver = nil) | ||
@data ||= {} | ||
# Default values | ||
@data['type'] ||= 'InterconnectV7' | ||
super | ||
end | ||
|
||
def self.api_version | ||
1600 | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# (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/synergy/interconnect' | ||
|
||
module OneviewSDK | ||
module API1600 | ||
module Synergy | ||
# Interconnect resource implementation on API1600 Synergy | ||
class Interconnect < OneviewSDK::API1200::Synergy::Interconnect | ||
# Create a resource object, associate it with a client, and set its properties. | ||
# @param [OneviewSDK::Client] client The client object for the OneView appliance | ||
# @param [Hash] params The options for this resource (key-value pairs) | ||
# @param [Integer] api_ver The api version to use when interracting with this resource. | ||
def initialize(client, params = {}, api_ver = nil) | ||
@data ||= {} | ||
# Default values | ||
@data['type'] ||= 'InterconnectV7' | ||
super | ||
end | ||
|
||
def self.api_version | ||
1600 | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe OneviewSDK::API1600::C7000::Interconnect do | ||
include_context 'shared context' | ||
|
||
it 'inherits from OneviewSDK::API1200::C7000::Interconnect' do | ||
expect(described_class).to be < OneviewSDK::API1200::C7000::Interconnect | ||
end | ||
|
||
describe '#initialize' do | ||
it 'should be initialize the instance with default values' do | ||
item = described_class.new(@client_1600) | ||
expect(item['type']).to eq('InterconnectV7') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.describe OneviewSDK::API1600::Synergy::Interconnect do | ||
include_context 'shared context' | ||
|
||
it 'inherits from OneviewSDK::API1200::Synergy::Interconnect' do | ||
expect(described_class).to be < OneviewSDK::API1200::Synergy::Interconnect | ||
end | ||
|
||
describe '#initialize' do | ||
it 'should be initialize the instance with default values' do | ||
item = described_class.new(@client_1600) | ||
expect(item['type']).to eq('InterconnectV7') | ||
end | ||
end | ||
end |