summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2007-10-10 13:16:56 -0400
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2007-10-10 13:16:56 -0400
commite346007f79fc81c3421964128eb3683e7301a992 (patch)
tree531feca9716a8445e2f1062dc840c9f1470c70d8 /func
parentb2677b2cf5d14535bab45d32c60b9ddf2d682d91 (diff)
downloadthird_party-func-e346007f79fc81c3421964128eb3683e7301a992.tar.gz
third_party-func-e346007f79fc81c3421964128eb3683e7301a992.tar.xz
third_party-func-e346007f79fc81c3421964128eb3683e7301a992.zip
add "show hardare --os" option
clean up other bits which of course, it makes no sense to call a subcommand called "hardware" to get the os version, but alas.
Diffstat (limited to 'func')
-rw-r--r--func/overlord/cmd_modules/show.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/func/overlord/cmd_modules/show.py b/func/overlord/cmd_modules/show.py
index cfe2aa8..64bf726 100644
--- a/func/overlord/cmd_modules/show.py
+++ b/func/overlord/cmd_modules/show.py
@@ -24,6 +24,8 @@ class ShowHardware(client.command.Command):
action="store_true")
self.parser.add_option("", "--memory", dest="memory",
action="store_true")
+ self.parser.add_option("","--os", dest="os",
+ action="store_true")
def handleOptions(self, options):
@@ -58,7 +60,7 @@ class ShowHardware(client.command.Command):
# do the big dump
# also, optparse is annoying -akl
- opt_list = ["--platform", "--memory"]
+ opt_list = ["--platform", "--memory", "--os"]
for opt in opt_list:
if self.parser.has_option(opt):
options_set = True
@@ -77,6 +79,9 @@ class ShowHardware(client.command.Command):
if self.options.memory:
print minion_data["systemMemory"]
+ if self.options.os:
+ print minion_data["os"]
+
class Show(client.command.Command):
name = "show"
useage = "various simple report stuff"
@@ -103,14 +108,4 @@ class Show(client.command.Command):
def do(self, args):
pass
-# self.server_spec = self.parentCommand.server_spec
-# client_obj = client.Client(self.server_spec,port=self.port,interactive=True,
-# verbose=self.verbose, config=self.config)
-# results = client_obj.run("hardware", "info", [])
-
- # TO DO: add multiplexer support
- # probably as a higher level module.
-
- # dump the return code stuff atm till we figure out the right place for it
-# return self.format_return(results)