aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johnston <chrisjohnston@ubuntu.com>2014-10-28 10:37:08 -0400
committerAdam Stokes <adam.stokes@ubuntu.com>2014-10-30 14:15:28 -0400
commit7739c76eaa8b02ba41f23aaceac0b064619321ed (patch)
tree4d302b0926b51d39131a88a11fbb4a40c311f3f4
parentd7759d3ddae5fe99a340c88a1d370d65cfa73fd6 (diff)
downloadsos-7739c76eaa8b02ba41f23aaceac0b064619321ed.tar.gz
[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 <chrisjohnston@ubuntu.com> Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/plugins/maas.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sos/plugins/maas.py b/sos/plugins/maas.py
index edcea5e0..051f4115 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