summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-07-11 14:54:51 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-07-11 14:54:51 -0400
commit0b8bb3c8dff4b612f85187e9fea8a3f3d1233e4c (patch)
tree05ee3f943fb4f3201ea29f36330838cdb0076e59 /func
parent692807b31f32d79c90e202a8edca3508dbd03e6b (diff)
downloadfunc-0b8bb3c8dff4b612f85187e9fea8a3f3d1233e4c.tar.gz
func-0b8bb3c8dff4b612f85187e9fea8a3f3d1233e4c.tar.xz
func-0b8bb3c8dff4b612f85187e9fea8a3f3d1233e4c.zip
Make list_minions use the server_spec APIs versus making a remote test call.
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/certmaster.py2
-rw-r--r--func/minion/modules/echo.py1
-rw-r--r--func/overlord/cmd_modules/listminions.py12
3 files changed, 6 insertions, 9 deletions
diff --git a/func/minion/modules/certmaster.py b/func/minion/modules/certmaster.py
index c30a39c..7237ffa 100644
--- a/func/minion/modules/certmaster.py
+++ b/func/minion/modules/certmaster.py
@@ -15,7 +15,7 @@
# our modules
import func_module
-from func import certmaster as certmaster
+import certmaster.certmaster as certmaster
# =================================
diff --git a/func/minion/modules/echo.py b/func/minion/modules/echo.py
index 31ecf5f..97afe42 100644
--- a/func/minion/modules/echo.py
+++ b/func/minion/modules/echo.py
@@ -1,5 +1,6 @@
"""
Test module for rendering funcweb
+(We can remove this module once other modules are instrumented)
"""
import func_module
diff --git a/func/overlord/cmd_modules/listminions.py b/func/overlord/cmd_modules/listminions.py
index cf52855..5264791 100644
--- a/func/overlord/cmd_modules/listminions.py
+++ b/func/overlord/cmd_modules/listminions.py
@@ -17,6 +17,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import optparse
import os
+from func.overlord import client
from func.overlord import base_command
class ListMinions(base_command.BaseCommand):
@@ -36,15 +37,10 @@ class ListMinions(base_command.BaseCommand):
def do(self, args):
self.server_spec = self.parentCommand.server_spec
- self.getOverlord()
- results = self.overlord_obj.test.add(1,2)
- servers = results.keys()
+ minion_set = client.Minions(self.server_spec, port=self.port)
+ servers = minion_set.get_all_hosts()
servers.sort()
-
- # print servers
for server in servers:
- # just cause I hate regex'es -akl
- # host = server.split(':')[-2]
- # host = host.split('/')[-1]
print server
+