Method: OneviewSDK::API300::C7000::Switch#update_port
- Defined in:
- lib/oneview-sdk/resource/api300/c7000/switch.rb
#update_port(portName, attributes) ⇒ Object
Note:
Only the ports under the management of OneView and those that are unlinked are supported for update
Updates the switch ports
33 34 35 36 37 38 39 |
# File 'lib/oneview-sdk/resource/api300/c7000/switch.rb', line 33 def update_port(portName, attributes) ensure_uri port = @data['ports'].find { |p| p['portName'] == portName } attributes.each { |key, value| port[key.to_s] = value } response = @client.rest_put(@data['uri'] + '/update-ports', 'body' => [port]) @client.response_handler(response) end |