summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Metadata.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-01-10 15:17:59 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-01-10 15:17:59 +0000
commitd922822bbe23387577e9e8c9f60131ac00a24c9f (patch)
tree1191e45ecfb69d09dc95c0b70265cb7a2a30a8bc /src/lib/Server/Plugins/Metadata.py
parentd887ad88674aef96f96ab0ff97c54617b8d715e7 (diff)
downloadbcfg2-d922822bbe23387577e9e8c9f60131ac00a24c9f.tar.gz
bcfg2-d922822bbe23387577e9e8c9f60131ac00a24c9f.tar.bz2
bcfg2-d922822bbe23387577e9e8c9f60131ac00a24c9f.zip
Rework bcfg2-info/showclient to use new metadata interface
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5006 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Metadata.py')
-rw-r--r--src/lib/Server/Plugins/Metadata.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index 355624ccc..eacc53f4b 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -14,9 +14,10 @@ class MetadataRuntimeError(Exception):
class ClientMetadata(object):
'''This object contains client metadata'''
- def __init__(self, client, groups, bundles, categories, uuid,
+ def __init__(self, client, profile, groups, bundles, categories, uuid,
password, overall):
self.hostname = client
+ self.profile = profile
self.bundles = bundles
self.groups = groups
self.categories = categories
@@ -358,7 +359,8 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
if client in self.aliases:
client = self.aliases[client]
if client in self.clients:
- (bundles, groups, categories) = self.groups[self.clients[client]]
+ profile = self.clients[client]
+ (bundles, groups, categories) = self.groups[profile]
else:
if self.default == None:
self.logger.error("Cannot set group for client %s; no default group set" % (client))
@@ -388,8 +390,9 @@ class Metadata(Bcfg2.Server.Plugin.Plugin,
newcategories.update(ncategories)
groupscopy = copy.deepcopy(self.groups)
clientscopy = copy.deepcopy(self.clients)
- return ClientMetadata(client, newgroups, newbundles, newcategories,
- uuid, password, (groupscopy, clientscopy))
+ return ClientMetadata(client, profile, newgroups, newbundles,
+ newcategories, uuid, password,
+ (groupscopy, clientscopy))
def merge_additional_metadata(self, imd, source, groups, data):
for group in groups: