Delete ssh-key generation in N2VCConnector initialization
Change-Id: I5f33adf683ffeef34de270bf9b458a172dd4059d
Signed-off-by: David Garcia <david.garcia@canonical.com>
# generate private/public key-pair
self.private_key_path = None
self.public_key_path = None
- self.get_public_key()
@abc.abstractmethod
async def get_status(self, namespace: str, yaml_format: bool = True):
import asyncio
import logging
+from unittest.mock import Mock
+
+
import asynctest
from n2vc.n2vc_juju_conn import N2VCJujuConnector
from osm_common import fslocal
logging.disable(logging.CRITICAL)
+ N2VCJujuConnector.get_public_key = Mock()
self.n2vc = N2VCJujuConnector(
db=db,
fs=fslocal.FsLocal(),
vca_config=vca_config,
on_update_db=None,
)
+ N2VCJujuConnector.get_public_key.assert_not_called()
@asynctest.mock.patch("n2vc.libjuju.Libjuju.get_metrics")