Juju Controller

Module for interacting with a juju controller.

async zaza.controller.async_add_model(model_name, config=None, region=None)

Add a model to the current controller.

Parameters
  • model_name (str) – Name to give the new model.

  • config (dict) – Model configuration.

  • region (str) – Region in which to create the model.

async zaza.controller.async_cloud(name=None)

Return information about cloud.

Parameters

name (Optional[str]) – Cloud name. If not specified, the cloud where the controller lives on is returned.

Returns

Information on all clouds in the controller.

Return type

CloudResult

async zaza.controller.async_destroy_model(model_name)

Remove a model from the current controller.

Parameters

model_name (str) – Name of model to remove

async zaza.controller.async_get_cloud()

Return the name of the current cloud.

Returns

Name of cloud

Return type

str

async zaza.controller.async_list_models()

Return a list of the available models.

Returns

List of models

Return type

list

zaza.controller.get_cloud_type(name=None)

Return type of cloud.

Parameters

name (Optional[str]) – Cloud name. If not specified, the cloud where the controller lives on is returned.

Returns

Type of cloud

Return type

str

zaza.controller.go_list_models()

Execute juju models.

NOTE: Excuting the juju models command updates the local cache of models. Python-juju currently does not update the local cache on add model. https://github.com/juju/python-libjuju/issues/267

Returns

None

Return type

None