use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class UpdateVdsCommand method shouldVdsBeReinstalled.
private boolean shouldVdsBeReinstalled() {
VdsStatic vdsStatic = getParameters().getVdsStaticData();
VdsStatic oldVdsStatic = oldHost.getStaticData();
return vdsStatic.isReinstallRequired() || !Objects.equals(vdsStatic.isPmKdumpDetection(), oldVdsStatic.isPmKdumpDetection()) || !Objects.equals(vdsStatic.getCurrentKernelCmdline(), oldVdsStatic.getCurrentKernelCmdline());
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class VdsHandlerTest method testUpdateNonEditableFieldOnDownHost.
@Test
public void testUpdateNonEditableFieldOnDownHost() {
// Given
VdsStatic src = new VdsStatic();
src.setServerSslEnabled(true);
VdsStatic dest = new VdsStatic();
dest.setServerSslEnabled(false);
// When
boolean updateIsValid = vdsHandler.isUpdateValid(src, dest, VDSStatus.Down);
// Then
assertFalse("Update should not be valid for different server SSL enabled states", updateIsValid);
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class VdsHandlerTest method testValidUpdateOfEditableFieldOnDownHost.
@Test
public void testValidUpdateOfEditableFieldOnDownHost() {
// Given
VdsStatic src = new VdsStatic();
src.setName(RandomUtils.instance().nextString(10));
VdsStatic dest = new VdsStatic();
dest.setName(RandomUtils.instance().nextString(10));
// When
boolean updateIsValid = vdsHandler.isUpdateValid(src, dest, VDSStatus.Down);
// Then
assertTrue("Update should be valid for different names in down status", updateIsValid);
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class VdsHandlerTest method testInvalidUpdateOfStatusRestrictedEditableFieldOnRunningHost.
@Test
public void testInvalidUpdateOfStatusRestrictedEditableFieldOnRunningHost() {
// Given
VdsStatic src = new VdsStatic();
src.setClusterId(Guid.newGuid());
VdsStatic dest = new VdsStatic();
dest.setClusterId(Guid.newGuid());
// When
boolean updateIsValid = vdsHandler.isUpdateValid(src, dest, VDSStatus.Up);
// Then
assertFalse("Update should not be valid for different cluster IDs on a running host", updateIsValid);
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class VdsHandlerTest method testValidUpdateOfEditableFieldOnRunningHost.
@Test
public void testValidUpdateOfEditableFieldOnRunningHost() {
// Given
VdsStatic src = new VdsStatic();
src.setName(RandomUtils.instance().nextString(10));
VdsStatic dest = new VdsStatic();
dest.setName(RandomUtils.instance().nextString(10));
// When
boolean updateIsValid = vdsHandler.isUpdateValid(src, dest, VDSStatus.Up);
// Then
assertTrue("Update should be valid for different names", updateIsValid);
}
Aggregations