summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-07-08 01:38:14 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-07-08 01:38:14 +0000
commit7da25678e08fa944b3a6af00179b7bbd91853255 (patch)
tree8dc65ba2ec20c6fb9e076dda5f7aac083f6a417a /src
parent752925a8852df0ad33b6aa91a5a987cb7e8d4ab4 (diff)
downloadbcfg2-7da25678e08fa944b3a6af00179b7bbd91853255.tar.gz
bcfg2-7da25678e08fa944b3a6af00179b7bbd91853255.tar.bz2
bcfg2-7da25678e08fa944b3a6af00179b7bbd91853255.zip
Fix set_profile after xinclude fix (Fixes issue reported by SolJ)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4759 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Metadata.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index 6f23eb2e4..3a2c48528 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -249,17 +249,19 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin,
raise MetadataConsistencyError
if self.clients.has_key(client):
self.logger.info("Changing %s group from %s to %s" % (client, self.clients[client], profile))
- cli = self.clientdata.xpath('.//Client[@name="%s"]' % (client))
+ cli = self.clientdata_original.xpath('.//Client[@name="%s"]' % (client))
cli[0].set('profile', profile)
else:
+ self.logger.info("Creating new client: %s, profile %s" % \
+ (client, profile))
if self.session_cache.has_key(addresspair):
# we are working with a uuid'd client
- lxml.etree.SubElement(self.clientdata.getroot(),
+ lxml.etree.SubElement(self.clientdata_original.getroot(),
'Client', name=client,
uuid=client, profile=profile,
address=addresspair[0])
else:
- lxml.etree.SubElement(self.clientdata.getroot(),
+ lxml.etree.SubElement(self.clientdata_original.getroot(),
'Client', name=client,
profile=profile)
self.clients[client] = profile