diff options
-rw-r--r-- | src/lib/Server/Core.py | 1 | ||||
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index 3d19377a1..68d381e6b 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -274,6 +274,7 @@ class Core(Component): for conn in self.connectors: data = conn.get_additional_data(imd) self.metadata.merge_additional_data(imd, conn.name, data) + imd.build_metadata = self.build_metadata return imd def process_statistics(self, client_name, statistics): 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: |