oneview-sdk 4.3.0 → 4.4.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 +7 -0
- data/README.md +1 -1
- data/lib/oneview-sdk/resource/api200/lig_uplink_set.rb +26 -4
- data/lib/oneview-sdk/resource/api200/server_profile.rb +2 -1
- 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: f612360de75ca04a4285a2c70fdd9b7312bf4d5f
|
4
|
+
data.tar.gz: e19d35eb77ca7736fa771a9db6839506edbc1edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600b8c1be525144a6e5d016445f9882c45c3ae720ece26df26717c6bfe6ee66894b8608264cd67944aba4929c8c1ea91e3972976fa51bea3e2d08ac83ce58386
|
7
|
+
data.tar.gz: e77487b5c6dfab5c60638ca25934425d7761caac90a6f37129ae74711d48e4d14f7b54af1fff49bf0a2781f27eafb6b3a61d29e90d999262c174d1fd7e23e5c4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## v4.4.0
|
2
|
+
|
3
|
+
#### Bug fixes & Enhancements
|
4
|
+
- [#216](https://github.com/HewlettPackard/oneview-sdk-ruby/issues/216) Missing support for Q ports in API300::Synergy::LIGUplinkSet, missing support for multiple Synergy frames
|
5
|
+
- [#228](https://github.com/HewlettPackard/oneview-sdk-ruby/issues/228) Method add_uplink for LIG Uplinks Set does not work with Q ports nor integer ports
|
6
|
+
- [#231](https://github.com/HewlettPackard/oneview-sdk-ruby/issues/#231) Support id in ServerProfile#add_connection
|
7
|
+
|
1
8
|
## v4.3.0
|
2
9
|
|
3
10
|
#### New Features:
|
data/README.md
CHANGED
@@ -40,15 +40,25 @@ module OneviewSDK
|
|
40
40
|
|
41
41
|
# Specify one uplink passing the virtual connect bay and the port to be attached.
|
42
42
|
# @param [Fixnum] bay number to identify the VC
|
43
|
-
# @param [String] port to attach the uplink.
|
44
|
-
|
43
|
+
# @param [String, Fixnum] port to attach the uplink. Examples: X1, D1, Q1, Q1.1, Q1:1, 67 ...
|
44
|
+
# @param [String] interconnect model name
|
45
|
+
# @param [Fixnum] enclosure number for multi-frame configurations
|
46
|
+
def add_uplink(bay, port, type = nil, enclosure_index = 1)
|
47
|
+
enclosure_index = type && type.include?('Virtual Connect SE 16Gb FC Module') ? -1 : enclosure_index
|
48
|
+
port =
|
49
|
+
if type
|
50
|
+
fetch_relative_value_of(port, type)
|
51
|
+
else
|
52
|
+
# Detect Integer port: for example 67 or '67'
|
53
|
+
port.to_s == port.to_i.to_s ? port.to_i : relative_value_of(port)
|
54
|
+
end
|
45
55
|
entry = {
|
46
56
|
'desiredSpeed' => 'Auto',
|
47
57
|
'logicalLocation' => {
|
48
58
|
'locationEntries' => [
|
49
59
|
{ 'relativeValue' => bay, 'type' => 'Bay' },
|
50
|
-
{ 'relativeValue' =>
|
51
|
-
{ 'relativeValue' =>
|
60
|
+
{ 'relativeValue' => enclosure_index, 'type' => 'Enclosure' },
|
61
|
+
{ 'relativeValue' => port, 'type' => 'Port' }
|
52
62
|
]
|
53
63
|
}
|
54
64
|
}
|
@@ -79,6 +89,18 @@ module OneviewSDK
|
|
79
89
|
end
|
80
90
|
port.to_i + offset
|
81
91
|
end
|
92
|
+
|
93
|
+
def fetch_relative_value_of(port, type)
|
94
|
+
port_formats = [port.sub('.', ':'), port.sub(':', '.')].uniq
|
95
|
+
interconnect_type = OneviewSDK::Interconnect.get_type(@client, type)
|
96
|
+
unless interconnect_type
|
97
|
+
list = OneviewSDK::Interconnect.get_types(@client).map { |t| t['name'] }
|
98
|
+
raise OneviewSDK::NotFound, "Interconnect type #{type} not found! Supported types: #{list}"
|
99
|
+
end
|
100
|
+
type_port = interconnect_type['portInfos'].find { |p| port_formats.include? p['portName'] }
|
101
|
+
raise OneviewSDK::NotFound, "Port #{port} not found!" unless type_port
|
102
|
+
type_port['portNumber']
|
103
|
+
end
|
82
104
|
end
|
83
105
|
end
|
84
106
|
end
|
@@ -148,6 +148,7 @@ module OneviewSDK
|
|
148
148
|
# The value can be 'Undefined', 'Reserved', or 'Deployed'.
|
149
149
|
# @option connection_options [String] 'functionType' Type of function required for the connection.
|
150
150
|
# functionType cannot be modified after the connection is created.
|
151
|
+
# @option connection_options [String] 'id' Unique identifier for this connection. Defaults to 0 (auto).
|
151
152
|
# @option connection_options [String] 'mac' The MAC address that is currently programmed on the FlexNic.
|
152
153
|
# @option connection_options [String] 'macType' Specifies the type of MAC address to be programmed into the IO Devices.
|
153
154
|
# The value can be 'Virtual', 'Physical' or 'UserDefined'.
|
@@ -165,7 +166,7 @@ module OneviewSDK
|
|
165
166
|
# The value can be 'Virtual', 'Physical' or 'UserDefined'.
|
166
167
|
def add_connection(network, connection_options = {})
|
167
168
|
self['connections'] = [] unless self['connections']
|
168
|
-
connection_options['id']
|
169
|
+
connection_options['id'] ||= 0 unless connection_options[:id] # Letting OneView treat the ID registering
|
169
170
|
connection_options['networkUri'] = network['uri'] if network['uri'] || network.retrieve!
|
170
171
|
self['connections'] << connection_options
|
171
172
|
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: 4.
|
4
|
+
version: 4.4.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: 2017-05-
|
14
|
+
date: 2017-05-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: thor
|
@@ -449,7 +449,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
449
449
|
version: '0'
|
450
450
|
requirements: []
|
451
451
|
rubyforge_project:
|
452
|
-
rubygems_version: 2.
|
452
|
+
rubygems_version: 2.4.5.2
|
453
453
|
signing_key:
|
454
454
|
specification_version: 4
|
455
455
|
summary: Gem to interact with the HPE OneView API
|