Class: Archipel::Api::Internal::HypervisorXmlMessages

Inherits:
Object
  • Object
show all
Includes:
XmlMessages
Defined in:
lib/archipel/api/internal/hypervisor_xml_messages.rb

Instance Method Summary collapse

Instance Method Details

#create_vm(name, user_jid) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/archipel/api/internal/hypervisor_xml_messages.rb', line 15

def create_vm name, user_jid
  parameters = {
      name: name, userid: user_jid,
      orgname: 'StratusHost', orgunit: 'CumulusHost/pacmanvps', locality: 'Gdansk, Poland', categories: 'Archipel'
  }
  render 'create_vm', parameters: parameters
end

#delete_vm(jid) ⇒ Object



27
28
29
# File 'lib/archipel/api/internal/hypervisor_xml_messages.rb', line 27

def delete_vm jid
  render 'delete_vm', jid: jid
end

#list_users(page = 0, humans_only = true) ⇒ Object



31
32
33
# File 'lib/archipel/api/internal/hypervisor_xml_messages.rb', line 31

def list_users page = 0, humans_only = true
  render 'list_users', page: page, humans_only: humans_only
end

#list_vmObject



23
24
25
# File 'lib/archipel/api/internal/hypervisor_xml_messages.rb', line 23

def list_vm
  render 'list_vm'
end

#register_user(jid, password) ⇒ Object



7
8
9
# File 'lib/archipel/api/internal/hypervisor_xml_messages.rb', line 7

def register_user jid, password
  render 'register_user', jid: jid, password: password
end

#unregister_user(jid) ⇒ Object



11
12
13
# File 'lib/archipel/api/internal/hypervisor_xml_messages.rb', line 11

def unregister_user jid
  render 'unregister_user', jid: jid
end