예제 #1
0
 @Test
 public void saveStorageQos() {
   StorageQos storageQos = new StorageQos();
   storageQos.setId(Guid.newGuid());
   assertNull(dao.get(storageQos.getId()));
   storageQos.setName("qos_d");
   storageQos.setDescription("bla bla");
   storageQos.setStoragePoolId(FixturesTool.STORAGE_POOL_MIXED_TYPES);
   storageQos.setMaxThroughput(200);
   storageQos.setMaxReadThroughput(200);
   storageQos.setMaxWriteThroughput(200);
   storageQos.setMaxIops(200);
   storageQos.setMaxReadIops(200);
   storageQos.setMaxWriteIops(200);
   dao.save(storageQos);
   StorageQos fetched = dao.get(storageQos.getId());
   assertNotNull(fetched);
   assertEquals(storageQos, fetched);
 }
예제 #2
0
 @Test
 public void getQosByDiskProfileId() {
   StorageQos qos = dao.getQosByDiskProfileId(FixturesTool.DISK_PROFILE_1);
   assertNotNull(qos);
   assertEquals(FixturesTool.QOS_ID_1, qos.getId());
 }