Class: VCloudSdk::Xml::IpRanges

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/ruby_vcloud_sdk/xml/wrapper_classes/ip_ranges.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

Constructor Details

This class inherits a constructor from VCloudSdk::Xml::Wrapper

Instance Method Details

#add_ranges(ranges) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/ip_ranges.rb', line 8

def add_ranges(ranges)
  ranges.each do |range|
    ip_range_node = add_child("IpRange")
    start_address = add_child("StartAddress",
                              nil,
                              nil,
                              ip_range_node)
    start_address.content = range.start_address
    end_address = add_child("EndAddress",
                            nil,
                            nil,
                            ip_range_node)
    end_address.content = range.end_address
  end
end

#rangesObject



4
5
6
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/ip_ranges.rb', line 4

def ranges
  get_nodes(:IpRange)
end