2022-11-23 18:15:40 +00:00
|
|
|
import logging
|
2022-11-25 15:41:02 +00:00
|
|
|
import time
|
2022-11-23 18:15:40 +00:00
|
|
|
import paramiko
|
2022-11-23 19:18:40 +00:00
|
|
|
import sshim_patch as sshim
|
|
|
|
import lxd_interface
|
2022-11-23 18:15:40 +00:00
|
|
|
import os
|
|
|
|
import re
|
2022-11-24 19:59:21 +00:00
|
|
|
import uuid
|
2022-11-23 18:15:40 +00:00
|
|
|
|
|
|
|
logging.basicConfig(level='DEBUG')
|
|
|
|
logger = logging.getLogger()
|
|
|
|
|
|
|
|
|
2022-11-24 19:59:21 +00:00
|
|
|
def connect_handler(script: sshim.Script):
|
2022-11-25 15:41:02 +00:00
|
|
|
pass
|
2022-11-23 18:15:40 +00:00
|
|
|
|
|
|
|
|
2022-12-05 23:33:33 +00:00
|
|
|
server = sshim.Server(connect_handler, address='0.0.0.0', port=3022)
|
2022-11-23 18:15:40 +00:00
|
|
|
try:
|
|
|
|
server.run()
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
server.stop()
|
2022-11-28 19:38:07 +00:00
|
|
|
finally:
|
|
|
|
lxd_interface.destroy_all_instances()
|