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

Method __connect_tls

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

Source from the content-addressed store, hash-verified

165 self.connection = None
166
167 def __connect_tls(self):
168 flags = [libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE]
169 auth = [flags, self.__libvirt_auth_credentials_callback, None]
170 uri = 'qemu+tls://%s@%s/system' % (self.login, self.host)
171
172 try:
173 self.connection = libvirt.openAuth(uri, auth, 0)
174 self.last_error = None
175
176 except libvirtError as e:
177 self.last_error = 'Connection Failed: ' + str(e)
178 self.connection = None
179
180 def __connect_socket(self):
181 uri = 'qemu:///system'

Callers 1

connectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected