|
|
3340af |
commit a4cbf5ba86d196b236cc58ad2dee2f3317e1ee10
|
|
|
3340af |
Author: Marek 'marx' Grac <mgrac@redhat.com>
|
|
|
3340af |
Date: Mon Sep 8 15:02:53 2014 +0200
|
|
|
3340af |
|
|
|
3340af |
[clenaup] Fix whitespace convention issues
|
|
|
3340af |
|
|
|
3340af |
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
|
|
|
3340af |
index 557358a..640f81a 100644
|
|
|
3340af |
--- a/fence/agents/lib/fencing.py.py
|
|
|
3340af |
+++ b/fence/agents/lib/fencing.py.py
|
|
|
3340af |
@@ -719,7 +719,6 @@ def check_input(device_opt, opt):
|
|
|
3340af |
logging.getLogger().addHandler(SyslogLibHandler())
|
|
|
3340af |
## add loggint to stderr
|
|
|
3340af |
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stderr))
|
|
|
3340af |
-
|
|
|
3340af |
|
|
|
3340af |
acceptable_actions = ["on", "off", "status", "list", "monitor"]
|
|
|
3340af |
if 1 == device_opt.count("fabric_fencing"):
|
|
|
3340af |
@@ -1159,9 +1158,8 @@ def fence_logout(conn, logout_string, sleep=0):
|
|
|
3340af |
def array_to_dict(ar):
|
|
|
3340af |
return dict([[x[0].split(".")[-1], x[1]] for x in ar])
|
|
|
3340af |
|
|
|
3340af |
-
|
|
|
3340af |
## Own logger handler that uses old-style syslog handler as otherwise everything is sourced
|
|
|
3340af |
-## from /dev/syslog
|
|
|
3340af |
+## from /dev/syslog
|
|
|
3340af |
class SyslogLibHandler(logging.StreamHandler):
|
|
|
3340af |
"""
|
|
|
3340af |
A handler class that correctly push messages into syslog
|
|
|
3340af |
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
|
|
|
3340af |
index 2cea105..e47f11e 100644
|
|
|
3340af |
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
|
|
|
3340af |
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
|
|
|
3340af |
@@ -11,7 +11,7 @@ from suds.sudsobject import Property
|
|
|
3340af |
from suds.transport.http import HttpAuthenticated
|
|
|
3340af |
from suds.transport import Reply, TransportError
|
|
|
3340af |
from fencing import *
|
|
|
3340af |
-from fencing import fail, EC_STATUS, EC_LOGIN_DENIED, EC_INVALID_PRIVILEGES, EC_WAITING_ON, EC_WAITING_OFF
|
|
|
3340af |
+from fencing import fail, fail_usage, EC_STATUS, EC_LOGIN_DENIED, EC_INVALID_PRIVILEGES, EC_WAITING_ON, EC_WAITING_OFF
|
|
|
3340af |
from fencing import run_delay
|
|
|
3340af |
|
|
|
3340af |
#BEGIN_VERSION_GENERATION
|
|
|
3340af |
@@ -33,7 +33,7 @@ class RequestsTransport(HttpAuthenticated):
|
|
|
3340af |
|
|
|
3340af |
def send(self, request):
|
|
|
3340af |
self.addcredentials(request)
|
|
|
3340af |
- resp = self.session.post(request.url, data = request.message, headers = request.headers, cert = self.cert, verify = self.verify)
|
|
|
3340af |
+ resp = self.session.post(request.url, data=request.message, headers=request.headers, cert=self.cert, verify=self.verify)
|
|
|
3340af |
result = Reply(resp.status_code, resp.headers, resp.content)
|
|
|
3340af |
return result
|
|
|
3340af |
|
|
|
3340af |
@@ -58,7 +58,7 @@ def soap_login(options):
|
|
|
3340af |
|
|
|
3340af |
try:
|
|
|
3340af |
headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : ""}
|
|
|
3340af |
- conn = Client(url + "/vimService.wsdl", location = url, transport = RequestsTransport(verify = verify), headers = headers)
|
|
|
3340af |
+ conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers)
|
|
|
3340af |
|
|
|
3340af |
mo_ServiceInstance = Property('ServiceInstance')
|
|
|
3340af |
mo_ServiceInstance._type = 'ServiceInstance'
|