diff options
author | Rick Bradshow <bradshaw@mcs.anl.gov> | 2009-04-01 16:20:28 +0000 |
---|---|---|
committer | Rick Bradshow <bradshaw@mcs.anl.gov> | 2009-04-01 16:20:28 +0000 |
commit | c10e96ca5fa8f54cef51234e012f7228348f9de3 (patch) | |
tree | 81fb383fb82b11dce89bdd7a63725423d1926d03 /src/lib | |
parent | 0783c0f22ade3ce9de17f18818f6edf8fd6077a5 (diff) | |
download | bcfg2-c10e96ca5fa8f54cef51234e012f7228348f9de3.tar.gz bcfg2-c10e96ca5fa8f54cef51234e012f7228348f9de3.tar.bz2 bcfg2-c10e96ca5fa8f54cef51234e012f7228348f9de3.zip |
updated BB plugin to match new API for return types, and also fixed a small bug with FQDN.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5147 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/BB.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/BB.py b/src/lib/Server/Plugins/BB.py index 1f35fae68..1f7a3a438 100644 --- a/src/lib/Server/Plugins/BB.py +++ b/src/lib/Server/Plugins/BB.py @@ -73,16 +73,15 @@ class BB(Bcfg2.Server.Plugin.Plugin, def get_additional_metadata(self, metadata): users = {} - for user in self.store.entries['bb.xml'].users.get(metadata.hostname, []): + for user in self.store.entries['bb.xml'].users.get(metadata.hostname.split(".")[0], []): pubkeys = [] for fname in glob.glob('/home/%s/.ssh/*.pub'%user): pubkeys.append(open(fname).read()) users[user] = pubkeys - return ([], - dict([('users', users), - ('macs', self.store.entries['bb.xml'].macs)])) + return dict([('users', users), + ('macs', self.store.entries['bb.xml'].macs)]) |