use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class ForceSelectSPMCommandTest method createVDSandStoragePool.
private void createVDSandStoragePool() {
vds = new VDS();
vds.setId(vdsId);
vds.setVdsName("TestVDS");
vds.setStoragePoolId(storagePoolId);
vds.setStatus(VDSStatus.Up);
vds.setClusterSupportsVirtService(true);
vds.setSpmStatus(VdsSpmStatus.None);
vds.setVdsSpmPriority(10);
storagePool = new StoragePool();
storagePool.setId(storagePoolId);
storagePool.setStatus(StoragePoolStatus.Up);
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class StorageServerConnectionExtensionValidatorTest method setup.
@Before
public void setup() {
Guid hostId = Guid.newGuid();
doReturn(dbFacade).when(validator).getDbFacade();
doReturn(storageServerConnectionExtensionDao).when(dbFacade).getStorageServerConnectionExtensionDao();
doReturn(vdsDao).when(dbFacade).getVdsDao();
doReturn(new VDS()).when(vdsDao).get(hostId);
conn = new StorageServerConnectionExtension();
conn.setHostId(hostId);
conn.setIqn("iqn1");
conn.setUserName("user1");
conn.setPassword("password1");
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class BackendAffinityLabelHostResource method remove.
public Response remove() {
// First we need to check if the label contains the host:
Label label = BackendAffinityLabelHelper.getLabel(this, labelId);
if (!label.getHosts().contains(guid)) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
// Remove the host from the label:
VDS entity = new VDS();
entity.setId(guid);
Label updatedLabel = new LabelBuilder(label).removeEntity(entity).build();
return performAction(ActionType.UpdateLabel, new LabelActionParameters(updatedLabel));
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class BackendHostNicResourceTest method setGetVdsQueryExpectations.
protected void setGetVdsQueryExpectations(int times) throws Exception {
while (times-- > 0) {
VDS vds = new VDS();
vds.setClusterId(GUIDS[0]);
setUpEntityQueryExpectations(QueryType.GetVdsByVdsId, IdQueryParameters.class, new String[] { "Id" }, new Object[] { PARENT_GUID }, vds);
}
}
use of org.ovirt.engine.core.common.businessentities.VDS in project ovirt-engine by oVirt.
the class BackendHostNicsResourceTest method setGetVdsQueryExpectations.
protected void setGetVdsQueryExpectations(int times) throws Exception {
while (times-- > 0) {
VDS vds = new VDS();
vds.setClusterId(GUIDS[0]);
setUpEntityQueryExpectations(QueryType.GetVdsByVdsId, IdQueryParameters.class, new String[] { "Id" }, new Object[] { PARENT_GUID }, vds);
}
}
Aggregations