Crate juju [] [src]

A library to interface with Juju. For more information about Juju see Juju

Structs

Context
Hook
Relation
Status

Enums

StatusType

For information about what these StatusType variants mean see: Status reference

Transport

Functions

close_port

This will hide a port on the unit. The transport argument will indicate whether tcp or udp should be exposed

config_get

This will return a configuration item that corresponds to the key passed in

config_get_all

config_get_all will return all configuration options as a HashMap

is_leader

Returns true/false if this unit is the leader

log

Logs the msg passed to it

open_port

This will expose a port on the unit. The transport argument will indicate whether tcp or udp should be exposed

process_hooks

Call this to process your cmd line arguments and call any needed hooks

reboot

This will reboot your juju instance. Examples of using this are when a new kernel is installed and the virtual machine or server needs to be rebooted to use it.

relation_get
relation_get_by_unit
relation_ids
relation_list

Returns a list of all related units

relation_set
status_set

Set the status of your unit to indicate to the Juju if everything is ok or something is wrong. See the Status enum for information about what can be set.

storage_get_location

If storage drives were allocated to your unit this will get the path of them.

unit_get_private_addr

This will return the private IP address associated with the unit. It can be very useful for services that require communicating with the other units related to it.

unit_get_public_addr

This will return the public IP address associated with the unit.