From: Tony Mack Date: Fri, 12 Oct 2012 20:36:32 +0000 (-0400) Subject: fix default auth method X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cd821a88f9be504e81fd5a2d0af8c86d9bdf2f29;p=plcapi.git fix default auth method --- diff --git a/PLC/Shell.py b/PLC/Shell.py index fb401d38..4440979e 100644 --- a/PLC/Shell.py +++ b/PLC/Shell.py @@ -65,7 +65,6 @@ class Shell: """ Initialize a new shell instance. Re-initializes globals. """ - try: # If any XML-RPC options have been specified, do not try # connecting directly to the DB. @@ -120,6 +119,7 @@ class Shell: if not method or method == "capability": # Load defaults from configuration file if using capability # authentication. + method = "capability" if user is None and self.config is not None: user = self.config.nova_admin_user if password is None and self.config is not None: diff --git a/plcsh b/plcsh index 2bd46600..d8ab48f9 100755 --- a/plcsh +++ b/plcsh @@ -27,7 +27,7 @@ parser.add_option("-f", "--config", help = "PLC configuration file") parser.add_option("-h", "--url", help = "API URL") parser.add_option("-c", "--cacert", help = "API SSL certificate") parser.add_option("-k", "--insecure", help = "Do not check SSL certificate") -parser.add_option("-m", "--method", help = "API authentication method", default='capability') +parser.add_option("-m", "--method", help = "API authentication method") parser.add_option("-s", "--session", help = "API session key") parser.add_option("-u", "--user", help = "API user name") parser.add_option("-p", "--password", help = "API password")