class documentation

class MonitorSocket(object):

Known subclasses: ganeti.hypervisor.hv_kvm.monitor.QmpConnection

View In Hierarchy

Undocumented

Method __init__ Instantiates the MonitorSocket object.
Method close Closes the socket
Method connect Connect to the monitor socket if not already connected.
Method is_connected Return whether there is a connection to the socket or not.
Instance Variable monitor_filename Undocumented
Instance Variable sock Undocumented
Method _check_connection Make sure that the connection is established.
Method _check_socket Undocumented
Method _close Undocumented
Method _connect Connects to the monitor.
Constant _SOCKET_TIMEOUT Undocumented
Instance Variable _connected Undocumented
def __init__(self, monitor_filename):

Instantiates the MonitorSocket object.

Parameters
monitor_filename:stringthe filename of the UNIX raw socket on which the monitor (QMP or simple one) is listening
def close(self):

Closes the socket

It cannot be used after this call.

def connect(self):

Connect to the monitor socket if not already connected.

def is_connected(self):

Return whether there is a connection to the socket or not.

monitor_filename =

Undocumented

sock =

Undocumented

def _check_connection(self):

Make sure that the connection is established.

def _check_socket(self):

Undocumented

def _close(self):

Undocumented

def _connect(self):

Connects to the monitor.

Connects to the UNIX socket

Raises
errors.HypervisorErrorwhen there are communication errors
_SOCKET_TIMEOUT: int =

Undocumented

Value
5
_connected: bool =