mooli tayer has posted comments on this change.

Change subject: core: Foreman discovery host integration to ovirt
......................................................................


Patch Set 8:

(7 comments)

http://gerrit.ovirt.org/#/c/27621/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java:

Line 127:                     getParameters().getPassword()
Line 128:             );
Line 129: 
Line 130:             AuditLogableBase logable = new AuditLogableBase();
Line 131:             logable.addCustomValue("VdsName", 
getParameters().getvds().getName());
logable.setVdsName() ?
Line 132:             logable.addCustomValue("HostGroupName", 
getParameters().getHostGroup().getName());
Line 133:             AuditLogDirector.log(logable, AuditLogType.VDS_PROVISION);
Line 134:         }
Line 135: 


Line 163:                 getCompensationContext().resetCompensation();
Line 164:                 return null;
Line 165:             }
Line 166:         });
Line 167:         // do not install vds's which added in pending mode 
(currently power
update comment:
 do not install vds's which added in pending or provisioned ...
Line 168:         // clients). they are installed as part of the approve process
Line 169:         if (Config.<Boolean> getValue(ConfigValues.InstallVds) &&
Line 170:             !getParameters().getAddPending() &&
Line 171:             !getParameters().getAddProvisioned()) {


http://gerrit.ovirt.org/#/c/27621/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java:

Line 86:                 // check if a name is updated to an existing vds name
Line 87:                 else if 
(!StringUtils.equalsIgnoreCase(_oldVds.getName(), 
getParameters().getVdsStaticData()
Line 88:                         .getName())
Line 89:                         && getVdsDAO().getByName(vdsName) != null
Line 90:                         && getVdsDAO().getByName(vdsName).getStatus() 
!= VDSStatus.InstallingOS)  {
1.) probably wrong to go to the db twice
 2.) not sure I understand the logic: you allow to change
 to a name of an existing host if it is InstallingOS?
Line 91:                     
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED);
Line 92:                 } else if 
(!StringUtils.equalsIgnoreCase(_oldVds.getHostName(), 
getParameters().getVdsStaticData()
Line 93:                         .getHostName())
Line 94:                         && 
getVdsDAO().getAllForHostname(hostName).size() != 0


http://gerrit.ovirt.org/#/c/27621/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostGroup.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostGroup.java:

Line 7:     private static final long serialVersionUID = -3099054972843803212L;
Line 8: 
Line 9:     private String name;
Line 10:     private int id;
Line 11:     private int subnet_id;
use java naming convention?
subnetId;operatingSystemId...
Line 12:     private int operatingsystem_id;
Line 13:     private int domain_id;
Line 14:     private int environment_id;
Line 15:     private int ptable_id;


http://gerrit.ovirt.org/#/c/27621/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java:

Line 354:             if (hostProvider.getUsername() != null && 
hostProvider.getPassword() != null) {
Line 355:                 Credentials hostProviderCredentials = new 
UsernamePasswordCredentials(hostProvider.getUsername(), 
hostProvider.getPassword());
Line 356:                 httpClient.getState().setCredentials(AuthScope.ANY, 
hostProviderCredentials);
Line 357:                 // Required when working with foreman's /api rather 
than accessing directly to /hosts
Line 358:                 
httpClient.getState().setAuthenticationPreemptive(true);
Deprecated. please use httpClient.getParams().setAuthenticationPreemptive(true);
Line 359:             }
Line 360:         } catch (RuntimeException e) {
Line 361:             handleException(e);
Line 362:         }


http://gerrit.ovirt.org/#/c/27621/8/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java:

Line 62:     public boolean isGlusterPeerProbeNeeded() {
Line 63:         return this.glusterPeerProbeNeeded;
Line 64:     }
Line 65: 
Line 66:     public boolean getAddPending() {
In this file boolean getters are names isX and getX.
better to select one
Line 67:         return privateAddPending;
Line 68:     }
Line 69: 
Line 70:     public void setAddPending(boolean value) {


http://gerrit.ovirt.org/#/c/27621/8/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties:

Line 234: VDS_RECOVER=Host ${VdsName} is rebooting.
Line 235: VDS_RECOVER_FAILED=Host ${VdsName} failed to recover.
Line 236: VDS_RECOVER_FAILED_VMS_UNKNOWN=Host ${VdsName} cannot be reached, VMs 
state on this host are marked as Unknown.
Line 237: VDS_NO_SELINUX_ENFORCEMENT=Host ${VdsName} does not enforce SELinux.
Line 238: VDS_PROVISION=Installing OS on Host ${VdsName} using Hostgroup 
${HostGroupName}.
You set VdsName as a custom value. 
 I'm not sure if you are getting here what you set or ALB.getVdsName()
Line 239: VM_DOWN=VM ${VmName} is down. ${ExitMessage}
Line 240: USER_SUSPEND_VM_OK=VM ${VmName} on Host ${VdsName} is suspended.
Line 241: VM_FAILURE=VM ${VmName} cannot be found on Host ${VdsName}.
Line 242: VM_MIGRATION_ABORT=Migration failed: ${MigrationError} (VM: 
${VmName}, Source: ${VdsName}, Destination: ${DestinationVdsName}).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c25a544373d8ab4a7123137c8a4697205a8efa8
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: mooli tayer <mta...@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

Reply via email to