mcvirt.rpc package¶
Submodules¶
mcvirt.rpc.certificate_generator module¶
Provides class to generate and manage SSL certificates
-
class
mcvirt.rpc.certificate_generator.CertificateGenerator(server=None, remote=False)[source]¶ Bases:
mcvirt.rpc.pyro_object.PyroObjectClass for providing SSL socket wrappers for Pyro. Since the MCVirt isn’t available for 2/3 of the time that this is used (NS and CLI), all methods are static and paths are calculated manually. @TODO Fix this in future - create MCVirt config class.
-
OPENSSL= '/usr/bin/openssl'¶
-
ca_key_file¶ Return/generate the CA prviate key.
-
ca_pub_file¶ Return/generate the CA pub file
-
check_certificates(check_client=True)[source]¶ Ensure that the required certificates are available to start the daemon and connect to the local host
-
client_csr¶ Return the client CSR
-
client_key_file¶ Obtain the private key for the client key
-
client_pub_file¶ Return/generate the client public file, used for connecting to the libvirt daemon
-
is_local¶ Determine if the server is the local machine
-
remote_ssl_directory¶ Return the ‘remote’ subdirectory of server, used for storing certificates that are used by a remote server.
-
server_key_file¶ Obtain the server private key file
-
server_pub_file¶ Obtain the server public key file
-
ssl_base_directory¶ Return the base SSL directory for the node.
-
ssl_directory¶ Return the SSL directory for the server
-
ssl_dn¶ “Return the certificate DN is openssl argument format.
-
ssl_subj¶ Return the SSL DN in regular format
-
mcvirt.rpc.certificate_generator_factory module¶
Provides an interface to obtain certificate generator objects
-
class
mcvirt.rpc.certificate_generator_factory.CertificateGeneratorFactory[source]¶ Bases:
mcvirt.rpc.pyro_object.PyroObjectProvides an interface to obtain certificate generator objects
mcvirt.rpc.constants module¶
Provides constants for the RPC daemon
mcvirt.rpc.daemon_lock module¶
Provides a locking mechanism for the MCVirt daemon
mcvirt.rpc.lock module¶
Provides classes for locking the MCVirt daemon whilst a function is being performed
mcvirt.rpc.name_server module¶
Thread for running the name server
mcvirt.rpc.pyro_object module¶
Base class for providing Pyro-based methods for objects
mcvirt.rpc.rpc_daemon module¶
Provide class for RPC daemon.
-
class
mcvirt.rpc.rpc_daemon.BaseRpcDaemon(*args, **kwargs)[source]¶ Bases:
Pyro4.core.DaemonOverride Pyro daemon to add authentication checks and MCVirt integration
-
class
mcvirt.rpc.rpc_daemon.DaemonSession[source]¶ Bases:
objectClass for allowing client to obtain the session ID
-
class
mcvirt.rpc.rpc_daemon.RpcNSMixinDaemon[source]¶ Bases:
objectWrapper for the daemon. Required since the Pyro daemon class overrides get/setattr and other built-in object methods
-
DAEMON= None¶
-
mcvirt.rpc.ssl_socket module¶
Provides methods for wrapping Pyro methods with SSL
-
class
mcvirt.rpc.ssl_socket.SSLSocket[source]¶ Bases:
objectProvides methods for wrapping Pyro methods with SSL
-
static
create_broadcast_ssl_socket(*args, **kwargs)[source]¶ Override the Pyro createBroadcastSocket method and wrap with SSL
-
static