diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2008-02-12 12:55:40 -0500 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2008-02-12 12:55:40 -0500 |
commit | bca510c2645ff24e5373dc0e7ff978ba7184693d (patch) | |
tree | 382244b194a4a89dbae3a78344fdbf53f22de436 /func/overlord/groups.py | |
parent | 745205f6a225b391eef790274f776d8d38694908 (diff) | |
download | func-bca510c2645ff24e5373dc0e7ff978ba7184693d.tar.gz func-bca510c2645ff24e5373dc0e7ff978ba7184693d.tar.xz func-bca510c2645ff24e5373dc0e7ff978ba7184693d.zip |
move some methods into the Groups class.
Diffstat (limited to 'func/overlord/groups.py')
-rw-r--r-- | func/overlord/groups.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/func/overlord/groups.py b/func/overlord/groups.py index 8eaf28e..b392032 100644 --- a/func/overlord/groups.py +++ b/func/overlord/groups.py @@ -83,6 +83,18 @@ class Groups(object): def get_groups(self): return self.groups + def get_hosts_by_groupgoo(self, groupgoo): + group_gloobs = groupgoo.split(':') + hosts = [] + for group_gloob in group_gloobs: + if not group_gloob[0] == "@": + continue + if self.groups.has_key(group_gloob[1:]): + hosts = hosts + self.groups[group_gloob[1:]] + else: + print "group %s not defined" % group_gloob + return hosts + def main(): |