PyJujuAPI Class
A sandbox Juju environment using the Python API.
Item Index
Methods
- close
- destructor
- initializer
- open
- performOp_add_relation
- performOp_add_unit
- performOp_deploy
- performOp_destroy_service
- performOp_expose
- performOp_get_charm
- performOp_get_service
- performOp_login
- performOp_remove_relation
- performOp_remove_unit
- performOp_resolved
- performOp_set_config
- performOp_set_constraints
- performOp_unexpose
- performOp_update_annotations
- receive
- sendDelta
Methods
close
()
Undefined
Closes the connection to the sandbox Juju environment. Called by ClientConnection.
Returns:
destructor
()
Undefined
Do any extra work to destroy the object.
Returns:
initializer
()
Undefined
Initializes.
Returns:
open
-
client
Opens the connection to the sandbox Juju environment. Called by ClientConnection, which sends itself.
Parameters:
-
clientObjectA ClientConnection.
Returns:
performOp_add_relation
-
data
Handles adding a relation between two supplied services from the client
Parameters:
-
dataObjectObject contains the operation, two endpoint strings and request id.
performOp_add_unit
-
data
Handles add unit operations from the client.
Parameters:
-
dataObjectContains servicename and numunits required for adding additional units.
performOp_deploy
-
data
Handles deploy operations from client. Called by receive. client.receive will receive all sent values back, transparently. If there is an error, the reply will also have an "err" with a string describing the error.
Parameters:
-
dataObjectA hash minimally of charmurl, and optionally also servicename, config, configraw, and numunits.
Returns:
performOp_destroy_service
-
data
destroy_service from the client.
Parameters:
-
dataObjectcontains service_name.
performOp_expose
-
data
Handles exposing a service request from the client.
Parameters:
-
dataObjectContains service_name to expose and a callback.
performOp_get_charm
-
data
get_charm from the client.
Parameters:
-
dataObjectcontains service_name.
performOp_get_service
-
data
get_service from the client.
Parameters:
-
dataObjectcontains service_name.
performOp_login
-
data
Handles login operations from the client. Called by "receive". client.receive will receive all sent values back, transparently, plus a "result" value that will be true or false, representing whether the authentication succeeded or failed.
Parameters:
-
dataObjectA hash minimally of user and password.
Returns:
performOp_remove_relation
-
data
Handles removing a relation between two supplied services from the client
Parameters:
-
dataObjectObject contains the operation, two endpoint strings and request id.
performOp_remove_unit
-
data
Handles the remove unit operations from the client
Parameters:
-
dataObjectContains unit_names to remove and a calback.
performOp_resolved
-
data
Perform 'resolved' operation.
Parameters:
-
dataObjectwith unitName and optional relation name.
performOp_set_config
-
data
set_config from the client.
Parameters:
-
dataObjectcontains service_name and a config mapping of key/value pairs.
performOp_set_constraints
-
data
set_constraints from the client.
Parameters:
-
dataObjectcontains service_name and constraints as either a key/value map or an array of "key=value" strings..
performOp_unexpose
-
data
Handles unexposing a service request from the client.
Parameters:
-
dataObjectcontains service_name to unexpose and a callback.
performOp_update_annotations
-
data
Update annotations rpc
Parameters:
-
dataObjectwith entity name and payload.
receive
-
data
Receives messages from the client and dispatches them.
Parameters:
-
dataObjectA hash of data sent from the client.
Returns:
sendDelta
()
Undefined
Send a delta of events to the client from since the last time they asked.
