Method: OneviewSDK::API200::ServerProfile#add_connection
- Defined in:
- lib/oneview-sdk/resource/api200/server_profile.rb
#add_connection(network, connection_options = {}) ⇒ Object
Adds a connection entry to Server profile template
Parameters:
-
network
(OneviewSDK::EthernetNetwork, OneviewSDK::FCNetwork)
—
Network associated with the connection
-
connection_options
(Hash<String,String>)
(defaults to: {})
—
Hash containing the configuration of the connection
Options Hash (connection_options):
-
'allocatedMbps'
(Integer)
—
The transmit throughput (mbps) currently allocated to this connection. When Fibre Channel connections are set to Auto for requested bandwidth, the value can be set to -2000 to indicate that the actual value is unknown until OneView is able to negotiate the actual speed.
-
'allocatedVFs'
(Integer)
—
The number of virtual functions allocated to this connection. This value will be null.
-
'boot'
(Hash)
—
indicates that the server will attempt to boot from this connection. This object can only be specified if “boot.manageBoot” is set to ‘true’
-
'deploymentStatus'
(String)
—
The deployment status of the connection. The value can be ‘Undefined’, ‘Reserved’, or ‘Deployed’.
-
'functionType'
(String)
—
Type of function required for the connection. functionType cannot be modified after the connection is created.
-
'id'
(String)
—
Unique identifier for this connection. Defaults to 0 (auto).
-
'mac'
(String)
—
The MAC address that is currently programmed on the FlexNic.
-
'macType'
(String)
—
Specifies the type of MAC address to be programmed into the IO Devices. The value can be ‘Virtual’, ‘Physical’ or ‘UserDefined’.
-
'maximumMbps'
(String)
—
Maximum transmit throughput (mbps) allowed on this connection. The value is limited by the maximum throughput of the network link and maximumBandwidth of the selected network (networkUri). For Fibre Channel connections, the value is limited to the same value as the allocatedMbps.
-
'name'
(String)
—
A string used to identify the respective connection. The connection name is case insensitive, limited to 63 characters and must be unique within the profile.
-
'portId'
(String)
—
Identifies the port (FlexNIC) used for this connection.
-
'requestedMbps'
(String)
—
The transmit throughput (mbps) that should be allocated to this connection.
-
'requestedVFs'
(String)
—
This value can be “Auto” or 0.
-
'wwnn'
(String)
—
The node WWN address that is currently programmed on the FlexNic.
-
'wwpn'
(String)
—
The port WWN address that is currently programmed on the FlexNic.
-
'wwpnType'
(String)
—
Specifies the type of WWN address to be porgrammed on the FlexNIC. The value can be ‘Virtual’, ‘Physical’ or ‘UserDefined’.
167 168 169 170 171 172 173 |
# File 'lib/oneview-sdk/resource/api200/server_profile.rb', line 167 def add_connection(network, connection_options = {}) connection_options = Hash[connection_options.map { |k, v| [k.to_s, v] }] self['connections'] = [] unless self['connections'] connection_options['id'] ||= 0 connection_options['networkUri'] = network['uri'] if network['uri'] || network.retrieve! self['connections'] << connection_options end |