charms.reactive.cli

Commands

charms.reactive hook [-h] [hook_patterns [hook_patterns …]]

Check if the current hook matches one of the patterns.

charms.reactive mark_invoked [-h] [handler_ids [handler_ids …]]

Record that the handler has been invoked, for use with only_once.

charms.reactive only_once [-h] handler_id

Check if handler has already been run in the past.

charms.reactive render_template [-h] source target

Render a Jinja2 template from $CHARM_DIR/templates using the current environment variables as the template context.

charms.reactive test [-h] [handlers [handlers …]]

Combined test function to apply one or more tests to multiple handlers.

Each handler spec given should be a single argument but can contain shell quotes to group the parts, and should follow the form:

‘HANDLER_NAME HANDLER_ID [TEST_NAME TEST_ARGS]…’

Each TEST_ARGS value can have further shell quoting. For example:

charms.reactive test ‘foo foo_id when “foo.connected foo.available” when_not foo.disabled’

charms.reactive when [-h] [desired_flags [desired_flags …]]

Alias of when_all.

charms.reactive when_all [-h] [desired_flags [desired_flags …]]

Check if all of the desired_flags are active and have changed.

charms.reactive when_any [-h] [desired_flags [desired_flags …]]

Check if any of the desired_flags are active and have changed.

charms.reactive when_file_changed [-h] [filenames [filenames …]]

Check if files have changed since the last time they were checked.

charms.reactive when_none [-h] [desired_flags [desired_flags …]]

Check if none of the desired_flags are active and have changed.

charms.reactive when_not [-h] [desired_flags [desired_flags …]]

Alias of when_none.

charms.reactive when_not_all [-h] [desired_flags [desired_flags …]]

Check if at least one of the desired_flags is not active.