mcvirt.cluster package

Submodules

mcvirt.cluster.cluster module

Provide cluster classes

class mcvirt.cluster.cluster.Cluster[source]

Bases: mcvirt.rpc.pyro_object.PyroObject

Class to perform node management within the MCVirt cluster

add_node(*args, **kwargs)
add_node_configuration(*args, **kwargs)
check_ip_configuration()[source]

Perform various checks to ensure that the IP configuration is such that is suitable to be part of a cluster

check_node_exists(node_name)[source]

Determine if a node is already present in the cluster

check_node_versions()[source]

Ensure that all nodes in the cluster are connected and checks the node Status

check_remote_machine(remote_connection)[source]

Perform checks on the remote node to ensure that there will be no object conflicts when syncing the Network and VM configurations

ensure_node_exists(node)[source]

Check if node exists and throws exception if it does not

generate_connection_info()[source]

Generate required information to connect to this node from a remote node

get_cluster_config()[source]

Get the MCVirt cluster configuration

get_cluster_ip_address()[source]

Return the cluster IP address of the local node

get_connection_string()[source]

Generate a string to connect to this node from a remote cluster

get_node_config(node)[source]

Return the configuration for a node

get_nodes(return_all=False)[source]

Return an array of node configurations

get_remote_node(node, ignore_cluster_master=False)[source]

Obtain a Remote object for a node, caching the object

print_info()[source]

Print information about the nodes in the cluster

remove_node(*args, **kwargs)
remove_node_configuration(node_name)[source]

Remove an MCVirt node from the configuration and regenerates authorized_keys file

remove_node_ssl_certificates(remote_node)[source]

Exposed method for _remove_node_ssl_certificates

run_remote_command(callback_method, nodes=None, args=[], kwargs={})[source]

Run a remote command on all (or a given list of) remote nodes

sync_networks(remote_object)[source]

Add the local networks to the remote node

sync_permissions(remote_object)[source]

Duplicate the global permissions on the local node onto the remote node

sync_users(remote_node)[source]

Synchronise the local users with the remote node

sync_virtual_machines(remote_object)[source]

Duplicate the VM configurations on the local node onto the remote node

mcvirt.cluster.remote module

Provide interface for RPC to cluster nodes

class mcvirt.cluster.remote.Node(name, node_config)[source]

Bases: mcvirt.client.rpc.Connection

A class to perform remote commands on MCVirt nodes

Module contents