Class: WeBee::VirtualMachine

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

Instance Method Summary collapse

Methods included from SAXMachine

#old_parse, #parse

Instance Method Details

#enterpriseObject



901
902
903
904
905
906
# File 'lib/webee.rb', line 901

def enterprise
  return nil if not managed?
  # FIXME: Buggy Abiquo ABI missing some relations
  doc = Nokogiri.parse(RestClient.get(Api.build_url(enterprise_url) , :accept => :xml))
  Enterprise.parse doc.root.to_s
end

#managed?Boolean

Returns:

  • (Boolean)


897
898
899
# File 'lib/webee.rb', line 897

def managed?
  id_type.eql?("0") ? false : true
end

#vdcObject



890
891
892
893
894
895
# File 'lib/webee.rb', line 890

def vdc
  return nil if not managed?
  # FIXME: Buggy Abiquo ABI missing some relations
  doc = Nokogiri.parse(RestClient.get(Api.build_url(vdc_url) , :accept => :xml))
  Rack.parse doc.root.to_s
end