lxd-project/main.py

26 lines
481 B
Python

import logging
import time
import paramiko
import sshim_patch as sshim
import lxd_interface
import os
import re
import uuid
logging.basicConfig(level='DEBUG')
logger = logging.getLogger()
def connect_handler(script: sshim.Script):
pass
server = sshim.Server(connect_handler, address='0.0.0.0'
'', port=3022)
try:
server.run()
except KeyboardInterrupt:
server.stop()
finally:
lxd_interface.destroy_all_instances()