Class: OneviewSDK::API300::C7000::Switch

Inherits:
OneviewSDK::API200::Switch show all
Defined in:
lib/oneview-sdk/resource/api300/c7000/switch.rb

Overview

Switch resource implementation

Constant Summary

Constants inherited from OneviewSDK::API200::Switch

OneviewSDK::API200::Switch::BASE_URI, OneviewSDK::API200::Switch::TYPE_URI, OneviewSDK::API200::Switch::UNIQUE_IDENTIFIERS

Constants inherited from Resource

Resource::BASE_URI, Resource::UNIQUE_IDENTIFIERS

Instance Attribute Summary

Attributes inherited from Resource

#api_version, #client, #data, #logger

Instance Method Summary collapse

Methods inherited from OneviewSDK::API200::Switch

#create, #delete, #environmental_configuration, get_type, get_types, #refresh, #remove, #statistics, #update

Methods inherited from Resource

#==, #[], #[]=, build_query, #create, #create!, #delete, #each, #eql?, #exists?, find_by, from_file, get_all, #initialize, #like?, #refresh, #retrieve!, #schema, schema, #set, #set_all, #to_file, #update

Constructor Details

This class inherits a constructor from OneviewSDK::Resource

Instance Method Details

#set_scope_uris(scope_uris) ⇒ Object

Updates the scope URIs of a specific switch

Parameters:

  • scope_uris (Array)

    Array of scope uri strings



22
23
24
25
26
27
# File 'lib/oneview-sdk/resource/api300/c7000/switch.rb', line 22

def set_scope_uris(scope_uris)
  ensure_client && ensure_uri
  body = { op: 'replace', path: '/scopeUris', value: scope_uris }
  response = @client.rest_patch(@data['uri'], { 'body' => [body] }, @api_version)
  @client.response_handler(response)
end