Blame SOURCES/bz1568742-2-fence_aliyun.patch

554a6e
From 8db45537fb470624a754ea1243cc4f349a9b413d Mon Sep 17 00:00:00 2001
554a6e
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
554a6e
Date: Tue, 24 Jul 2018 13:10:41 +0200
554a6e
Subject: [PATCH] fence_aliyun: fix CI and add Python detection
554a6e
554a6e
---
554a6e
 agents/aliyun/fence_aliyun.py        | 19 ++++++++++---------
554a6e
 tests/data/metadata/fence_aliyun.xml |  1 +
554a6e
 2 files changed, 11 insertions(+), 9 deletions(-)
554a6e
554a6e
diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py
554a6e
index 0f24b83e..aa6c0acf 100644
554a6e
--- a/agents/aliyun/fence_aliyun.py
554a6e
+++ b/agents/aliyun/fence_aliyun.py
554a6e
@@ -1,14 +1,14 @@
554a6e
-#!/usr/bin/python -tt
554a6e
+#!@PYTHON@ -tt
554a6e
 
554a6e
-try:
554a6e
-	import sys, re
554a6e
-	import logging
554a6e
-	import atexit
554a6e
-	import json
554a6e
-	sys.path.append("@FENCEAGENTSLIBDIR@")
554a6e
-	from fencing import *
554a6e
-	from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay
554a6e
+import sys, re
554a6e
+import logging
554a6e
+import atexit
554a6e
+import json
554a6e
+sys.path.append("@FENCEAGENTSLIBDIR@")
554a6e
+from fencing import *
554a6e
+from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay
554a6e
 
554a6e
+try:
554a6e
 	from aliyunsdkcore import client
554a6e
 
554a6e
 	from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest
554a6e
@@ -17,6 +17,7 @@
554a6e
 	from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest
554a6e
 except ImportError:
554a6e
 	pass
554a6e
+
554a6e
 def _send_request(conn, request):
554a6e
 	request.set_accept_format('json')
554a6e
 	try:
554a6e
diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml
554a6e
index 1db692ee..b41d82bf 100644
554a6e
--- a/tests/data/metadata/fence_aliyun.xml
554a6e
+++ b/tests/data/metadata/fence_aliyun.xml
554a6e
@@ -108,6 +108,7 @@
554a6e
 	<action name="list-status" />
554a6e
 	<action name="monitor" />
554a6e
 	<action name="metadata" />
554a6e
+	<action name="manpage" />
554a6e
 	<action name="validate-all" />
554a6e
 </actions>
554a6e
 </resource-agent>