CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when

a primary store is deleted related to it
This commit is contained in:
Anshul Gangwar 2016-08-30 12:01:20 +05:30
parent 6dced70aa8
commit 2fd28f2bff
1 changed files with 3 additions and 0 deletions

View File

@ -527,6 +527,9 @@ public class ApiResponseHelper implements ResponseGenerator {
long storagePoolId = snapshotStore.getDataStoreId();
DataStore dataStore = dataStoreMgr.getDataStore(storagePoolId, DataStoreRole.Primary);
if (dataStore == null) {
return DataStoreRole.Image;
}
Map<String, String> mapCapabilities = dataStore.getDriver().getCapabilities();