1 Star 0 Fork 16

bixiaoyan/fence-agents

forked from src-openEuler/fence-agents 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fence_aliyun-2.patch 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
liqiuyu 提交于 2020-11-20 11:45 . Resolve agent redfish compilation fail
From 8db45537fb470624a754ea1243cc4f349a9b413d Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <[email protected]>
Date: Tue, 24 Jul 2018 13:10:41 +0200
Subject: [PATCH] fence_aliyun: fix CI and add Python detection
---
agents/aliyun/fence_aliyun.py | 19 ++++++++++---------
tests/data/metadata/fence_aliyun.xml | 1 +
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py
index 0f24b83e..aa6c0acf 100644
--- a/agents/aliyun/fence_aliyun.py
+++ b/agents/aliyun/fence_aliyun.py
@@ -1,14 +1,14 @@
-#!/usr/bin/python -tt
+#!@PYTHON@ -tt
-try:
- import sys, re
- import logging
- import atexit
- import json
- sys.path.append("@FENCEAGENTSLIBDIR@")
- from fencing import *
- from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay
+import sys, re
+import logging
+import atexit
+import json
+sys.path.append("@FENCEAGENTSLIBDIR@")
+from fencing import *
+from fencing import fail, fail_usage, EC_TIMED_OUT, run_delay
+try:
from aliyunsdkcore import client
from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest
@@ -17,6 +17,7 @@
from aliyunsdkecs.request.v20140526.RebootInstanceRequest import RebootInstanceRequest
except ImportError:
pass
+
def _send_request(conn, request):
request.set_accept_format('json')
try:
diff --git a/tests/data/metadata/fence_aliyun.xml b/tests/data/metadata/fence_aliyun.xml
index 1db692ee..b41d82bf 100644
--- a/tests/data/metadata/fence_aliyun.xml
+++ b/tests/data/metadata/fence_aliyun.xml
@@ -108,6 +108,7 @@
<action name="list-status" />
<action name="monitor" />
<action name="metadata" />
+ <action name="manpage" />
<action name="validate-all" />
</actions>
</resource-agent>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bixiaoyan1/fence-agents.git
[email protected]:bixiaoyan1/fence-agents.git
bixiaoyan1
fence-agents
fence-agents
master

搜索帮助