summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-06-18 05:43:05 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-06-18 05:43:05 +0000
commitcb03ec03515e6a442c94dae0f2ac56235c050e9f (patch)
treee29a264c3bf36349fcb86f1965ae12842df9127b /src/lib/Server/Plugins
parent762e5ed8583b3523ad0aceb4a6703a6f61560653 (diff)
downloadbcfg2-cb03ec03515e6a442c94dae0f2ac56235c050e9f.tar.gz
bcfg2-cb03ec03515e6a442c94dae0f2ac56235c050e9f.tar.bz2
bcfg2-cb03ec03515e6a442c94dae0f2ac56235c050e9f.zip
Implement zultron's inter-client metadata stuff
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5282 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Metadata.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index bf943f349..dde026887 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -19,7 +19,7 @@ class MetadataRuntimeError(Exception):
class ClientMetadata(object):
'''This object contains client metadata'''
def __init__(self, client, profile, groups, bundles, categories, uuid,
- password, overall):
+ password, overall, clients_func):
self.hostname = client
self.profile = profile
self.bundles = bundles
@@ -29,6 +29,7 @@ class ClientMetadata(object):
self.password = password
self.all = overall
self.connectors = []
+ self.all_clients = clients_func
def inGroup(self, group):
'''Test to see if client is a member of group'''
@@ -339,7 +340,10 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
except IOError:
return True
return False
-
+
+ def get_clients(self):
+ return self.clients.keys()
+
def resolve_client(self, addresspair):
'''Lookup address locally or in DNS to get a hostname'''
#print self.session_cache
@@ -403,7 +407,7 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
clientscopy = copy.deepcopy(self.clients)
return ClientMetadata(client, profile, newgroups, newbundles,
newcategories, uuid, password,
- (groupscopy, clientscopy))
+ (groupscopy, clientscopy), self.get_clients)
def merge_additional_groups(self, imd, groups):
for group in groups: