oneview-sdk 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -1
- data/Rakefile +92 -21
- data/lib/oneview-sdk/resource/api200/interconnect.rb +2 -0
- data/lib/oneview-sdk/resource/api200/logical_interconnect.rb +22 -1
- data/lib/oneview-sdk/resource/api200/unmanaged_device.rb +1 -1
- data/lib/oneview-sdk/resource/api200/uplink_set.rb +9 -0
- data/lib/oneview-sdk/resource/api300/c7000/interconnect.rb +12 -0
- data/lib/oneview-sdk/resource/api300/c7000/logical_interconnect.rb +42 -0
- data/lib/oneview-sdk/resource/api300/c7000/managed_san.rb +1 -1
- data/lib/oneview-sdk/resource/api300/c7000/unmanaged_device.rb +1 -0
- data/lib/oneview-sdk/resource/api300/c7000/uplink_set.rb +12 -0
- data/lib/oneview-sdk/resource/api300/c7000/volume_attachment.rb +1 -0
- data/lib/oneview-sdk/resource/api300/synergy/interconnect.rb +11 -1
- data/lib/oneview-sdk/resource/api300/synergy/logical_interconnect.rb +23 -2
- data/lib/oneview-sdk/resource/api300/synergy/unmanaged_device.rb +1 -0
- data/lib/oneview-sdk/resource/api300/synergy/uplink_set.rb +12 -0
- data/lib/oneview-sdk/resource/api300/synergy/volume_attachment.rb +1 -0
- data/lib/oneview-sdk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 372d3a8311ef4dcf063cb3f676f80a50b0f0cbad
|
4
|
+
data.tar.gz: f9b40be85309db48aeb5fb1c46c6360e24cc25de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32078616e43270abf2f7f66dbb8b91b57c07f712ebe7d41a76e5dd4628ae47c87cb54cb7c6e2f365ce370836f0eb2766f6c2fc91315aeefb793ec07db642bd1f
|
7
|
+
data.tar.gz: 1f1d3498c12f5feebf1631f45e170fa6d49ab9b2d893c0de1ff46bfb4d65ab8513cbf8d41aa6baafdfbec5347139f1f502fb4f87e2fd5e39920ca2a5f98fc2da
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,58 @@
|
|
1
|
+
# v3.1.0
|
2
|
+
1. Added full support to OneView Rest API version 300 for the hardware variants C7000 and Synergy to the already existing features:
|
3
|
+
- Interconnect
|
4
|
+
- Logical Interconnect
|
5
|
+
- Uplink Set
|
6
|
+
- Volume attachment
|
7
|
+
- Unmanaged devices
|
8
|
+
|
9
|
+
### Features supported
|
10
|
+
- Connection template
|
11
|
+
- Datacenter
|
12
|
+
- Enclosure
|
13
|
+
- Ethernet network
|
14
|
+
- Fabrics
|
15
|
+
- FC network
|
16
|
+
- FCoE network
|
17
|
+
- Firmware bundles
|
18
|
+
- Firmware drivers
|
19
|
+
- Interconnect
|
20
|
+
- Logical downlink
|
21
|
+
- Logical enclosure
|
22
|
+
- Logical interconnect
|
23
|
+
- Logical interconnect Group
|
24
|
+
- Uplink Set
|
25
|
+
- Logical switch
|
26
|
+
- Logical switch group
|
27
|
+
- Managed SANs
|
28
|
+
- Network set
|
29
|
+
- Power devices
|
30
|
+
- Racks
|
31
|
+
- SAN managers
|
32
|
+
- Server hardware
|
33
|
+
- Server hardware type
|
34
|
+
- Server profile
|
35
|
+
- Server profile template
|
36
|
+
- Storage pools
|
37
|
+
- Storage systems
|
38
|
+
- Switches
|
39
|
+
- Volume
|
40
|
+
- Volume attachment
|
41
|
+
- Volume template
|
42
|
+
- Drive Enclosures
|
43
|
+
- Interconnect Link Topology
|
44
|
+
- Internal Link Set
|
45
|
+
- SAS Interconnect
|
46
|
+
- SAS Interconnect Type
|
47
|
+
- SAS Logical Interconnect
|
48
|
+
- SAS Logical Interconnect Group
|
49
|
+
- SAS Logical JBOD Attachments
|
50
|
+
- SAS Logical JBODs
|
51
|
+
- Unmanaged devices
|
52
|
+
|
53
|
+
2. Bug fixes:
|
54
|
+
- Fixed issue #124 Missing argument in API300 C7000 Managed SAN method.
|
55
|
+
|
1
56
|
# v3.0.0
|
2
57
|
### Notes
|
3
58
|
This is the Third major version of the Ruby SDK for HPE OneView. It features a split in the API support, allowing for C7000 and Synergy hardware variants to be used, while maintaining compatibility to older versions. There are some code improvements applied throughout the release, as well as additional endpoints support.
|
@@ -83,7 +138,6 @@
|
|
83
138
|
- Power devices
|
84
139
|
- Racks
|
85
140
|
- Server hardware types
|
86
|
-
- Unmanaged devices
|
87
141
|
3. New exceptions to address the most common issues (Check them in *lib/oneview-sdk/resource/exceptions.rb*)
|
88
142
|
|
89
143
|
### Breaking changes
|
data/Rakefile
CHANGED
@@ -58,32 +58,104 @@ end
|
|
58
58
|
|
59
59
|
desc 'Run System tests'
|
60
60
|
RSpec::Core::RakeTask.new('spec:system') do |spec|
|
61
|
-
spec.pattern =
|
61
|
+
spec.pattern = spec_pattern
|
62
62
|
spec.rspec_opts = def_int_spec_options
|
63
63
|
spec.rspec_opts << ' --tag system'
|
64
64
|
end
|
65
65
|
|
66
|
+
desc 'Run System tests for specified model & API. Defaults to model C7000 and API 300.'
|
67
|
+
task 'spec:system:api_version_model', [:api, :model] do |_t, spec|
|
68
|
+
args = {}
|
69
|
+
args['model'] = spec['model'] || 'c7000'
|
70
|
+
args['api'] = spec['api'] || 300
|
71
|
+
spec_pattern = "spec/system/**/api#{args['api']}/#{args['model']}/*_spec.rb"
|
72
|
+
spec_pattern = 'spec/system/**/api200/*_spec.rb' if args['api'] == '200'
|
73
|
+
Rake::Task['spec:system'].invoke
|
74
|
+
end
|
75
|
+
|
76
|
+
desc 'Run System tests for specified API. Defaults to API 300.'
|
77
|
+
task 'spec:system:api_version', [:api] do |_t, spec|
|
78
|
+
args = spec['api'] || 300
|
79
|
+
spec_pattern = "spec/system/**/api#{args}/**/*_spec.rb"
|
80
|
+
spec_pattern = 'spec/system/**/api200/*_spec.rb' if args == '200'
|
81
|
+
Rake::Task['spec:system'].invoke
|
82
|
+
end
|
83
|
+
|
66
84
|
desc 'Run System tests Light Profile'
|
67
85
|
RSpec::Core::RakeTask.new('spec:system:light') do |spec|
|
68
|
-
spec.pattern = 'spec/system/light_profile
|
86
|
+
spec.pattern = 'spec/system/light_profile/**/*_spec.rb'
|
69
87
|
spec.rspec_opts = def_int_spec_options
|
70
88
|
spec.rspec_opts << ' --tag system'
|
71
89
|
end
|
72
90
|
|
91
|
+
desc 'Run System tests Light Profile for specified model & API. Defaults to model C7000 and API 300.'
|
92
|
+
task 'spec:system:light:api_version_model', [:api, :model] do |_t, spec|
|
93
|
+
args = {}
|
94
|
+
args['model'] = spec['model'] || 'c7000'
|
95
|
+
args['api'] = spec['api'] || 300
|
96
|
+
spec_pattern = "spec/system/light_profile/api#{args['api']}/#{args['model']}/*_spec.rb"
|
97
|
+
spec_pattern = 'spec/system/light_profile/api200/*_spec.rb' if args['api'] == '200'
|
98
|
+
Rake::Task['spec:system'].invoke
|
99
|
+
end
|
100
|
+
|
101
|
+
desc 'Run System tests Light Profile for specified API. Defaults to API 300.'
|
102
|
+
task 'spec:system:light:api_version', [:api] do |_t, spec|
|
103
|
+
args = spec['api'] || 300
|
104
|
+
spec_pattern = "spec/system/light_profile/api#{args}/**/*_spec.rb"
|
105
|
+
spec_pattern = 'spec/system/light_profile/api200/*_spec.rb' if args == '200'
|
106
|
+
Rake::Task['spec:system'].invoke
|
107
|
+
end
|
108
|
+
|
73
109
|
desc 'Run System tests Medium Profile'
|
74
110
|
RSpec::Core::RakeTask.new('spec:system:medium') do |spec|
|
75
|
-
spec.pattern = 'spec/system/medium_profile
|
111
|
+
spec.pattern = 'spec/system/medium_profile/**/*_spec.rb'
|
76
112
|
spec.rspec_opts = def_int_spec_options
|
77
113
|
spec.rspec_opts << ' --tag system'
|
78
114
|
end
|
79
115
|
|
116
|
+
desc 'Run System tests Medium Profile for specified model & API. Defaults to model C7000 and API 300.'
|
117
|
+
task 'spec:system:medium:api_version_model', [:api, :model] do |_t, spec|
|
118
|
+
args = {}
|
119
|
+
args['model'] = spec['model'] || 'c7000'
|
120
|
+
args['api'] = spec['api'] || 300
|
121
|
+
spec_pattern = "spec/system/medium_profile/api#{args['api']}/#{args['model']}/*_spec.rb"
|
122
|
+
spec_pattern = 'spec/system/medium_profile/api200/*_spec.rb' if args['api'] == '200'
|
123
|
+
Rake::Task['spec:system'].invoke
|
124
|
+
end
|
125
|
+
|
126
|
+
desc 'Run System tests Medium Profile for specified API. Defaults to API 300.'
|
127
|
+
task 'spec:system:medium:api_version', [:api] do |_t, spec|
|
128
|
+
args = spec['api'] || 300
|
129
|
+
spec_pattern = "spec/system/medium_profile/api#{args}/**/*_spec.rb"
|
130
|
+
spec_pattern = 'spec/system/medium_profile/api200/*_spec.rb' if args == '200'
|
131
|
+
Rake::Task['spec:system'].invoke
|
132
|
+
end
|
133
|
+
|
80
134
|
desc 'Run System tests Heavy Profile'
|
81
135
|
RSpec::Core::RakeTask.new('spec:system:heavy') do |spec|
|
82
|
-
spec.pattern = 'spec/system/heavy_profile
|
136
|
+
spec.pattern = 'spec/system/heavy_profile/**/*_spec.rb'
|
83
137
|
spec.rspec_opts = def_int_spec_options
|
84
138
|
spec.rspec_opts << ' --tag system'
|
85
139
|
end
|
86
140
|
|
141
|
+
desc 'Run System tests Heavy Profile for specified model & API. Defaults to model C7000 and API 300.'
|
142
|
+
task 'spec:system:heavy:api_version_model', [:api, :model] do |_t, spec|
|
143
|
+
args = {}
|
144
|
+
args['model'] = spec['model'] || 'c7000'
|
145
|
+
args['api'] = spec['api'] || 300
|
146
|
+
spec_pattern = "spec/system/heavy_profile/api#{args['api']}/#{args['model']}/*_spec.rb"
|
147
|
+
spec_pattern = 'spec/system/heavy_profile/api200/*_spec.rb' if args['api'] == '200'
|
148
|
+
Rake::Task['spec:system'].invoke
|
149
|
+
end
|
150
|
+
|
151
|
+
desc 'Run System tests Heavy Profile for specified API. Defaults to API 300.'
|
152
|
+
task 'spec:system:heavy:api_version', [:api] do |_t, spec|
|
153
|
+
args = spec['api'] || 300
|
154
|
+
spec_pattern = "spec/system/heavy_profile/api#{args}/**/*_spec.rb"
|
155
|
+
spec_pattern = 'spec/system/heavy_profile/api200/*_spec.rb' if args == '200'
|
156
|
+
Rake::Task['spec:system'].invoke
|
157
|
+
end
|
158
|
+
|
87
159
|
RuboCop::RakeTask.new do |task|
|
88
160
|
task.options << '--display-cop-names'
|
89
161
|
end
|
@@ -109,31 +181,30 @@ task 'test:path', [:path] do |_t, spec|
|
|
109
181
|
Rake::Task['spec:integration'].invoke
|
110
182
|
end
|
111
183
|
|
112
|
-
desc 'Run rubocop & integration tests for specified
|
113
|
-
task 'spec:integration:api', [:
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
spec_pattern =
|
118
|
-
spec_pattern = 'spec/integration/resource/api200/**/*_spec.rb' if args['api'] == 200
|
184
|
+
desc 'Run rubocop & integration tests for specified API version & model. Default: [300,c7000]'
|
185
|
+
task 'spec:integration:api', [:version, :model] do |_t, spec|
|
186
|
+
version = spec['version'] || 300
|
187
|
+
model = spec['model'] || 'c7000'
|
188
|
+
spec_pattern = "spec/integration/resource/api#{version}/#{model}/**/*_spec.rb"
|
189
|
+
spec_pattern = 'spec/integration/resource/api200/**/*_spec.rb' if version.to_s == '200'
|
119
190
|
Rake::Task[:rubocop].invoke
|
120
191
|
Rake::Task['spec:integration'].invoke
|
121
192
|
end
|
122
193
|
|
123
|
-
desc 'Run rubocop & integration tests for specified API.
|
124
|
-
task 'spec:integration:api_version', [:
|
125
|
-
|
126
|
-
spec_pattern = "spec/integration/resource/api#{
|
127
|
-
spec_pattern = 'spec/integration/resource/api200/**/*_spec.rb' if
|
194
|
+
desc 'Run rubocop & integration tests for specified API version. Default: 300'
|
195
|
+
task 'spec:integration:api_version', [:ver] do |_t, spec|
|
196
|
+
version = spec['ver'] || 300
|
197
|
+
spec_pattern = "spec/integration/resource/api#{version}/**/**/*_spec.rb"
|
198
|
+
spec_pattern = 'spec/integration/resource/api200/**/*_spec.rb' if version.to_s == '200'
|
128
199
|
Rake::Task[:rubocop].invoke
|
129
200
|
Rake::Task['spec:integration'].invoke
|
130
201
|
end
|
131
202
|
|
132
|
-
desc 'Run rubocop & integration deletion tests for specified API.
|
133
|
-
task 'spec:integration:delete:api_version', [:
|
134
|
-
|
135
|
-
spec_pattern = "spec/integration/resource/api#{
|
136
|
-
spec_pattern = 'spec/integration/resource/api200/**/*delete_spec.rb' if
|
203
|
+
desc 'Run rubocop & integration deletion tests for specified API version. Default: 300'
|
204
|
+
task 'spec:integration:delete:api_version', [:ver] do |_t, spec|
|
205
|
+
version = spec['ver'] || 300
|
206
|
+
spec_pattern = "spec/integration/resource/api#{version}/**/**/*delete_spec.rb"
|
207
|
+
spec_pattern = 'spec/integration/resource/api200/**/*delete_spec.rb' if version.to_s == '200'
|
137
208
|
Rake::Task[:rubocop].invoke
|
138
209
|
Rake::Task['spec:integration'].invoke
|
139
210
|
end
|
@@ -25,6 +25,8 @@ module OneviewSDK
|
|
25
25
|
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
26
26
|
def initialize(client, params = {}, api_ver = nil)
|
27
27
|
super
|
28
|
+
# Default values:
|
29
|
+
@data['type'] ||= 'InterconnectV3'
|
28
30
|
end
|
29
31
|
|
30
32
|
# Method is not available
|
@@ -18,6 +18,16 @@ module OneviewSDK
|
|
18
18
|
BASE_URI = '/rest/logical-interconnects'.freeze
|
19
19
|
LOCATION_URI = '/rest/logical-interconnects/locations/interconnects'.freeze
|
20
20
|
|
21
|
+
# Create a resource object, associate it with a client, and set its properties.
|
22
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
23
|
+
# @param [Hash] params The options for this resource (key-value pairs)
|
24
|
+
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
25
|
+
def initialize(client, params = {}, api_ver = nil)
|
26
|
+
super
|
27
|
+
# Default values:
|
28
|
+
@data['type'] ||= 'logical-interconnectV3'
|
29
|
+
end
|
30
|
+
|
21
31
|
# Creates an Interconnect in the desired bay in a specified enclosure
|
22
32
|
# WARN: It does not create the LOGICAL INTERCONNECT itself.
|
23
33
|
# It will fail if no interconnect is already present on the specified position
|
@@ -133,6 +143,17 @@ module OneviewSDK
|
|
133
143
|
set_all(body)
|
134
144
|
end
|
135
145
|
|
146
|
+
# Gets a collection of uplink ports from the member interconnects
|
147
|
+
# which are eligible for assignment to an analyzer port.
|
148
|
+
# @return [Hash] Hash of uplink ports eligibles for assignment to an analyzer port
|
149
|
+
def get_unassigned_uplink_ports_for_port_monitor
|
150
|
+
ensure_client && ensure_uri
|
151
|
+
response = @client.rest_get("#{@data['uri']}/unassignedUplinkPortsForPortMonitor")
|
152
|
+
@client.response_handler(response)
|
153
|
+
body = @client.response_handler(response)
|
154
|
+
body['members']
|
155
|
+
end
|
156
|
+
|
136
157
|
# Updates port monitor settings of the Logical Interconnect
|
137
158
|
# @note The attribute is defined inside the instance of the Logical Interconnect
|
138
159
|
# @return Updated instance of the Logical Interconnect
|
@@ -142,7 +163,7 @@ module OneviewSDK
|
|
142
163
|
'If-Match' => @data['portMonitor'].delete('eTag'),
|
143
164
|
'body' => @data['portMonitor']
|
144
165
|
}
|
145
|
-
response = @client.rest_put(@data['
|
166
|
+
response = @client.rest_put("#{@data['uri']}/port-monitor", update_options, @api_version)
|
146
167
|
body = @client.response_handler(response)
|
147
168
|
set_all(body)
|
148
169
|
end
|
@@ -78,6 +78,15 @@ module OneviewSDK
|
|
78
78
|
raise IncompleteResource, 'Must set network uri attribute' unless uri
|
79
79
|
@data['fcoeNetworkUris'].push(uri)
|
80
80
|
end
|
81
|
+
|
82
|
+
# Gets the unassigned uplink ports
|
83
|
+
# @return [Array] List of unassigned uplink-ports
|
84
|
+
def get_unassigned_ports
|
85
|
+
ensure_client && ensure_uri
|
86
|
+
response = @client.rest_post(BASE_URI + '/unassignedUplinkPorts', { 'body' => @data }, @api_version)
|
87
|
+
result = @client.response_handler(response)
|
88
|
+
result['members']
|
89
|
+
end
|
81
90
|
end
|
82
91
|
end
|
83
92
|
end
|
@@ -14,7 +14,19 @@ require_relative '../../api200/interconnect'
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
16
|
module C7000
|
17
|
+
# Interconnect resource implementation on API300 C7000
|
17
18
|
class Interconnect < OneviewSDK::API200::Interconnect
|
19
|
+
|
20
|
+
# Create a resource object, associate it with a client, and set its properties.
|
21
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
22
|
+
# @param [Hash] params The options for this resource (key-value pairs)
|
23
|
+
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
24
|
+
def initialize(client, params = {}, api_ver = nil)
|
25
|
+
@data ||= {}
|
26
|
+
# Default values:
|
27
|
+
@data['type'] ||= 'InterconnectV300'
|
28
|
+
super
|
29
|
+
end
|
18
30
|
end
|
19
31
|
end
|
20
32
|
end
|
@@ -14,7 +14,49 @@ require_relative '../../api200/logical_interconnect'
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
16
|
module C7000
|
17
|
+
# Logical interconnect resource implementation for API300 C7000
|
17
18
|
class LogicalInterconnect < OneviewSDK::API200::LogicalInterconnect
|
19
|
+
|
20
|
+
# Create a resource object, associate it with a client, and set its properties.
|
21
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
22
|
+
# @param [Hash] params The options for this resource (key-value pairs)
|
23
|
+
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
24
|
+
def initialize(client, params = {}, api_ver = nil)
|
25
|
+
@data ||= {}
|
26
|
+
# Default values:
|
27
|
+
@data['type'] ||= 'logical-interconnectV300'
|
28
|
+
super
|
29
|
+
end
|
30
|
+
|
31
|
+
# Lists internal networks on the logical interconnect
|
32
|
+
# @return [OneviewSDK::Resource] List of networks
|
33
|
+
def list_vlan_networks
|
34
|
+
ensure_client && ensure_uri
|
35
|
+
results = OneviewSDK::Resource.find_by(@client, {}, @data['uri'] + '/internalVlans')
|
36
|
+
internal_networks = []
|
37
|
+
results.each do |vlan|
|
38
|
+
net = if vlan['generalNetworkUri'].include? 'ethernet-network'
|
39
|
+
OneviewSDK::API300::C7000::EthernetNetwork.new(@client, uri: vlan['generalNetworkUri'])
|
40
|
+
elsif vlan['generalNetworkUri'].include? 'fc-network'
|
41
|
+
OneviewSDK::API300::C7000::FCNetwork.new(@client, uri: vlan['generalNetworkUri'])
|
42
|
+
else
|
43
|
+
OneviewSDK::API300::C7000::FCoENetwork.new(@client, uri: vlan['generalNetworkUri'])
|
44
|
+
end
|
45
|
+
net.retrieve!
|
46
|
+
internal_networks.push(net)
|
47
|
+
end
|
48
|
+
internal_networks
|
49
|
+
end
|
50
|
+
|
51
|
+
# Updates settings of the logical interconnect
|
52
|
+
# @param options Options to update the Logical Interconnect
|
53
|
+
# @return Updated instance of the Logical Interconnect
|
54
|
+
def update_settings(options = {})
|
55
|
+
options['type'] ||= 'InterconnectSettingsV201'
|
56
|
+
options['ethernetSettings'] ||= {}
|
57
|
+
options['ethernetSettings']['type'] ||= 'EthernetInterconnectSettingsV201'
|
58
|
+
super(options)
|
59
|
+
end
|
18
60
|
end
|
19
61
|
end
|
20
62
|
end
|
@@ -14,7 +14,19 @@ require_relative '../../api200/uplink_set'
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
16
|
module C7000
|
17
|
+
# Uplink set resource implementation for API300 C7000
|
17
18
|
class UplinkSet < OneviewSDK::API200::UplinkSet
|
19
|
+
|
20
|
+
# Create a resource object, associate it with a client, and set its properties.
|
21
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
22
|
+
# @param [Hash] params The options for this resource (key-value pairs)
|
23
|
+
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
24
|
+
def initialize(client, params = {}, api_ver = nil)
|
25
|
+
# Default values for api300
|
26
|
+
@data ||= {}
|
27
|
+
@data['type'] ||= 'uplink-setV300'
|
28
|
+
super
|
29
|
+
end
|
18
30
|
end
|
19
31
|
end
|
20
32
|
end
|
@@ -14,10 +14,20 @@ require_relative '../../api200/interconnect'
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
16
|
module Synergy
|
17
|
-
# Interconnect resource implementation
|
17
|
+
# Interconnect resource implementation on API300 Synergy
|
18
18
|
class Interconnect < OneviewSDK::API200::Interconnect
|
19
19
|
LINK_TOPOLOGY_URI = '/rest/interconnect-link-topologies'.freeze
|
20
20
|
|
21
|
+
# Create a resource object, associate it with a client, and set its properties.
|
22
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
23
|
+
# @param [Hash] params The options for this resource (key-value pairs)
|
24
|
+
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
25
|
+
def initialize(client, params = {}, api_ver = nil)
|
26
|
+
@data ||= {}
|
27
|
+
# Default values:
|
28
|
+
@data['type'] ||= 'InterconnectV300'
|
29
|
+
super
|
30
|
+
end
|
21
31
|
|
22
32
|
# Retrieves the interconnect link topologies
|
23
33
|
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
@@ -9,12 +9,33 @@
|
|
9
9
|
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
10
10
|
# language governing permissions and limitations under the License.
|
11
11
|
|
12
|
-
require_relative '
|
12
|
+
require_relative '../c7000/logical_interconnect'
|
13
13
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
16
|
module Synergy
|
17
|
-
|
17
|
+
# Logical interconnect resource implementation for API300 Synergy
|
18
|
+
class LogicalInterconnect < OneviewSDK::API300::C7000::LogicalInterconnect
|
19
|
+
|
20
|
+
# Lists internal networks on the logical interconnect
|
21
|
+
# @return [OneviewSDK::Resource] List of networks
|
22
|
+
def list_vlan_networks
|
23
|
+
ensure_client && ensure_uri
|
24
|
+
results = OneviewSDK::Resource.find_by(@client, {}, @data['uri'] + '/internalVlans')
|
25
|
+
internal_networks = []
|
26
|
+
results.each do |vlan|
|
27
|
+
net = if vlan['generalNetworkUri'].include? 'ethernet-network'
|
28
|
+
OneviewSDK::API300::Synergy::EthernetNetwork.new(@client, uri: vlan['generalNetworkUri'])
|
29
|
+
elsif vlan['generalNetworkUri'].include? 'fc-network'
|
30
|
+
OneviewSDK::API300::Synergy::FCNetwork.new(@client, uri: vlan['generalNetworkUri'])
|
31
|
+
else
|
32
|
+
OneviewSDK::API300::Synergy::FCoENetwork.new(@client, uri: vlan['generalNetworkUri'])
|
33
|
+
end
|
34
|
+
net.retrieve!
|
35
|
+
internal_networks.push(net)
|
36
|
+
end
|
37
|
+
internal_networks
|
38
|
+
end
|
18
39
|
end
|
19
40
|
end
|
20
41
|
end
|
@@ -14,7 +14,19 @@ require_relative '../../api200/uplink_set'
|
|
14
14
|
module OneviewSDK
|
15
15
|
module API300
|
16
16
|
module Synergy
|
17
|
+
# Uplink set resource implementation for API300 Synergy
|
17
18
|
class UplinkSet < OneviewSDK::API200::UplinkSet
|
19
|
+
|
20
|
+
# Create a resource object, associate it with a client, and set its properties.
|
21
|
+
# @param [OneviewSDK::Client] client The client object for the OneView appliance
|
22
|
+
# @param [Hash] params The options for this resource (key-value pairs)
|
23
|
+
# @param [Integer] api_ver The api version to use when interracting with this resource.
|
24
|
+
def initialize(client, params = {}, api_ver = nil)
|
25
|
+
# Default values for api300
|
26
|
+
@data ||= {}
|
27
|
+
@data['type'] ||= 'uplink-setV300'
|
28
|
+
super
|
29
|
+
end
|
18
30
|
end
|
19
31
|
end
|
20
32
|
end
|
data/lib/oneview-sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oneview-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Diomede
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thor
|
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
305
|
version: '0'
|
306
306
|
requirements: []
|
307
307
|
rubyforge_project:
|
308
|
-
rubygems_version: 2.6.
|
308
|
+
rubygems_version: 2.6.8
|
309
309
|
signing_key:
|
310
310
|
specification_version: 4
|
311
311
|
summary: Gem to interact with the HPE OneView API
|