fix default auth method
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Fri, 12 Oct 2012 20:36:32 +0000 (16:36 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Fri, 12 Oct 2012 20:36:32 +0000 (16:36 -0400)
PLC/Shell.py
plcsh

index fb401d3..4440979 100644 (file)
@@ -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 2bd4660..d8ab48f 100755 (executable)
--- 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")