Juan Hernandez has uploaded a new change for review.

Change subject: restapi: Option to override firewall during install
......................................................................

restapi: Option to override firewall during install

Currently the RESTAPI allows specifying if the firewall is to be
overriden when adding a host, but not when reinstalling it. This patch
adds support for specifying that also when reinstalling:

  POST /hosts/{host:id}/install
  <action>
    <host>
      <override_iptables>true|false</override_iptables>
    </host>
  </action>

Change-Id: I44dfd59518648821e0806c5dc456baa826da3703
Bug-Url: https://bugzilla.redhat.com/1179613
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
(cherry picked from commit 9dfc865f4d306f78f7c30026ebf15b5a93eaed0f)
---
M 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
2 files changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/36886/1

diff --git 
a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
 
b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
index ba11c6f..496dbc1 100644
--- 
a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
+++ 
b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
@@ -2884,12 +2884,23 @@
       parameterType: Action
       signatures:
       - mandatoryArguments: {}
-        optionalArguments: {action.root_password: 'xs:string', action.image: 
'xs:string'}
+        optionalArguments:
+          action.root_password: xs:string
+          action.image: xs:string
+          action.host.override_iptables: xs:boolean
         deprecated: true
         description: install vdsm and other packages required to get the host 
ready to be used in the engine providing the root password. This has been 
deprecated
       - mandatoryArguments: {}
-        optionalArguments: {action.ssh.port: 'xs:int', action.ssh.fingerprint: 
'xs:string', action.ssh.authentication_method: 'xs:string',
-          action.ssh.user.user_name: 'xs:string', action.ssh.user.password: 
'xs:string', action.image: 'xs:string', action.async: 'xs:boolean', 
action.grace_period.expiry: 'xs:long'}
+        optionalArguments:
+          action.ssh.port: xs:int
+          action.ssh.fingerprint: xs:string
+          action.ssh.authentication_method: xs:string
+          action.ssh.user.user_name: xs:string
+          action.ssh.user.password: xs:string
+          action.image: xs:string
+          action.async: xs:boolean
+          action.grace_period.expiry: xs:long
+          action.host.override_iptables: xs:boolean
         description: install vdsm and other packages required to get the host 
ready to be used in the engine providing thre ssh password
     urlparams: {}
     headers:
diff --git 
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
 
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
index 5f118e5..68a5dde 100644
--- 
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
+++ 
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
@@ -711,6 +711,11 @@
                 
params.setAuthMethod(map(AuthenticationMethod.fromValue(action.getSsh().getAuthenticationMethod()),
 null));
             }
         }
+        if (action.isSetHost()) {
+            if (action.getHost().isSetOverrideIptables()) {
+                
params.setOverrideFirewall(action.getHost().isOverrideIptables());
+            }
+        }
         return params;
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44dfd59518648821e0806c5dc456baa826da3703
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to