diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 8 |
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 |