Michael Pasternak has posted comments on this change. Change subject: API: Do not require root password for host add ......................................................................
Patch Set 1: (1 comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostsResource.java Line 86: Line 87: @Override Line 88: public Response add(Host host) { Line 89: validateEnums(Host.class, host); Line 90: validateParameters(host, "name", "address"); this is the engine code; if (Config.<Boolean> GetValue(ConfigValues.UseSecureConnectionWithServers) && !EngineEncryptionUtils.haveKey()) { returnValue = failCanDoAction(VdcBllMessages.VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND); } else if (!getParameters().getAddPending() && (getParameters().getAuthMethod() == AuthenticationMethod.Password) && StringUtils.isEmpty(getParameters().getPassword())) { // We block vds installations if it's not a RHEV-H and password is empty // Note that this may override local host SSH policy. See BZ#688718. returnValue = failCanDoAction(VdcBllMessages.VDS_CANNOT_INSTALL_EMPTY_PASSWORD); } else if (!isPowerManagementLegal()) { returnValue = false; } else { returnValue = returnValue && canConnect(vds); } public VdsOperationActionParameters(VdsStatic vdsStaticVal, String passwordVal) { super(vdsStaticVal.getId()); if ("".equals(vdsStaticVal.getManagementIp())) { vdsStaticVal.setManagementIp(null); } vdsStatic = vdsStaticVal; password = passwordVal; authMethod = AuthenticationMethod.Password; } public VdsOperationActionParameters(VdsStatic vdsStatic) { this(vdsStatic, null); authMethod = AuthenticationMethod.Password; } public VdsOperationActionParameters() { authMethod = AuthenticationMethod.Password; } you can remove the rootPassword validation indeed, but please remove it from the rsdl_metadata.yaml as well Line 91: VdsStatic staticHost = getMapper(Host.class, VdsStatic.class).map(host, null); Line 92: staticHost.setVdsGroupId(getClusterId(host)); Line 93: AddVdsActionParameters addParams = new AddVdsActionParameters(staticHost, host.getRootPassword()); Line 94: if (host.isSetOverrideIptables()) { -- To view, visit http://gerrit.ovirt.org/18002 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I506b844df10acfc17dcbce271755d37fdcdf0c7e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches