Module virt :: Class Virt
[hide private]
[frames] | no frames]

Class Virt

source code

Instance Methods [hide private]
int
getDomainID(self, name)
Resolve a domain name to a domain ID.
source code
list
listDomains(self)
Get a list of domains.
source code
bool
isAlive(self, id)
Get whether a domain is alive (running).
source code
 
start(self, id)
Start (create) a domain.
source code
 
shutdown(self, id)
Shutdown a domain.
source code
Class Methods [hide private]
 
open(cls) source code
Method Details [hide private]

getDomainID(self, name)

source code 

Resolve a domain name to a domain ID.

Parameters:
  • name (str) - A domain name.
Returns: int
A domain ID.
Decorators:
  • @remote

listDomains(self)

source code 

Get a list of domains.

Returns: list
List of dict: {id, name, active}
Decorators:
  • @remote

isAlive(self, id)

source code 

Get whether a domain is alive (running).

Parameters:
  • id (int) - A domain ID.
Returns: bool
True if alive.
Decorators:
  • @remote

start(self, id)

source code 

Start (create) a domain.

Parameters:
  • id (int) - A domain ID.
Decorators:
  • @remote
  • @pam(user= 'root')

shutdown(self, id)

source code 

Shutdown a domain.

Parameters:
  • id (int) - A domain ID.
Decorators:
  • @remote
  • @pam(user= 'root')