Blame SOURCES/fence_aliyun-2.patch

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