Class: VCloudSdk::Xml::NetworkConfigSection
- Inherits:
-
Wrapper
- Object
- Wrapper
- VCloudSdk::Xml::NetworkConfigSection
show all
- Defined in:
- lib/ruby_vcloud_sdk/xml/wrapper_classes/network_config_section.rb
Instance Method Summary
collapse
Methods inherited from Wrapper
#==, #[], #[]=, #add_child, #attribute, #content, #content=, #create_child, #create_qualified_name, #create_xpath_query, #doc_namespaces, #edit_link, #get_nodes, #href, #href=, #href_id, #initialize, #name, #name=, #power_off_link, #power_on_link, #remove_link, #running_tasks, #to_s, #type, #type=, #undeploy_link, #urn, #xpath
Instance Method Details
#add_network_config(config) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/network_config_section.rb', line 8
def add_network_config(config)
unless config.is_a? NetworkConfig
fail CloudError, "Only NetworkConfig can be added to #{self.class}"
end
add_child(config)
end
|
#delete_network_config(net_name) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/network_config_section.rb', line 15
def delete_network_config(net_name)
net_config = network_configs.find { |n| n.network_name == net_name }
fail ObjectNotFoundError,
"Cannot delete network #{net_name}: not found" unless net_config
net_config.node.remove
end
|
#network_configs ⇒ Object
4
5
6
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/network_config_section.rb', line 4
def network_configs
get_nodes("NetworkConfig")
end
|