diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2008-09-26 02:45:40 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2008-09-26 02:45:40 +0000 |
commit | 163f425fa604b898f2d2b3aef47770790adad3ea (patch) | |
tree | 35f18e81daab850f04688bfda4b7f6409efe4fa9 /src/lib/Server/Plugins/Metadata.py | |
parent | a1234fa06acbb1f33790f54c626cd8ed7506c0ce (diff) | |
download | bcfg2-163f425fa604b898f2d2b3aef47770790adad3ea.tar.gz bcfg2-163f425fa604b898f2d2b3aef47770790adad3ea.tar.bz2 bcfg2-163f425fa604b898f2d2b3aef47770790adad3ea.zip |
bcfg -> bcfg2
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4921 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Metadata.py')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index c6008c7f4..c19d1f9a4 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -1,4 +1,4 @@ -'''This file stores persistent metadata for the BCFG Configuration Repository''' +'''This file stores persistent metadata for the Bcfg2 Configuration Repository''' __revision__ = '$Revision$' import lxml.etree, re, socket, time, fcntl, copy @@ -141,7 +141,7 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin, self.probedata = {} self.extra = {'groups.xml':[], 'clients.xml':[]} self.password = core.password - self.load_probedata() + self.load_probedata() def get_groups(self): '''return groups xml tree''' @@ -168,8 +168,8 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin, element.set(key, val) node = self.search_client(client_name, root) if node != None: - self.logger.error("Client \"%s\" already exists" % (client_name)) - raise MetadataConsistencyError + self.logger.error("Client \"%s\" already exists" % (client_name)) + raise MetadataConsistencyError root.append(element) client_tree = open(self.data + "/clients.xml","w") fd = client_tree.fileno() @@ -341,7 +341,7 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin, if profile not in self.public: self.logger.error("Failed to set client %s to private group %s" % (client, profile)) raise MetadataConsistencyError - if self.clients.has_key(client): + if self.clients.has_key(client): self.logger.info("Changing %s group from %s to %s" % (client, self.clients[client], profile)) cli = self.clientdata_original.xpath('.//Client[@name="%s"]' % (client)) cli[0].set('profile', profile) @@ -588,7 +588,7 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin, def GetClientByProfile(self, profile): '''Return a list of clients that are members of a given profile''' return [client for client in self.clients \ - if self.clients[client] == profile] + if self.clients[client] == profile] def viz(self, hosts, bundles, key, colors): '''admin mode viz support''' |