diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-06-18 05:43:05 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-06-18 05:43:05 +0000 |
commit | cb03ec03515e6a442c94dae0f2ac56235c050e9f (patch) | |
tree | e29a264c3bf36349fcb86f1965ae12842df9127b /src | |
parent | 762e5ed8583b3523ad0aceb4a6703a6f61560653 (diff) | |
download | bcfg2-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')
-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: |