class OneviewSDK::API300::C7000::Switch

Switch resource implementation

Public Instance Methods

set_scope_uris(scope_uris) click to toggle source

Updates the scope URIs of a specific switch @param [Array] scope_uris Array of scope uri strings @deprecated Use {#add_scope}, {#remove_scope}, and {#replace_scopes} instead.

# File lib/oneview-sdk/resource/api300/c7000/switch.rb, line 25
def set_scope_uris(scope_uris)
  patch('replace', '/scopeUris', scope_uris)
end
update_port(portName, attributes) click to toggle source

Updates the switch ports @note Only the ports under the management of OneView and those that are unlinked are supported for update @param [String] portName port name @param [Hash] attributes hash with attributes and values to be changed

# 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