summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2009-06-01 19:46:43 -0400
committerBill Peck <bpeck@redhat.com>2009-06-01 19:46:43 -0400
commit5386bca15449a7d10231ed20880a75c9bb20ad3c (patch)
tree98781f0d5daa5ff88416fa7f4ff827124983c050
parentdbcc1488279f5ddedc2c9e591dd31d78bdd54585 (diff)
update defaults for client.conf
-rw-r--r--Client/client.conf4
-rw-r--r--Server/beaker/server/authentication.py8
-rw-r--r--Server/beaker/server/controllers.py16
-rw-r--r--Server/beaker/server/labcontroller.py4
-rw-r--r--Server/beaker/server/xmlrpccontroller.py2
5 files changed, 16 insertions, 18 deletions
diff --git a/Client/client.conf b/Client/client.conf
index 950379e..305f64f 100644
--- a/Client/client.conf
+++ b/Client/client.conf
@@ -6,8 +6,8 @@ HUB_URL = "http://localhost:8080"
AUTH_METHOD = "password"
# Username and password
-#AUTH_USERNAME = ""
-#AUTH_PASSWORD = ""
+#USERNAME = ""
+#PASSWORD = ""
# A unique worker key used for authentication.
# I't recommended to use krbv auth in production environment instead.
diff --git a/Server/beaker/server/authentication.py b/Server/beaker/server/authentication.py
index 5aca355..06ae5f5 100644
--- a/Server/beaker/server/authentication.py
+++ b/Server/beaker/server/authentication.py
@@ -36,19 +36,19 @@ class Auth(RPCRoot):
return True
@cherrypy.expose
- def login_password(self, *args, **kw):
+ def login_password(self, username, password):
"""
Login via password
"""
visit_key = turbogears.visit.current().key
- user = identity.current_provider.validate_identity(args[1], args[2], visit_key)
+ user = identity.current_provider.validate_identity(username, password, visit_key)
if user is None:
raise IdentityException("Invalid username or password")
return identity.current.visit_key
# TODO: proxy_user
@cherrypy.expose
- def login_krbV(self, request, krb_request, proxy_user=None):
+ def login_krbV(self, krb_request, proxy_user=None):
"""login_krbV(krb_request, proxy_user=None): session_key"""
import krbV
import base64
@@ -76,7 +76,7 @@ class Auth(RPCRoot):
return identity.current.visit_key
@cherrypy.expose
- def logout(self, *args, **kw):
+ def logout(self, *args):
"""
Logout session
"""
diff --git a/Server/beaker/server/controllers.py b/Server/beaker/server/controllers.py
index 4e9a792..48307e1 100644
--- a/Server/beaker/server/controllers.py
+++ b/Server/beaker/server/controllers.py
@@ -69,7 +69,7 @@ class Netboot:
return Root().system_return(*args)
@cherrypy.expose
- def commandBoot(self, machine_account, commands):
+ def commandBoot(self, commands):
"""
NetBoot Compat layer for old RHTS Scheduler
"""
@@ -119,7 +119,7 @@ class Netboot:
if hostname:
system = System.query().filter(System.fqdn == hostname).one()
rc, result = system.action_auto_provision(distro, ks_meta, bootargs, None, kickstart)
- activity = SystemActivity(system.user, 'VIA %s' % machine_account, 'Provision', 'Distro', "", "%s: %s" % (result, distro.install_name))
+ activity = SystemActivity(system.user, 'VIA %s' % None, 'Provision', 'Distro', "", "%s: %s" % (result, distro.install_name))
system.activity.append(activity)
else:
rc = -3
@@ -1183,7 +1183,7 @@ class Root(RPCRoot):
return systems
@cherrypy.expose
- def system_pick(self, machine_account, distro=None, username=None, xml=None):
+ def system_pick(self, distro=None, username=None, xml=None):
if not distro:
return (0,"You must supply a distro")
if not username:
@@ -1227,7 +1227,7 @@ class Root(RPCRoot):
return (None, -1)
@cherrypy.expose
- def system_validate(self, machine_account, distro=None, username=None, xml=None):
+ def system_validate(self, distro=None, username=None, xml=None):
if not distro:
return (0,"You must supply a distro")
if not username:
@@ -1257,7 +1257,7 @@ class Root(RPCRoot):
return (None, -1)
@cherrypy.expose
- def system_return(self, machine_account, fqdn=None, full_name=None, log=True):
+ def system_return(self, fqdn=None, full_name=None, log=True):
if not fqdn:
return (0,"You must supply a system")
if not full_name:
@@ -1277,14 +1277,14 @@ class Root(RPCRoot):
return (0, "Invalid system")
if system.user == user:
if log:
- activity = SystemActivity(system.user, 'VIA %s' % machine_account, "Returned", 'User', '%s' % system.user, '')
+ activity = SystemActivity(system.user, 'VIA %s' % None, "Returned", 'User', '%s' % system.user, '')
system.activity.append(activity)
system.action_return()
return
@cherrypy.expose
- def legacypush(self, machine_account, fqdn=None, inventory=None):
+ def legacypush(self, fqdn=None, inventory=None):
if not fqdn:
return (0,"You must supply a FQDN")
if not inventory:
@@ -1297,7 +1297,7 @@ class Root(RPCRoot):
return system.update_legacy(inventory)
@cherrypy.expose
- def push(self, machine_account, fqdn=None, inventory=None):
+ def push(self, fqdn=None, inventory=None):
if not fqdn:
return (0,"You must supply a FQDN")
if not inventory:
diff --git a/Server/beaker/server/labcontroller.py b/Server/beaker/server/labcontroller.py
index 5b3ecd0..8228bbf 100644
--- a/Server/beaker/server/labcontroller.py
+++ b/Server/beaker/server/labcontroller.py
@@ -84,7 +84,7 @@ class LabControllers(RPCRoot):
redirect(".")
@cherrypy.expose
- def addDistros(self, machine_account, lc_name, lc_distros):
+ def addDistros(self, lc_name, lc_distros):
"""
XMLRPC Push method for adding distros
"""
@@ -180,7 +180,7 @@ class LabControllers(RPCRoot):
return distros
@cherrypy.expose
- def removeDistros(self, machine_account, lc_name, distro_names):
+ def removeDistros(self, lc_name, distro_names):
"""
Push method for removing distros
"""
diff --git a/Server/beaker/server/xmlrpccontroller.py b/Server/beaker/server/xmlrpccontroller.py
index 0543909..21becfd 100644
--- a/Server/beaker/server/xmlrpccontroller.py
+++ b/Server/beaker/server/xmlrpccontroller.py
@@ -9,8 +9,6 @@ class RPCRoot(controllers.Controller):
@turbogears.expose()
def RPC2(self):
params, method = xmlrpclib.loads(cherrypy.request.body.read())
- # Add Machine Account to params
- params = (cherrypy.request.login,) + params
try:
if method == "RPC2":
# prevent recursion