Class: OneviewSDK::API200::ConnectionTemplate
- Defined in:
- lib/oneview-sdk/resource/api200/connection_template.rb
Overview
Connection template resource implementation
Direct Known Subclasses
OneviewSDK::API300::C7000::ConnectionTemplate, OneviewSDK::API300::Synergy::ConnectionTemplate
Constant Summary collapse
- BASE_URI =
'/rest/connection-templates'.freeze
Constants inherited from Resource
Resource::DEFAULT_REQUEST_HEADER, Resource::UNIQUE_IDENTIFIERS
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Class Method Summary collapse
-
.get_default(client) ⇒ OneviewSDK::ConnectionTemplate
Get the default network connection template.
Instance Method Summary collapse
-
#create ⇒ Object
Method is not available.
-
#delete ⇒ Object
Method is not available.
-
#initialize(client, params = {}, api_ver = nil) ⇒ ConnectionTemplate
constructor
Create a resource object, associate it with a client, and set its properties.
Methods inherited from Resource
#==, #[], #[]=, build_query, #create!, #deep_merge!, #each, #eql?, #exists?, find_by, find_with_pagination, from_file, get_all, get_all_with_query, #like?, #refresh, #retrieve!, schema, #schema, #set, #set_all, #to_file, #update
Constructor Details
#initialize(client, params = {}, api_ver = nil) ⇒ ConnectionTemplate
Create a resource object, associate it with a client, and set its properties.
24 25 26 27 28 29 |
# File 'lib/oneview-sdk/resource/api200/connection_template.rb', line 24 def initialize(client, params = {}, api_ver = nil) super # Default values: @data['bandwidth'] ||= {} @data['type'] ||= 'connection-template' end |
Class Method Details
.get_default(client) ⇒ OneviewSDK::ConnectionTemplate
Get the default network connection template
46 47 48 49 50 |
# File 'lib/oneview-sdk/resource/api200/connection_template.rb', line 46 def self.get_default(client) response = client.rest_get(BASE_URI + '/defaultConnectionTemplate') variant = name.split('::').at(-2) OneviewSDK.resource_named('ConnectionTemplate', client.api_version, variant).new(client, client.response_handler(response)) end |
Instance Method Details
#create ⇒ Object
Method is not available
33 34 35 |
# File 'lib/oneview-sdk/resource/api200/connection_template.rb', line 33 def create(*) unavailable_method end |
#delete ⇒ Object
Method is not available
39 40 41 |
# File 'lib/oneview-sdk/resource/api200/connection_template.rb', line 39 def delete(*) unavailable_method end |