Blame SOURCES/bz1422499-fence_rhevm-disable-http-filter.patch

217e50
diff -uNr a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
217e50
--- a/fence/agents/rhevm/fence_rhevm.py	2017-03-21 14:38:42.785643063 +0100
217e50
+++ b/fence/agents/rhevm/fence_rhevm.py	2017-03-21 14:40:24.199654871 +0100
217e50
@@ -85,6 +85,10 @@
217e50
 		api_path = opt["--api-path"]
217e50
 	else:
217e50
 		api_path = "/ovirt-engine/api"
217e50
+	if opt.has_key("--disable-http-filter"):
217e50
+		http_filter = 'false'
217e50
+	else:
217e50
+		http_filter = 'true'
217e50
 
217e50
 	url += "//" + opt["--ip"] + ":" + str(opt["--ipport"]) + api_path + "/" + command
217e50
 
217e50
@@ -97,7 +101,7 @@
217e50
 		"Content-type: application/xml",
217e50
 		"Accept: application/xml",
217e50
 		"Prefer: persistent-auth",
217e50
-		"Filter: true",
217e50
+		"Filter: {}".format(http_filter),
217e50
 	])
217e50
 
217e50
 	if opt.has_key("cookie"):
217e50
@@ -154,6 +158,14 @@
217e50
 		"required" : "0",
217e50
 		"shortdesc" : "The path of the API URL",
217e50
 		"order" : 2}
217e50
+	all_opt["disable_http_filter"] = {
217e50
+		"getopt" : "",
217e50
+		"longopt" : "disable-http-filter",
217e50
+		"help" : "--disable-http-filter          Set HTTP Filter header to false",
217e50
+		"required" : "0",
217e50
+		"shortdesc" : "Set HTTP Filter header to false",
217e50
+		"order" : 3}
217e50
+
217e50
 
217e50
 def main():
217e50
 	device_opt = [
217e50
@@ -166,6 +178,7 @@
217e50
 		"web",
217e50
 		"port",
217e50
 		"use_cookies",
217e50
+		"disable_http_filter",
217e50
 	]
217e50
 
217e50
 	atexit.register(atexit_handler)
217e50
diff -uNr a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml
217e50
--- a/tests/data/metadata/fence_rhevm.xml	2017-03-21 14:38:42.808642839 +0100
217e50
+++ b/tests/data/metadata/fence_rhevm.xml	2017-03-21 14:40:54.832356380 +0100
217e50
@@ -77,6 +77,11 @@
217e50
 		<getopt mixed="--api-path=[path]" />
217e50
 		<shortdesc lang="en">The path of the API URL</shortdesc>
217e50
 	</parameter>
217e50
+	<parameter name="disable_http_filter" unique="0" required="0">
217e50
+		<getopt mixed="--disable-http-filter" />
217e50
+		<content type="boolean"  />
217e50
+		<shortdesc lang="en">Set HTTP Filter header to false</shortdesc>
217e50
+	</parameter>
217e50
 	<parameter name="verbose" unique="0" required="0">
217e50
 		<getopt mixed="-v, --verbose" />
217e50
 		<content type="boolean"  />