Skip to content

Commit ac3936c

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-16 Grant and Revoke Access
1 parent c3f9ea9 commit ac3936c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,8 @@ public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore
414414
volumeVO.setPoolId(storagePool.getId());
415415
volumeDao.update(volumeVO.getId(), volumeVO);
416416
} else if (dataObject.getType() == DataObjectType.SNAPSHOT) {
417-
s_logger.info("grantAccess: SNAPSHOT type — no-op for ONTAP (LUN clone already exists from takeSnapshot)");
417+
grantAccessForSnapshot((SnapshotInfo) dataObject, host, storagePool);
418418
return true;
419-
//grantAccessForSnapshot((SnapshotInfo) dataObject, host, storagePool);
420419
} else {
421420
s_logger.error("Invalid DataObjectType (" + dataObject.getType() + ") passed to grantAccess");
422421
throw new CloudRuntimeException("Invalid DataObjectType (" + dataObject.getType() + ") passed to grantAccess");
@@ -479,8 +478,7 @@ public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore)
479478
}
480479
revokeAccessForVolume(storagePool, volumeVO, host);
481480
} else if (dataObject.getType() == DataObjectType.SNAPSHOT) {
482-
s_logger.info("revokeAccess: SNAPSHOT type — no-op for ONTAP (LUN clone already exists from takeSnapshot)");
483-
//revokeAccessForSnapshot((SnapshotInfo) dataObject, host, storagePool);
481+
revokeAccessForSnapshot((SnapshotInfo) dataObject, host, storagePool);
484482
} else {
485483
s_logger.error("revokeAccess: Invalid DataObjectType (" + dataObject.getType() + ") passed to revokeAccess");
486484
throw new CloudRuntimeException("Invalid DataObjectType (" + dataObject.getType() + ") passed to revokeAccess");

0 commit comments

Comments
 (0)