Blame SOURCES/bz1568742-2-fence_aliyun.patch

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