cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [19/31] git commit: updated refs/heads/distributedrouter to a8d43ba
Date Thu, 13 Mar 2014 13:53:10 GMT
findbugs: impossible cast in CreateServiceOfferingCmd file.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bc4c8052
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bc4c8052
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bc4c8052

Branch: refs/heads/distributedrouter
Commit: bc4c8052fdd5bd962d107a9796f422867c8cfeb3
Parents: 3ee1fc2
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Thu Mar 13 15:02:08 2014 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Thu Mar 13 15:04:18 2014 +0530

----------------------------------------------------------------------
 .../command/admin/offering/CreateServiceOfferingCmd.java    | 8 +++-----
 ui/scripts/configuration.js                                 | 9 ++++++---
 2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc4c8052/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
index 42bd95d..78101fb 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
@@ -21,17 +21,15 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
-
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
 import org.apache.cloudstack.api.BaseCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
 import org.apache.cloudstack.api.response.DomainResponse;
 import org.apache.cloudstack.api.response.ServiceOfferingResponse;
+import org.apache.log4j.Logger;
 
 import com.cloud.offering.ServiceOffering;
 import com.cloud.user.Account;
@@ -106,7 +104,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
     private String deploymentPlanner;
 
     @Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description
= "details for planner, used to store specific parameters")
-    private Map<String, String> details;
+    private Map details;
 
     @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, required = false,
description = "bytes read rate of the disk offering")
     private Long bytesReadRate;
@@ -215,7 +213,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
             Iterator<?> iter = props.iterator();
             while (iter.hasNext()) {
                 HashMap<String, String> detail = (HashMap<String, String>) iter.next();
-                detailsMap.putAll(detail);
+                detailsMap.put(detail.get("key"), detail.get("value"));
             }
         }
         return detailsMap;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc4c8052/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 8666042..7b2f4e9 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -490,15 +490,18 @@
 
                                 var array1 = [];
                                 if (args.data.deploymentPlanner == "ImplicitDedicationPlanner"
&& args.data.plannerMode != "") {
-                                    array1.push("&serviceofferingdetails[0].ImplicitDedicationMode"
+ "=" + args.data.plannerMode);
+                                    array1.push("&serviceofferingdetails[0].key" + "="
+ "ImplicitDedicationMode");
+                                    array1.push("&serviceofferingdetails[0].value" +
"=" + args.data.plannerMode);
                                 }
 
                                 if (args.data.pciDevice != "") {
-                                    array1.push("&serviceofferingdetails[1].pciDevice"
+ "=" + args.data.pciDevice);
+                                    array1.push("&serviceofferingdetails[1].key" + "="
+ "pciDevice");
+                                    array1.push("&serviceofferingdetails[1].value" +
"=" + args.data.pciDevice);
                                 }
 
                                 if (args.data.pciDevice == "VGPU") {
-                                    array1.push("&serviceofferingdetails[2].vgpuType"
+ "=" + args.data.vgpuType);
+                                    array1.push("&serviceofferingdetails[2].key" + "="
+ "vgpuType");
+                                    array1.push("&serviceofferingdetails[2].value" +
"=" + args.data.vgpuType);
                                 }
 
                                 if (args.data.networkRate != null && args.data.networkRate.length
> 0) {


Mime
View raw message