From: David Garcia Date: Fri, 16 Oct 2020 12:37:37 +0000 (+0200) Subject: Add credential_name in Libjuju.add_model() function X-Git-Tag: release-v9.0-start~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F9854%2F1;p=osm%2FN2VC.git Add credential_name in Libjuju.add_model() function Change-Id: Ic3ca0fce931de4b9f7d200e99feb604f21c1ab83 Signed-off-by: David Garcia --- diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index d2c725f..0fa42f8 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -160,12 +160,14 @@ class Libjuju: """ await controller.disconnect() - async def add_model(self, model_name: str, cloud_name: str): + async def add_model(self, model_name: str, cloud_name: str, credential_name=None): """ Create model :param: model_name: Model name :param: cloud_name: Cloud name + :param: credential_name: Credential name to use for adding the model + If not specified, same name as the cloud will be used. """ # Get controller @@ -193,7 +195,7 @@ class Libjuju: model_name, config=self.model_config, cloud_name=cloud_name, - credential_name=cloud_name, + credential_name=credential_name or cloud_name, ) self.models.add(model_name) finally: