diff options
author | Adrian Likins <alikins@redhat.com> | 2008-03-28 16:51:55 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2008-03-28 16:51:55 -0400 |
commit | b2d8973c777e0c00192aeaa7e0a02b21675ba132 (patch) | |
tree | c5545b635a86eab5ca41b8a178957e8afcf68247 /func/overlord/cmd_modules/listminions.py | |
parent | a2d5d31e8d0cec0e700d6a95e3b912e607bbf84f (diff) | |
download | third_party-func-b2d8973c777e0c00192aeaa7e0a02b21675ba132.tar.gz third_party-func-b2d8973c777e0c00192aeaa7e0a02b21675ba132.tar.xz third_party-func-b2d8973c777e0c00192aeaa7e0a02b21675ba132.zip |
add a BaseCommand class to func/overlord/command.py.
This class adds data about the default settings for the
Overlord class that the various cmd_module classes were
hardcoding, notable DEFAULT_PORT.
update all the cmd_modules/* classes to use the new
BaseCommand class. Remove any DEFAULT_PORT references.
Also remove the ill advised --port option some of them
had, since this doesnt really make much sense.
Progress on https://fedorahosted.org/func/ticket/31
Diffstat (limited to 'func/overlord/cmd_modules/listminions.py')
-rw-r--r-- | func/overlord/cmd_modules/listminions.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/func/overlord/cmd_modules/listminions.py b/func/overlord/cmd_modules/listminions.py index fbfc282..f5a62c8 100644 --- a/func/overlord/cmd_modules/listminions.py +++ b/func/overlord/cmd_modules/listminions.py @@ -19,9 +19,8 @@ import os from func.overlord import command from func.overlord import client -DEFAULT_PORT = 51234 -class ListMinions(client.command.Command): +class ListMinions(client.command.BaseCommand): name = "list_minions" usage = "show known minions" @@ -30,20 +29,16 @@ class ListMinions(client.command.Command): action="store_true") def handleOptions(self, options): - self.port = DEFAULT_PORT if options.verbose: self.verbose = self.options.verbose + def do(self, args): - self.server_spec = self.parentCommand.server_spec - overlord_obj = client.Overlord(self.server_spec, - port=self.port, - interactive=False, - verbose=self.options.verbose, - config=self.config) + self.server_spec = self.parentCommand.server_spec + self.getOverlord() - results = overlord_obj.test.add(1,2) + results = self.overlord_obj.test.add(1,2) servers = results.keys() servers.sort() |