diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-10-10 13:16:56 -0400 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-10-10 13:16:56 -0400 |
commit | e346007f79fc81c3421964128eb3683e7301a992 (patch) | |
tree | 531feca9716a8445e2f1062dc840c9f1470c70d8 /func | |
parent | b2677b2cf5d14535bab45d32c60b9ddf2d682d91 (diff) | |
download | third_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.py | 17 |
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) |