Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commit... Commit: 22ba49657526c0aacaadb5fdb6a53a8b88130531 Parent: 1a961801928dd0f79991e5bf0e81483aeaf7351a Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Mon Aug 22 10:02:25 2011 +0200 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Mon Aug 22 10:02:25 2011 +0200
fence_rhevm: change "UP" status to "up" state as the REST-API has changed
Resolves: rhbz#731166 --- fence/agents/rhevm/fence_rhevm.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py index c3ef29a..e233968 100644 --- a/fence/agents/rhevm/fence_rhevm.py +++ b/fence/agents/rhevm/fence_rhevm.py @@ -13,7 +13,7 @@ BUILD_DATE="March, 2008"
re_get_id = re.compile("<vm id="(.*?)"", re.IGNORECASE); -re_status = re.compile("<status>(.*?)</status>", re.IGNORECASE); +re_status = re.compile("<state>(.*?)</state>", re.IGNORECASE); re_get_name = re.compile("<name>(.*?)</name>", re.IGNORECASE);
def get_power_status(conn, options): @@ -41,7 +41,7 @@ def get_power_status(conn, options): else: status = result.group(1)
- if (status == "UP"): + if (status == "up"): return "on" else: return "off"