783
783
# amulet juju action helpers:
784
784
def run_action(self, unit_sentry, action,
786
787
"""Run the named action on a given unit sentry.
788
790
_check_output parameter is used for dependency injection.
792
794
unit_id = unit_sentry.info["unit_name"]
793
795
command = ["juju", "action", "do", "--format=json", unit_id, action]
794
799
self.log.info("Running command: %s\n" % " ".join(command))
795
800
output = _check_output(command, universal_newlines=True)
796
801
data = json.loads(output)