From 7739c76eaa8b02ba41f23aaceac0b064619321ed Mon Sep 17 00:00:00 2001 From: Chris Johnston Date: Tue, 28 Oct 2014 10:37:08 -0400 Subject: [PATCH 17/93] [maas] Fix maas dumpdata command not found Fixes: #423 The maas dumpdata command issued by the MAAS plugin causes a command not found error. The command is now issued to maas-region-admin. Also corrected capitalizations around the MAAS name. Fixes: 423 Signed-off-by: Chris Johnston Signed-off-by: Adam Stokes --- sos/plugins/maas.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sos/plugins/maas.py b/sos/plugins/maas.py index edcea5e..051f411 100644 --- a/sos/plugins/maas.py +++ b/sos/plugins/maas.py @@ -18,7 +18,7 @@ from sos.plugins import Plugin, UbuntuPlugin class Maas(Plugin, UbuntuPlugin): - """Ubuntu Metal-as-a-Service + """Ubuntu Metal-As-A-Service """ plugin_name = 'maas' @@ -56,15 +56,19 @@ class Maas(Plugin, UbuntuPlugin): self.add_cmd_output([ "apt-cache policy maas-*", "apt-cache policy python-django-*", - "maas dumpdata" ]) + if self.is_installed("maas-region-controller"): + self.add_cmd_output([ + "maas-region-admin dumpdata", + ]) + if self._has_login_options(): if self._remote_api_login(): self.add_cmd_output("maas %s commissioning-results list" % self.get_option("profile-name")) else: self._log_error( - "Cannot login into Maas remote API with provided creds.") + "Cannot login into MAAS remote API with provided creds.") # vim: et ts=4 sw=4 -- 1.9.3