use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class NetworkImplementationDetailsUtils method getCluster.
private Cluster getCluster(Guid vdsId) {
VdsStatic vdsStatic = vdsStaticDao.get(vdsId);
Guid clusterId = vdsStatic.getClusterId();
return clusterDao.get(clusterId);
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class HostUpgradeCallback method getHostName.
private String getHostName(Guid hostId) {
if (hostName == null) {
VdsStatic host = DbFacade.getInstance().getVdsStaticDao().get(hostId);
hostName = host == null ? null : host.getName();
}
return hostName;
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class RegisterVdsQuery method registerNewHost.
private boolean registerNewHost(Guid clusterId, boolean pending) {
boolean returnValue = true;
VdsStatic vds = new VdsStatic(getParameters().getVdsHostName(), getStrippedVdsUniqueId(), getParameters().getVdsPort(), getParameters().getSSHPort(), getParameters().getSSHUser(), clusterId, Guid.Empty, getParameters().getVdsName(), Config.<Boolean>getValue(ConfigValues.SSLEnabled), VDSType.VDS, null);
vds.setSshKeyFingerprint(getParameters().getSSHFingerprint());
log.debug("RegisterVdsQuery::register - Will try now to add VDS from scratch; Name: '{}', Hostname: '{}', Unique: '{}', VdsPort: '{}',Subnet mask: '{}', isPending: '{}' with force synchronize", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId(), getParameters().getVdsPort(), pending);
AddVdsActionParameters p = new AddVdsActionParameters(vds, "");
p.setPending(pending);
ActionReturnValue ret = Backend.getInstance().runInternalAction(ActionType.AddVds, p);
if (!ret.getSucceeded()) {
log.error("RegisterVdsQuery::register - Registration failed for VDS - Name: '{}', Hostname: '{}', UniqueID: '{}', Subnet mask: '{}'", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId());
captureCommandErrorsToLogger(ret, "RegisterVdsQuery::register");
error = AuditLogType.VDS_REGISTER_FAILED;
returnValue = false;
} else {
log.info("RegisterVdsQuery::register - Registered a new VDS '{}' - Name: '{}', Hostname: '{}', UniqueID: '{}'", pending ? "pending approval" : "automatically approved", getParameters().getVdsName(), getParameters().getVdsHostName(), getStrippedVdsUniqueId());
}
return returnValue;
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class GetGlusterServersForImportQueryTest method getVdsStatic.
private VdsStatic getVdsStatic() {
VdsStatic vds = new VdsStatic();
vds.setId(Guid.newGuid());
vds.setHostName(NEW_SERVER);
return vds;
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class ReplaceGlusterVolumeBrickCommandTest method getVdsStatic.
private VdsStatic getVdsStatic() {
VdsStatic vds = new VdsStatic();
vds.setClusterId(clusterId);
vds.setHostName(serverName);
return vds;
}
Aggregations