use of com.emc.storageos.model.storagedriver.StorageDriverList in project coprhd-controller by CoprHD.
the class StorageDriverServiceTest method testGetStorageDrivers.
@Test
public void testGetStorageDrivers() {
StorageDriverList driverList = service.getStorageDrivers();
assertEquals(driverList.getDrivers().size(), 2);
for (StorageDriverRestRep driver : driverList.getDrivers()) {
if ("driver1".equals(driver.getDriverName())) {
assertEquals(driver.getSupportedTypes().size(), 2);
assertTrue(driver.getSupportedTypes().contains("systemtype1"));
assertTrue(driver.getSupportedTypes().contains("providertype1"));
assertEquals(driver.getDriverStatus(), "IN_USE");
}
if ("driver2".equals(driver.getDriverName())) {
assertEquals(driver.getSupportedTypes().size(), 1);
assertTrue(driver.getSupportedTypes().contains("systemtype2"));
assertEquals(driver.getDriverStatus(), "READY");
}
}
}
use of com.emc.storageos.model.storagedriver.StorageDriverList in project coprhd-controller by CoprHD.
the class StorageDriverService method getStorageDrivers.
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.RESTRICTED_SYSTEM_ADMIN })
public StorageDriverList getStorageDrivers() {
StorageDriverList driverList = new StorageDriverList();
driverList.setDrivers(queryStorageDriver(null));
return driverList;
}
Aggregations