cloudinstall.service — Service Interface

Represents a Juju service

exception cloudinstall.service.JujuUnitNotFoundException[source]

Bases: exceptions.Exception

Unable to find a matching Unit

class cloudinstall.service.Relation(relation_name, charms)[source]

Relation class

is_relation(charm)[source]

Is a charm already related?

class cloudinstall.service.Service(service_name, service)[source]

Service class

relation(name)[source]

Single relation entry

Params str name:
 name of relation
Returns:a Relation entry
Return type:Relation()
relations

Service relations

Returns:iterator of relations for service
Return type:Relation()
unit(name)[source]

Single unit entry

Params str name:
 name of unit
Returns:a Unit entry
Return type:Unit()
units

Service units

Returns:iterator of associated units for service
Return type:Unit()
class cloudinstall.service.Unit(unit_name, unit)[source]

Unit class

agent_state

Unit’s agent state

Returns:agent state
Return type:str
agent_state_info

Gets unit state info

Usually prints a error message if unit failed to deploy :returns: error :rtype: str

extended_agent_state
is_cloud_controller

Is machine housing the cloud-controller?

Returns:True/False
Return type:bool
is_compute

Is machine a compute node?

Returns:True/False
Return type:bool
is_horizon

Is machine housing the dashboard?

Returns:True/False
Return type:bool
is_jujugui

Is machine juju-gui?

Returns:True/False
Return type:bool
machine_id

Associate machine for unit

Returns:machine id
Return type:str
public_address

Public address of unit

Returns:address of unit
Return type:str
workload
workload_info
workload_state