X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-plugin%2Fosm_ro_plugin%2Fvimconn.py;h=20ab3a3b02370e220e3146701b292c887f8de74c;hb=36cad669a99ed1655dc39b1c37aea6197ddbab55;hp=8b207b18e8f82954f791feda627a05cd6ece6413;hpb=e5d7842d49b1c9cfdabca8e9d0fa3963030412f3;p=osm%2FRO.git diff --git a/RO-plugin/osm_ro_plugin/vimconn.py b/RO-plugin/osm_ro_plugin/vimconn.py index 8b207b18..20ab3a3b 100644 --- a/RO-plugin/osm_ro_plugin/vimconn.py +++ b/RO-plugin/osm_ro_plugin/vimconn.py @@ -757,6 +757,11 @@ class VimConnector: "chmod 644 ~/.ssh/authorized_keys", "chmod 700 ~/.ssh/", } + + logging.basicConfig( + format="%(asctime)s %(levelname)s %(name)s %(filename)s:%(lineno)s %(message)s" + ) + logging.getLogger("paramiko").setLevel(logging.DEBUG) client = paramiko.SSHClient() try: @@ -766,8 +771,14 @@ class VimConnector: pkey = None client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + client.connect( - ip_addr, username=user, password=password, pkey=pkey, timeout=30 + ip_addr, + username=user, + password=password, + pkey=pkey, + timeout=30, + auth_timeout=60, ) for command in commands: @@ -1078,6 +1089,24 @@ class VimConnector: """ raise VimConnNotImplemented("SFC support not implemented") + def migrate_instance(self, vm_id, compute_host=None): + """Migrate a vdu + Params: + vm_id: ID of an instance + compute_host: Host to migrate the vdu to + Returns the vm state or raises an exception upon error + """ + raise VimConnNotImplemented("Should have implemented this") + + def resize_instance(self, vm_id, flavor_id=None): + """ + resize a vdu + param: + vm_id: ID of an instance + flavor_id: flavor_id to resize the vdu to + """ + raise VimConnNotImplemented("Should have implemented this") + # NOT USED METHODS in current version. Deprecated @deprecated def host_vim2gui(self, host, server_dict):