Yaniv Bronhaim has posted comments on this change.

Change subject: api: Fix approve API to allow deploy with public key
......................................................................


Patch Set 3: Code-Review-1

this requires much more. currently this code forces pk (following the ui who 
allows only that). but the api gets "Action" object which allows approve also 
by password if exists. so if we want to support it i need to add much more 
verification in that part, such as:

 +        if (action.isSetSsh() && action.getSsh().isSetAuthenticationMethod()) 
{
 +            if (action.getSsh().getAuthenticationMethod() ==
 +                    
VdsOperationActionParameters.AuthenticationMethod.Password.toString()) {
 +                
params.setAuthMethod(VdsOperationActionParameters.AuthenticationMethod.Password);
 +                if (!action.getSsh().isSetUser()) {
 +                    // throw exception
 +                }
 +            } else {
 +                
params.setAuthMethod(VdsOperationActionParameters.AuthenticationMethod.PublicKey);
 +            }
 +        } else {
 +            
params.setAuthMethod(VdsOperationActionParameters.AuthenticationMethod.PublicKey);
 +        }

and so on.. will get to it later

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9816d907d45ec7b4ee066fa369ca1150e688084f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to