Ganeti RAPI client.
|
__init__(self,
host,
port=GANETI_RAPI_PORT,
username=None,
password=None,
logger=logging,
curl_config_fn=None,
curl_factory=None)
Initializes this class. |
source code
|
|
|
|
str
|
|
int
|
|
list
|
|
list of str
|
|
dict
|
|
string
|
|
string
|
|
list of str
|
|
string
|
|
string
|
|
list of dict or list of str
|
|
dict
|
|
string
|
|
|
InstanceAllocation(self,
mode,
name,
disk_template,
disks,
nics,
**kwargs)
Generates an instance allocation as used by multiallocate. |
source code
|
|
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
list of str
|
|
string
|
|
string
|
|
string
|
RebootInstance(self,
instance,
reboot_type=None,
ignore_secondaries=None,
dry_run=False,
reason=None,
**kwargs)
Reboots an instance. |
source code
|
|
string
|
|
string
|
|
string
|
|
string
|
ReplaceInstanceDisks(self,
instance,
disks=None,
mode=REPLACE_DISK_AUTO,
remote_node=None,
iallocator=None,
reason=None,
early_release=None)
Replaces disks on an instance. |
source code
|
|
string
|
|
string
|
ExportInstance(self,
instance,
mode,
destination,
shutdown=None,
remove_instance=None,
x509_key_name=None,
destination_x509_ca=None,
compress=None,
reason=None)
Exports an instance. |
source code
|
|
string
|
|
string
|
FailoverInstance(self,
instance,
iallocator=None,
ignore_consistency=None,
target_node=None,
reason=None)
Does a failover of an instance. |
source code
|
|
string
|
RenameInstance(self,
instance,
new_name,
ip_check=None,
name_check=None,
reason=None)
Changes the name of an instance. |
source code
|
|
dict
|
|
list of int
|
|
dict
|
|
bool
|
|
dict
|
|
tuple
|
|
list of dict or str
|
|
dict
|
|
string, or a list for pre-2.5 results
|
EvacuateNode(self,
node,
iallocator=None,
remote_node=None,
dry_run=False,
early_release=None,
mode=None,
accept_old=False,
reason=None)
Evacuates instances from a Ganeti node. |
source code
|
|
string
|
MigrateNode(self,
node,
mode=None,
dry_run=False,
iallocator=None,
target_node=None,
reason=None)
Migrates all primary instances from a node. |
source code
|
|
str
|
|
string
|
SetNodeRole(self,
node,
role,
force=False,
auto_promote=None,
reason=None)
Sets the role for a node. |
source code
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
list of str
|
|
string
|
|
string
|
|
list of dict or str
|
|
dict
|
|
string
|
CreateNetwork(self,
network_name,
network,
gateway=None,
network6=None,
gateway6=None,
mac_prefix=None,
add_reserved_ips=None,
tags=None,
dry_run=False,
reason=None)
Creates a new network. |
source code
|
|
|
ConnectNetwork(self,
network_name,
group_name,
mode,
link,
vlan="",
dry_run=False,
reason=None)
Connects a Network to a NodeGroup with the given netparams |
source code
|
|
|
DisconnectNetwork(self,
network_name,
group_name,
dry_run=False,
reason=None)
Connects a Network to a NodeGroup with the given netparams |
source code
|
|
string
|
|
string
|
|
list of strings
|
|
string
|
|
string
|
|
list of dict or str
|
|
dict
|
|
string
|
|
string
|
|
string
|
|
string
|
|
string
|
|
list of strings
|
|
string
|
|
string
|
|
string
|
Query(self,
what,
fields,
qfilter=None,
reason=None)
Retrieves information about resources. |
source code
|
|
string
|
|
list of dict or str
|
|
dict
|
|
string
|
|
string
|
ReplaceFilter(self,
uuid,
priority,
predicates,
action,
reason_trail=None)
Replaces a filter rule, or creates one if it doesn't already exist |
source code
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|