use of org.ovirt.engine.core.common.businessentities.gluster.GlusterService in project ovirt-engine by oVirt.
the class ManageGlusterServiceCommand method getServiceList.
private List<String> getServiceList() {
List<GlusterService> serviceList = glusterServiceDao.getByServiceType(getParameters().getServiceType());
List<String> serviceListStr = new ArrayList<>();
for (GlusterService srvc : serviceList) {
serviceListStr.add(srvc.getServiceName());
}
return serviceListStr;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterService in project ovirt-engine by oVirt.
the class ManageGlusterServiceCommandTest method getGlusterServiceListByServiceType.
private List<GlusterService> getGlusterServiceListByServiceType(ServiceType serviceType, GlusterServiceStatus status) {
List<GlusterService> serviceList = new ArrayList<>();
GlusterService srvc1 = new GlusterService();
srvc1.setId((status == GlusterServiceStatus.RUNNING) ? startedServiceId1 : stoppedServiceId1);
srvc1.setServiceName("srvc1");
srvc1.setServiceType(serviceType);
serviceList.add(srvc1);
GlusterService srvc2 = new GlusterService();
srvc2.setId((status == GlusterServiceStatus.RUNNING) ? startedServiceId2 : stoppedServiceId2);
srvc2.setServiceName("srvc2");
srvc2.setServiceType(serviceType);
serviceList.add(srvc2);
return serviceList;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterService in project ovirt-engine by oVirt.
the class GlusterServiceDaoTest method testGetByServiceTypeAndName.
@Test
public void testGetByServiceTypeAndName() {
GlusterService service = dao.getByServiceTypeAndName(ServiceType.GLUSTER, GLUSTER_SERVICE);
assertNotNull(service);
assertEquals(GLUSTER_SERVICE_ID, service.getId());
}
Aggregations