Class: WeBee::VirtualAppliance

Inherits:
Object
  • Object
show all
Includes:
SAXMachine
Defined in:
lib/webee.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SAXMachine

#old_parse, #parse

Instance Attribute Details

#vdc_idObject

Returns the value of attribute vdc_id.



687
688
689
# File 'lib/webee.rb', line 687

def vdc_id
  @vdc_id
end

Instance Method Details

#virtual_machinesObject



697
698
699
700
701
702
703
704
# File 'lib/webee.rb', line 697

def virtual_machines
  items = []
  doc = Nokogiri.parse(RestClient.get(Api.url + "/cloud/virtualdatacenters/#{vdc_id}/virtualappliances/#{virtual_appliance_id}/virtualmachines", :accept => :xml))
  doc.search('//virtualMachine').each do |node|
    items << VirtualMachine.parse(node.to_s)
  end
  items
end