|
21 | 21 | import java.util.Iterator; |
22 | 22 | import java.util.Map; |
23 | 23 |
|
24 | | -import org.apache.log4j.Logger; |
25 | | - |
26 | 24 | import org.apache.cloudstack.api.APICommand; |
27 | 25 | import org.apache.cloudstack.api.ApiConstants; |
28 | 26 | import org.apache.cloudstack.api.ApiErrorCode; |
29 | 27 | import org.apache.cloudstack.api.BaseCmd; |
30 | 28 | import org.apache.cloudstack.api.Parameter; |
31 | 29 | import org.apache.cloudstack.api.ServerApiException; |
32 | | -import org.apache.cloudstack.api.BaseCmd.CommandType; |
33 | 30 | import org.apache.cloudstack.api.response.DomainResponse; |
34 | 31 | import org.apache.cloudstack.api.response.ServiceOfferingResponse; |
| 32 | +import org.apache.log4j.Logger; |
35 | 33 |
|
36 | 34 | import com.cloud.offering.ServiceOffering; |
37 | 35 | import com.cloud.user.Account; |
@@ -106,7 +104,7 @@ public class CreateServiceOfferingCmd extends BaseCmd { |
106 | 104 | private String deploymentPlanner; |
107 | 105 |
|
108 | 106 | @Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "details for planner, used to store specific parameters") |
109 | | - private Map<String, String> details; |
| 107 | + private Map details; |
110 | 108 |
|
111 | 109 | @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, required = false, description = "bytes read rate of the disk offering") |
112 | 110 | private Long bytesReadRate; |
@@ -215,7 +213,7 @@ public Map<String, String> getDetails() { |
215 | 213 | Iterator<?> iter = props.iterator(); |
216 | 214 | while (iter.hasNext()) { |
217 | 215 | HashMap<String, String> detail = (HashMap<String, String>) iter.next(); |
218 | | - detailsMap.putAll(detail); |
| 216 | + detailsMap.put(detail.get("key"), detail.get("value")); |
219 | 217 | } |
220 | 218 | } |
221 | 219 | return detailsMap; |
|
0 commit comments