@@ -116,26 +116,27 @@ CloudStackVolume getCloudStackVolume(CloudStackVolume cloudstackVolume) {
116116 @ Override
117117 public AccessGroup createAccessGroup (AccessGroup accessGroup ) {
118118
119- Map <String , String > details = accessGroup .getPrimaryDataStoreInfo ().getDetails ();
120- String svmName = details .get (Constants .SVM_NAME );
121- String volumeUUID = details .get (Constants .VOLUME_UUID );
122- String volumeName = details .get (Constants .VOLUME_NAME );
123-
124- // Create the export policy
125- ExportPolicy policyRequest = createExportPolicyRequest (accessGroup ,svmName ,volumeName );
126- try {
127- createExportPolicy (svmName , policyRequest );
128- s_logger .info ("ExportPolicy created: {}, now attaching this policy to storage pool volume" , policyRequest .getName ());
129-
130- // attach export policy to volume of storage pool
131- assignExportPolicyToVolume (volumeUUID ,policyRequest .getName ());
132- s_logger .info ("Successfully assigned exportPolicy {} to volume {}" , policyRequest .getName (), volumeName );
133- accessGroup .setPolicy (policyRequest );
134- return accessGroup ;
135- }catch (Exception e ){
136- s_logger .error ("Exception occurred while creating access group: " + e );
137- throw new CloudRuntimeException ("Failed to create access group: " + e );
138- }
119+ // Map<String, String> details = accessGroup.getPrimaryDataStoreInfo().getDetails();
120+ // String svmName = details.get(Constants.SVM_NAME);
121+ // String volumeUUID = details.get(Constants.VOLUME_UUID);
122+ // String volumeName = details.get(Constants.VOLUME_NAME);
123+ //
124+ // // Create the export policy
125+ // ExportPolicy policyRequest = createExportPolicyRequest(accessGroup,svmName,volumeName);
126+ // try {
127+ // createExportPolicy(svmName, policyRequest);
128+ // s_logger.info("ExportPolicy created: {}, now attaching this policy to storage pool volume", policyRequest.getName());
129+ //
130+ // // attach export policy to volume of storage pool
131+ // assignExportPolicyToVolume(volumeUUID,policyRequest.getName());
132+ // s_logger.info("Successfully assigned exportPolicy {} to volume {}", policyRequest.getName(), volumeName);
133+ // accessGroup.setPolicy(policyRequest);
134+ // return accessGroup;
135+ // }catch(Exception e){
136+ // s_logger.error("Exception occurred while creating access group: " + e);
137+ // throw new CloudRuntimeException("Failed to create access group: " + e);
138+ // }
139+ return null ;
139140 }
140141
141142 @ Override
@@ -379,7 +380,7 @@ private ExportPolicy createExportPolicyRequest(AccessGroup accessGroup,String sv
379380 String ip = (hostStorageIp != null && !hostStorageIp .isEmpty ())
380381 ? hostStorageIp
381382 : host .getPrivateIpAddress ();
382- String ipToUse = ip + "/32 " ;
383+ String ipToUse = ip + "/31 " ;
383384 ExportRule .ExportClient exportClient = new ExportRule .ExportClient ();
384385 exportClient .setMatch (ipToUse );
385386 exportClients .add (exportClient );
0 commit comments