X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fn2vc_conn.py;h=8f6c3efd6550e9e6165feb4cfbaa2af45eee89dc;hp=97b6188c8349950bf2a3155a2c006cce5b5f5499;hb=18046070fb9abe4f21be255e533c2a96c047e50c;hpb=9ae4d929c2b739d146e3e27388dc4825ca046e50 diff --git a/n2vc/n2vc_conn.py b/n2vc/n2vc_conn.py index 97b6188..8f6c3ef 100644 --- a/n2vc/n2vc_conn.py +++ b/n2vc/n2vc_conn.py @@ -64,7 +64,7 @@ class N2VCConnector(abc.ABC, Loggable): url: str, username: str, vca_config: dict, - on_update_db = None + on_update_db=None ): """Initialize N2VC abstract connector. It defines de API for VCA connectors @@ -106,6 +106,8 @@ class N2VCConnector(abc.ABC, Loggable): self.on_update_db = on_update_db # generate private/public key-pair + self.private_key_path = None + self.public_key_path = None self.get_public_key() @abc.abstractmethod @@ -116,7 +118,7 @@ class N2VCConnector(abc.ABC, Loggable): """ # TODO: review which public key - async def get_public_key(self) -> str: + def get_public_key(self) -> str: """Get the VCA ssh-public-key Returns the SSH public key from local mahine, to be injected into virtual machines to @@ -438,6 +440,8 @@ def juju_status_2_osm_status(type: str, status: str) -> N2VCDeploymentStatus: if type == 'application' or type == 'unit': if status in ['waiting', 'maintenance']: return N2VCDeploymentStatus.RUNNING + if status in ['error']: + return N2VCDeploymentStatus.FAILED elif status in ['active']: return N2VCDeploymentStatus.COMPLETED elif status in ['blocked']: