Piotr Kliczewski has uploaded a new change for review.

Change subject: core: Marshalling regression on fenceNode
......................................................................

core: Marshalling regression on fenceNode

Change-Id: If9a1bc5a818a122a75f8f02385cfcfc26b003400
Signed-off-by: pkliczewski <[email protected]>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
1 file changed, 7 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/55/32855/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
index bf603f0..2507e7f 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
@@ -467,7 +467,7 @@
             String secured,
             String options,
             Map<String, Object> fencingPolicy) {
-         RequestBuilder rb =
+        JsonRpcRequest request =
                 new RequestBuilder("Host.fenceNode").withParameter("addr", ip)
                         .withParameter("port", port)
                         .withParameter("agent", type)
@@ -475,14 +475,13 @@
                         .withParameter("password", password)
                         .withParameter("action", action)
                         .withOptionalParameter("secure", secured)
-                        .withOptionalParameter("options", options);
+                        .withOptionalParameter("options", options)
+                        .withOptionalParameterAsMap("fencingPolicy", 
fencingPolicy)
+                        .build();
+        Map<String, Object> response =
+                new FutureMap(this.client, 
request).withResponseKey("power").withResponseType(String.class);
 
-        if (fencingPolicy != null) {
-            // if fencing policy is null, fence proxy does not support fencing 
policy parameter
-            rb.withParameter("fencingPolicy", fencingPolicy);
-        }
-
-        return new FenceStatusReturnForXmlRpc(new FutureMap(this.client, 
rb.build()));
+        return new FenceStatusReturnForXmlRpc(response);
     }
 
     @Override


-- 
To view, visit http://gerrit.ovirt.org/32855
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9a1bc5a818a122a75f8f02385cfcfc26b003400
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to