From cb03ec03515e6a442c94dae0f2ac56235c050e9f Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 18 Jun 2009 05:43:05 +0000 Subject: 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 --- src/lib/Server/Plugins/Metadata.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/lib/Server/Plugins') 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: -- cgit v1.2.3-1-g7c22