Blame SOURCES/fence_aliyun-2.patch

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