From 772e77841ed7c8955f108ea1674b2a01df18d351 Mon Sep 17 00:00:00 2001 From: Jorge Niedbalski Date: Wed, 18 Mar 2015 15:31:42 -0300 Subject: [juju] add generate-bundle option Add a 'generate-bundle' switch to optionally collect a YAML bundle of the current environment using juju-deployerizer. Signed-off-by: Jorge Niedbalski Signed-off-by: Adam Stokes --- sos/plugins/juju.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sos/plugins/juju.py b/sos/plugins/juju.py index 2efcc2ae..b9e052f7 100644 --- a/sos/plugins/juju.py +++ b/sos/plugins/juju.py @@ -47,6 +47,9 @@ class Juju(Plugin, UbuntuPlugin): option_list = [ ('export-mongodb', 'Export mongodb collections as json files', '', False), + ('generate-bundle', + """Generate a YAML bundle of the current environment + (requires juju-deployerizer)""", '', False), ] def get_deployed_services(self): @@ -88,5 +91,9 @@ class Juju(Plugin, UbuntuPlugin): if self.get_option("export-mongodb"): self.export_mongodb() + if self.get_option("generate-bundle"): + self.add_cmd_output("juju deployerizer --include-charm-versions", + suggest_filename="juju-env-bundle.yaml") + # vim: et ts=4 sw=4 -- cgit