diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-10-09 15:13:24 -0400 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-10-09 15:13:24 -0400 |
commit | 9763fdb11c8abbcb80ac8ff3ef3f4ff9d6148ff7 (patch) | |
tree | e7d376aafa26150da2c103e03f5b315833dc17ba /func/overlord/cmd_modules/call.py | |
parent | 45c032a1db94a709ec66995d3e9841630f46e3aa (diff) | |
download | third_party-func-9763fdb11c8abbcb80ac8ff3ef3f4ff9d6148ff7.tar.gz third_party-func-9763fdb11c8abbcb80ac8ff3ef3f4ff9d6148ff7.tar.xz third_party-func-9763fdb11c8abbcb80ac8ff3ef3f4ff9d6148ff7.zip |
make func_command use the new handleArguments method from
command.Command. Use this to fetch the hostnamegoo
client.py: pull out expand_servers to module scope,
and isServer(). This method basically tries to see
if what we think is hostnamegoo is actually hostnamegoo.
Kind of a guess atm.
cmd_modules/call.py: change this so it doesn't do it's
own parsing out of the hostname goo, instead using that
from func_command (aka, the top level command parser)
cmd_modules/show.py: just a cmd line module in early
development
Diffstat (limited to 'func/overlord/cmd_modules/call.py')
-rw-r--r-- | func/overlord/cmd_modules/call.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/func/overlord/cmd_modules/call.py b/func/overlord/cmd_modules/call.py index 07a3aa2..0f69713 100644 --- a/func/overlord/cmd_modules/call.py +++ b/func/overlord/cmd_modules/call.py @@ -36,11 +36,6 @@ class Call(client.command.Command): def parse(self, argv): self.argv = argv - # FIXME? not sure this is good or bad, but it seems - # wronky... we try to grab the hostnamegoo from the - # args to the parentCommand - self.server_spec = self.argv[0] - return command.Command.parse(self, argv) @@ -52,7 +47,6 @@ class Call(client.command.Command): return pprint.pformat(data) if self.options.json: - print "fffffffffffffffffffffffffffffffffffffffffff" try: import simplejson return simplejson.dumps(data) @@ -69,10 +63,15 @@ class Call(client.command.Command): # I kind of feel like we shouldn't be parsing args here, but I'm # not sure what the write place is -al; - self.server_spec = args[0] - self.module = args[1] - self.method = args[2] - self.method_args = args[3:] + self.module = args[0] + self.method = args[1] + self.method_args = args[2:] + + # this could get weird, sub sub classes might be calling this + # this with multiple.parentCommand.parentCommands... + # maybe command.py needs a way to set attrs on subCommands? + # or some sort of shared datastruct? + 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) |