Blame SOURCES/fence_aliyun-2.patch

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