Class: OneviewSDK::API1200::Synergy::EthernetNetwork
- Inherits:
-
OneviewSDK::API1000::Synergy::EthernetNetwork
- Object
- Resource
- OneviewSDK::API200::Resource
- OneviewSDK::API200::EthernetNetwork
- OneviewSDK::API300::Synergy::EthernetNetwork
- OneviewSDK::API500::Synergy::EthernetNetwork
- OneviewSDK::API600::Synergy::EthernetNetwork
- OneviewSDK::API800::Synergy::EthernetNetwork
- OneviewSDK::API1000::Synergy::EthernetNetwork
- OneviewSDK::API1200::Synergy::EthernetNetwork
- Defined in:
- lib/oneview-sdk/resource/api1200/synergy/ethernet_network.rb
Overview
Ethernet network resource implementation for API1200 Synergy
Constant Summary
Constants inherited from OneviewSDK::API200::EthernetNetwork
OneviewSDK::API200::EthernetNetwork::BASE_URI
Constants inherited from Resource
Resource::BASE_URI, Resource::DEFAULT_REQUEST_HEADER, Resource::UNIQUE_IDENTIFIERS
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Class Method Summary collapse
-
.bulk_create(client, options) ⇒ Array
Bulk create the ethernet networks.
Methods inherited from OneviewSDK::API600::Synergy::EthernetNetwork
Methods inherited from OneviewSDK::API300::Synergy::EthernetNetwork
Methods included from OneviewSDK::API300::C7000::Scope::ScopeHelperMethods
#add_scope, #patch, #remove_scope, #replace_scopes
Methods inherited from OneviewSDK::API200::EthernetNetwork
#get_associated_profiles, #get_associated_uplink_groups, #initialize
Methods inherited from Resource
#==, #[], #[]=, build_query, #create, #create!, #deep_merge!, #delete, #each, #eql?, #exists?, find_by, find_with_pagination, from_file, get_all, get_all_with_query, #initialize, #like?, #refresh, #retrieve!, schema, #schema, #set, #set_all, #to_file, #update
Constructor Details
This class inherits a constructor from OneviewSDK::API600::Synergy::EthernetNetwork
Class Method Details
.bulk_create(client, options) ⇒ Array
Bulk create the ethernet networks
23 24 25 26 27 28 29 30 31 |
# File 'lib/oneview-sdk/resource/api1200/synergy/ethernet_network.rb', line 23 def self.bulk_create(client, ) range = [:vlanIdRange].split('-').map(&:to_i) [:type] = 'bulk-ethernet-networkV2' response = client.rest_post(BASE_URI + '/bulk', { 'body' => }, client.api_version) client.response_handler(response) network_names = [] range[0].upto(range[1]) { |i| network_names << "#{[:namePrefix]}_#{i}" } OneviewSDK::EthernetNetwork.get_all(client).select { |network| network_names.include?(network['name']) } end |