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



966
967
968
969
970
# File 'lib/webee.rb', line 966

def enterprise
  return nil if not managed?
  doc = Nokogiri.parse(RestClient.get(Api.build_url(enterprise_url) , :accept => :xml))
  Enterprise.parse doc.root.to_s
end

#machineObject



972
973
974
975
# File 'lib/webee.rb', line 972

def machine
  doc = Nokogiri.parse(RestClient.get(Api.build_url(machine_url) , :accept => :xml))
  Machine.parse doc.root.to_s
end

#managed?Boolean

Returns:

  • (Boolean)


962
963
964
# File 'lib/webee.rb', line 962

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

#userObject



977
978
979
980
# File 'lib/webee.rb', line 977

def user
  doc = Nokogiri.parse(RestClient.get(Api.build_url(user_url) , :accept => :xml))
  User.parse doc.root.to_s
end

#vdcObject



956
957
958
959
960
# File 'lib/webee.rb', line 956

def vdc
  return nil if not managed?
  doc = Nokogiri.parse(RestClient.get(Api.build_url(vdc_url) , :accept => :xml))
  Rack.parse doc.root.to_s
end