nitin-maharana commented on a change in pull request #2612: [migrateVolume API 
method] Filter disk offerings based on target storage pool selected
URL: https://github.com/apache/cloudstack/pull/2612#discussion_r184963277
 
 

 ##########
 File path: ui/scripts/sharedFunctions.js
 ##########
 @@ -2851,3 +2851,34 @@ cloudStack.createArrayOfParametersForCreatePodCommand = 
function (zoneId, data){
     cloudStack.addParameterToCommandUrlParameterArrayIfValueIsNotEmpty(array, 
"endIp", data.podEndIp);
     return array;
 }
+
+cloudStack.listDiskOfferings = function(options){
+    var defaultOptions = {
+            listAll: false,
+            isRecursive: false,
+            error: function(data) {
+                args.response.error(data);
+            }
+    };
+    var mergedOptions = $.extend({}, defaultOptions, options);
+    
+    var listDiskOfferingsUrl = "listDiskOfferings";
+    if(mergedOptions.listAll){
+        listDiskOfferingsUrl = listDiskOfferingsUrl + "&listall=true";
+    }
+    if(mergedOptions.isRecursive){
+        listDiskOfferingsUrl = listDiskOfferingsUrl + "&isrecursive=true";
+    }
+    var diskOfferings = undefined;
+    $.ajax({
+        url: createURL(listDiskOfferingsUrl),
+        data: mergedOptions.data,
 
 Review comment:
   @rafaelweingartner, Got it. Thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to