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

Method __connect_tcp

vrtManager/connection.py:143–154  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 self.connection_state_lock.release()
142
143 def __connect_tcp(self):
144 flags = [libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE]
145 auth = [flags, self.__libvirt_auth_credentials_callback, None]
146 uri = 'qemu+tcp://%s/system' % self.host
147
148 try:
149 self.connection = libvirt.openAuth(uri, auth, 0)
150 self.last_error = None
151
152 except libvirtError as e:
153 self.last_error = 'Connection Failed: ' + str(e)
154 self.connection = None
155
156 def __connect_ssh(self):
157 uri = 'qemu+ssh://%s@%s/system' % (self.login, self.host)

Callers 1

connectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected