API Docs for:
Show:

PyJujuAPI Class

Module: env.sandbox
Parent Module: env

A sandbox Juju environment using the Python API.

Methods

close

() Undefined

Closes the connection to the sandbox Juju environment. Called by ClientConnection.

Returns:

Undefined: Nothing.

destructor

() Undefined

Do any extra work to destroy the object.

Returns:

Undefined: Nothing.

initializer

() Undefined

Initializes.

Returns:

Undefined: Nothing.

open

(
  • client
)
Undefined

Opens the connection to the sandbox Juju environment. Called by ClientConnection, which sends itself.

Parameters:

  • client Object

    A ClientConnection.

Returns:

Undefined: Nothing.

performOp_add_relation

(
  • data
)

Handles adding a relation between two supplied services from the client

Parameters:

  • data Object

    Object contains the operation, two endpoint strings and request id.

performOp_add_unit

(
  • data
)

Handles add unit operations from the client.

Parameters:

  • data Object

    Contains servicename and numunits required for adding additional units.

performOp_deploy

(
  • data
)
Undefined

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:

  • data Object

    A hash minimally of charmurl, and optionally also servicename, config, configraw, and numunits.

Returns:

Undefined: Nothing.

performOp_destroy_service

(
  • data
)

destroy_service from the client.

Parameters:

  • data Object

    contains service_name.

performOp_expose

(
  • data
)

Handles exposing a service request from the client.

Parameters:

  • data Object

    Contains service_name to expose and a callback.

performOp_get_charm

(
  • data
)

get_charm from the client.

Parameters:

  • data Object

    contains service_name.

performOp_get_service

(
  • data
)

get_service from the client.

Parameters:

  • data Object

    contains service_name.

performOp_login

(
  • data
)
Undefined

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:

  • data Object

    A hash minimally of user and password.

Returns:

Undefined: Nothing.

performOp_remove_relation

(
  • data
)

Handles removing a relation between two supplied services from the client

Parameters:

  • data Object

    Object contains the operation, two endpoint strings and request id.

performOp_remove_unit

(
  • data
)

Handles the remove unit operations from the client

Parameters:

  • data Object

    Contains unit_names to remove and a calback.

performOp_resolved

(
  • data
)

Perform 'resolved' operation.

Parameters:

  • data Object

    with unitName and optional relation name.

performOp_set_config

(
  • data
)

set_config from the client.

Parameters:

  • data Object

    contains service_name and a config mapping of key/value pairs.

performOp_set_constraints

(
  • data
)

set_constraints from the client.

Parameters:

  • data Object

    contains 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:

  • data Object

    contains service_name to unexpose and a callback.

performOp_update_annotations

(
  • data
)

Update annotations rpc

Parameters:

  • data Object

    with entity name and payload.

receive

(
  • data
)
Undefined

Receives messages from the client and dispatches them.

Parameters:

  • data Object

    A hash of data sent from the client.

Returns:

Undefined: Nothing.

sendDelta

() Undefined

Send a delta of events to the client from since the last time they asked.

Returns:

Undefined: Nothing.