summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-03-20 15:49:35 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-03-20 15:49:35 +0000
commit11250729784b44acbb042444c283f14d990ad416 (patch)
treeb577ae8a91ea20644f3e38392011964737ea51fb /src/sbin
parentce7569dba379f47c6c52533a2ae6aafe83aa3313 (diff)
downloadbcfg2-11250729784b44acbb042444c283f14d990ad416.tar.gz
bcfg2-11250729784b44acbb042444c283f14d990ad416.tar.bz2
bcfg2-11250729784b44acbb042444c283f14d990ad416.zip
Add UUID/per-client passwords
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2948 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-server13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index e444c2ad4..cd53ab1be 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -128,7 +128,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
'''Fetch probes for a particular client'''
resp = Element('probes')
try:
- name = self.Core.metadata.resolve_client(address[0])
+ name = self.Core.metadata.resolve_client(address)
meta = self.Core.metadata.get_metadata(name)
for plugin in self.Core.plugins.values():
@@ -145,7 +145,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
def Bcfg2RecvProbeData(self, address, probedata):
'''Receive probe data from clients'''
try:
- name = self.Core.metadata.resolve_client(address[0])
+ name = self.Core.metadata.resolve_client(address)
meta = self.Core.metadata.get_metadata(name)
except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
warning = 'metadata consistency error'
@@ -172,7 +172,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
def Bcfg2AssertProfile(self, address, profile):
'''Set profile for a client'''
try:
- client = self.Core.metadata.resolve_client(address[0])
+ client = self.Core.metadata.resolve_client(address)
self.Core.metadata.set_profile(client, profile)
except (Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError, Bcfg2.Server.Plugins.Metadata.MetadataRuntimeError):
warning = 'metadata consistency error'
@@ -183,7 +183,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
def Bcfg2GetConfig(self, address, _=False, profile=False):
'''Build config for a client'''
try:
- client = self.Core.metadata.resolve_client(address[0])
+ client = self.Core.metadata.resolve_client(address)
return tostring(self.Core.BuildConfiguration(client))
except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
self.logger.warning("Metadata consistency failure for %s" % (address))
@@ -195,7 +195,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
state = sdata.find(".//Statistics")
# Versioned stats to prevent tied client/server upgrade
if state.get('version') >= '2.0':
- client = self.Core.metadata.resolve_client(address[0])
+ client = self.Core.metadata.resolve_client(address)
meta = self.Core.metadata.get_metadata(client)
# Update statistics
@@ -205,6 +205,9 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
(client, state.attrib['state']))
return "<ok/>"
+ def _authenticate_connection(self, _, user, password, address):
+ return self.Core.metadata.AuthenticateConnection(user, password, address)
+
if __name__ == '__main__':
OPTINFO = {