MCPcopy
hub / github.com/retspen/webvirtcloud / __init__

Method __init__

vrtManager/connection.py:49–66  ·  view source on GitHub ↗

Sets all class attributes and tries to open the connection

(self, host, login, passwd, conn)

Source from the content-addressed store, hash-verified

47 """
48
49 def __init__(self, host, login, passwd, conn):
50 """
51 Sets all class attributes and tries to open the connection
52 """
53 # connection lock is used to lock all changes to the connection state attributes
54 # (connection and last_error)
55 self.connection_state_lock = threading.Lock()
56 self.connection = None
57 self.last_error = None
58
59 # credentials
60 self.host = host
61 self.login = login
62 self.passwd = passwd
63 self.type = conn
64
65 # connect
66 self.connect()
67
68 def connect(self):
69 self.connection_state_lock.acquire()

Callers

nothing calls this directly

Calls 1

connectMethod · 0.95

Tested by

no test coverage detected