MiCADO Applications

Methods available on client.applications:

class micado.models.application.Applications
get(app_id)

Retrieves info on a specific application, given its ID

Parameters:

app_id (string) – Application ID to fetch. Required

Usage:

>>> my_app = client.applications.get("stresstest")
>>> my_app.id
"stresstest"
>>> my_app.adaptors
{'KubernetesAdaptor': 'Executed', 'OccopusAdaptor': 'Skipped'}
Returns:

Relevant information for a single application

Return type:

Application object

list()

Retrieves the available list of applications in MiCADO

Usage:

>>> running_apps = client.applications.list()
>>> [app.id for app in running_apps]
["stresstest"]
Returns:

Relevant info for all applications

Return type:

list of Application objects

create(app_id=None, **kwargs)

Creates a new application in MiCADO

Parameters:
  • app_id (string, optional) – Application ID. Generated if None.

  • adt (dict, optional) – YAML dict of Application Description Template. Required if URL is empty. Defaults to None.

  • url (string, optional) – URL of YAML ADT. Required if ADT is empty. Defaults to None.

  • params (dict, optional) – TOSCA input parameters. Defaults to {}.

  • dryrun (bool, optional) – Flag to skip execution of components. Defaults to False.

Usage:

>>> client.applications.create(app_id="stresstest",
                               url="example.com/repo/adt.yaml")
"stresstest created successfully"
Returns:

ID and status of deployment

Return type:

dict

delete(app_id)

Deletes an application in MiCADO given its ID.

Parameters:

app_id (string) – Application ID to delete

Usage:

>>> client.applications.delete("stresstest")
"stresstest deleted successfully"
Returns:

ID and status of deletion

Return type:

dict