From e22c72017d4756571ea04760ce5059c7ba7cd295 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Fri, 16 Oct 2020 14:37:37 +0200 Subject: [PATCH] Add credential_name in Libjuju.add_model() function Change-Id: Ic3ca0fce931de4b9f7d200e99feb604f21c1ab83 Signed-off-by: David Garcia --- n2vc/libjuju.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: -- 2.25.1