With newer Juju versions the authorized-keys
argument is expected to not be None, therefore it
now has to be ommited as an argument if thats the
case.
Change-Id: I0adeda2ce71df5505cfaaab98ec237611918d9e7
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
"Adding model '{}' to cluster_uuid '{}'".format(model_name, cluster_uuid)
)
try:
- model = await self.controller.add_model(
- model_name, config={"authorized-keys": self.juju_public_key}
- )
+ if self.juju_public_key is not None:
+ model = await self.controller.add_model(
+ model_name, config={"authorized-keys": self.juju_public_key}
+ )
+ else:
+ model = await self.controller.add_model(model_name)
except Exception as ex:
self.log.debug(ex)
self.log.debug("Caught exception: {}".format(ex))