Juju Environments¶
Landscape can be linked to a Juju environment and have Landscape annotate the Juju units with information Landscape knows about.
RegisterJujuEnvironment¶
Register an existing Juju environment or create a new one.
The call will try to connect to, and authenticate with, the Juju API at the specified address.
If a Juju environment with the same UUID is already present in the account, it will be updated with the specified details.
- name: The name of the environment.
- endpoint: The endpoint address of the Juju API.
- username: The username used to authenticate with the Juju API.
- password: The password used to authenticate with the Juju API.
For example, the following command creates a Juju environment ‘newenv’, connected to 1.2.3.4:17070:
?action=RegisterJujuEnvironment&name=newenv &endpoint=1.2.3.4:17070 &username=admin &password=secretThe method returns a JSON representation of the juju environment:
{"name": "newenv", "endpoint": "1.2.3.4:17070", "username": "admin", "password": "secret", "uuid": "3d2fb6ce-eacb-11e2-becb-4799e75dd0e1", "status": "Registered"}The following errors may be raised:
- DuplicateEnvironment: An environment with the same name already exists.
- EnvironmentconnectionFailed: The connection with the environment failed.
- EnvironmentCredentials: The supplied credentials are not valid for the environment.
- InvalidEnvironmentName: The specified name is not valid.
GetJujuEnvironments¶
Get the details of all the Juju environments in the account.
For example, the following command lists all the environments in an account:
?action=GetJujuEnvironmentsThe method returns a JSON representation of the Juju environment:
[{"name": "env", "endpoint": "1.2.3.4:17070", "username": "admin", "password": "secret", "uuid": "3d2fb6ce-eacb-11e2-becb-4799e75dd0e1", "status": "Registered"}]