fence-agents: master - fencing: Add alias 'meta-data' as proposed in OCF standard

Marek GrĂ¡c marx at fedoraproject.org
Mon Mar 2 14:54:10 UTC 2015


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=3b9d7b78a35df9ed33594e82298754a59969b64e
Commit:        3b9d7b78a35df9ed33594e82298754a59969b64e
Parent:        037e51720022bf3ad23c9d1710945ce15515bbb8
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Mon Mar 2 15:54:57 2015 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Mon Mar 2 15:54:57 2015 +0100

fencing: Add alias 'meta-data' as proposed in OCF standard

Actions 'meta-data' is just an alias to 'metadata'.
---
 fence/agents/lib/fencing.py.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 82a7334..c2b9ba6 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -630,6 +630,10 @@ def check_input(device_opt, opt, other_conditions = False):
 
 	## In special cases (show help, metadata or version) we don't need to check anything
 	#####
+	# OCF compatibility
+	if options["--action"] == "meta-data":
+		options["--action"] = "metadata"
+
 	if options["--action"] == "metadata" or any(options.has_key(k) for k in ("--help", "--version")):
 		return options
 
@@ -652,6 +656,7 @@ def check_input(device_opt, opt, other_conditions = False):
 	if 1 == device_opt.count("no_status"):
 		acceptable_actions.remove("status")
 
+
 	if 0 == acceptable_actions.count(options["--action"]):
 		fail_usage("Failed: Unrecognised action '" + options["--action"] + "'")
 


More information about the cluster-commits mailing list