winterhazel commented on code in PR #13053:
URL: https://github.com/apache/cloudstack/pull/13053#discussion_r3188125943


##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##########
@@ -306,21 +308,24 @@ public boolean attachCluster(DataStore dataStore, 
ClusterScope scope) {
             logger.error(errMsg);
             throw new CloudRuntimeException(errMsg);
         }
-
         logger.debug("attachCluster: Attaching the pool to each of the host in 
the cluster: {}", primaryStore.getClusterId());
-        if (hostsIdentifier != null && hostsIdentifier.size() > 0) {
-            try {
-                AccessGroup accessGroupRequest = new AccessGroup();
-                accessGroupRequest.setHostsToConnect(hostsToConnect);
-                accessGroupRequest.setScope(scope);
-                primaryStore.setDetails(details);
-                accessGroupRequest.setPrimaryDataStoreInfo(primaryStore);
-                strategy.createAccessGroup(accessGroupRequest);
-            } catch (Exception e) {
-                logger.error("attachCluster: Failed to create access group on 
storage system for cluster: " + primaryStore.getClusterId() + ". Exception: " + 
e.getMessage());
-                throw new CloudRuntimeException("attachCluster: Failed to 
create access group on storage system for cluster: " + 
primaryStore.getClusterId() + ". Exception: " + e.getMessage());
+        // We need to create export policy at pool level and igroup at host 
level(in grantAccess)
+        if 
(ProtocolType.NFS3.name().equalsIgnoreCase(details.get(OntapStorageConstants.PROTOCOL)))
 {

Review Comment:
   We can use `ApiConstants.PROTOCOL` instead of 
`OntapStorageConstants.PROTOCOL`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to