fence-agents: master - fencing: fix attribute --login to --username

Marek GrĂ¡c marx at fedoraproject.org
Wed Jul 17 08:22:42 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=cff73b867e9e39d4161d825192b0d295751ba968
Commit:        cff73b867e9e39d4161d825192b0d295751ba968
Parent:        3b6970b97f729d60adfa728dcda67367c5e23057
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Wed Jul 17 10:19:19 2013 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed Jul 17 10:19:19 2013 +0200

fencing: fix attribute --login to --username

Resolves: rhbz#984975
---
 fence/agents/eps/fence_eps.py       |    4 ++--
 fence/agents/rhevm/fence_rhevm.py   |    2 +-
 fence/agents/xenapi/fence_xenapi.py |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fence/agents/eps/fence_eps.py b/fence/agents/eps/fence_eps.py
index dfb0b5b..0e7709d 100644
--- a/fence/agents/eps/fence_eps.py
+++ b/fence/agents/eps/fence_eps.py
@@ -35,12 +35,12 @@ def eps_run_command(options, params):
 		eps_log(options, "GET "+request_str+"\n")
 		conn.putrequest('GET', request_str)
 
-		if (options.has_key("--login")):
+		if (options.has_key("--username")):
 			if (not options.has_key("--password")):
 				options["--password"] = "" # Default is empty password
 				
 			# String for Authorization header
-			auth_str = 'Basic ' + string.strip(base64.encodestring(options["--login"]+':'+options["--password"]))
+			auth_str = 'Basic ' + string.strip(base64.encodestring(options["--username"]+':'+options["--password"]))
 			eps_log(options, "Authorization:"+auth_str+"\n")
 			conn.putheader('Authorization', auth_str)
 
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index f4c490f..d7fc326 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -82,7 +82,7 @@ def send_command(opt, command, method = "GET"):
 	c.setopt(pycurl.URL, url)
 	c.setopt(pycurl.HTTPHEADER, [ "Content-type: application/xml", "Accept: application/xml" ])
 	c.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC)
-	c.setopt(pycurl.USERPWD, opt["--login"] + ":" + opt["--password"])
+	c.setopt(pycurl.USERPWD, opt["--username"] + ":" + opt["--password"])
 	c.setopt(pycurl.TIMEOUT, int(opt["--shell-timeout"]))
 	c.setopt(pycurl.SSL_VERIFYPEER, 0)
 	c.setopt(pycurl.SSL_VERIFYHOST, 0)
diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py
index de42c6c..7ba8533 100644
--- a/fence/agents/xenapi/fence_xenapi.py
+++ b/fence/agents/xenapi/fence_xenapi.py
@@ -130,7 +130,7 @@ def get_outlet_list(session, options):
 # Function to initiate the XenServer session via the XenAPI library.
 def connect_and_login(options):
 	url = options["--session-url"]
-	username = options["--login"]
+	username = options["--username"]
 	password = options["--passwd"]
 
 	try:


More information about the cluster-commits mailing list