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