We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17dc7c6 commit 0392392Copy full SHA for 0392392
libspecinfra/backend/__init__.py
@@ -13,3 +13,15 @@ def __init__(self):
13
14
def __exit__(self, exc_type, exc_value, traceback):
15
self.lib.backend_direct_free(self.obj)
16
+
17
+class SSH(object):
18
19
+ def __init__(self, host):
20
+ lib = libspecinfra.load()
21
+ lib.backend_ssh_new.argtypes = (ctypes.c_char_p,)
22
+ lib.backend_ssh_new.restype = ctypes.POINTER(BackendWrapperS)
23
+ lib.backend_ssh_free.argtypes = (ctypes.POINTER(BackendWrapperS),)
24
+ self.obj = lib.backend_ssh_new(host.encode('utf-8'))
25
26
+ def __exit__(self, exc_type, exc_value, traceback):
27
+ self.lib.backend_ssh_free(self.obj)
0 commit comments