Skip to content

Commit 20d84f2

Browse files
committed
Revert "Merge branch '4.18'"
This reverts commit ea832bc, reversing changes made to 0bd7462.
1 parent 7cdf864 commit 20d84f2

69 files changed

Lines changed: 229 additions & 1303 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/src/main/java/com/cloud/network/as/AutoScaleVmProfile.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public interface AutoScaleVmProfile extends ControlledEntity, InternalIdentity,
3535

3636
String getUserData();
3737

38-
Long getUserDataId();
39-
40-
String getUserDataDetails();
41-
4238
public String getUuid();
4339

4440
public Long getZoneId();

api/src/main/java/org/apache/cloudstack/api/BaseCmd.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
import java.text.DateFormat;
2222
import java.text.SimpleDateFormat;
2323
import java.util.ArrayList;
24-
import java.util.Collection;
2524
import java.util.Date;
2625
import java.util.HashMap;
27-
import java.util.Iterator;
2826
import java.util.List;
2927
import java.util.Map;
3028
import java.util.regex.Pattern;
@@ -44,7 +42,6 @@
4442
import org.apache.cloudstack.query.QueryService;
4543
import org.apache.cloudstack.storage.ImageStoreService;
4644
import org.apache.cloudstack.usage.UsageService;
47-
import org.apache.commons.collections.MapUtils;
4845
import org.apache.log4j.Logger;
4946

5047
import com.cloud.configuration.ConfigurationService;
@@ -459,18 +456,4 @@ public ApiCommandResourceType getApiResourceType() {
459456
return ApiCommandResourceType.None;
460457
}
461458

462-
public Map<String, String> convertDetailsToMap(Map details) {
463-
Map<String, String> detailsMap = new HashMap<String, String>();
464-
if (MapUtils.isNotEmpty(details)) {
465-
Collection parameterCollection = details.values();
466-
Iterator iter = parameterCollection.iterator();
467-
while (iter.hasNext()) {
468-
HashMap<String, String> value = (HashMap<String, String>)iter.next();
469-
for (Map.Entry<String,String> entry: value.entrySet()) {
470-
detailsMap.put(entry.getKey(),entry.getValue());
471-
}
472-
}
473-
}
474-
return detailsMap;
475-
}
476459
}

api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class StopInternalLBVMCmd extends BaseAsyncCmd {
5151
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the internal lb vm")
5252
private Long id;
5353

54-
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.")
54+
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM. The caller knows the VM is stopped.")
5555
private Boolean forced;
5656

5757
// ///////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class StopRouterCmd extends BaseAsyncCmd {
4949
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the router")
5050
private Long id;
5151

52-
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.")
52+
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM. The caller knows the VM is stopped.")
5353
private Boolean forced;
5454

5555
// ///////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class StopSystemVmCmd extends BaseAsyncCmd {
5454
description = "The ID of the system virtual machine")
5555
private Long id;
5656

57-
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.")
57+
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM. The caller knows the VM is stopped.")
5858
private Boolean forced;
5959

6060
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.apache.cloudstack.api.response.ProjectResponse;
3636
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
3737
import org.apache.cloudstack.api.response.TemplateResponse;
38-
import org.apache.cloudstack.api.response.UserDataResponse;
3938
import org.apache.cloudstack.api.response.UserResponse;
4039
import org.apache.cloudstack.api.response.ZoneResponse;
4140
import org.apache.cloudstack.context.CallContext;
@@ -108,12 +107,6 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd {
108107
since = "4.18.0")
109108
private String userData;
110109

111-
@Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "the ID of the Userdata", since = "4.18.1")
112-
private Long userDataId;
113-
114-
@Parameter(name = ApiConstants.USER_DATA_DETAILS, type = CommandType.MAP, description = "used to specify the parameters values for the variables in userdata.", since = "4.18.1")
115-
private Map userDataDetails;
116-
117110
@Parameter(name = ApiConstants.AUTOSCALE_USER_ID,
118111
type = CommandType.UUID,
119112
entityType = UserResponse.class,
@@ -170,14 +163,6 @@ public String getUserData() {
170163
return userData;
171164
}
172165

173-
public Long getUserDataId() {
174-
return userDataId;
175-
}
176-
177-
public Map<String, String> getUserDataDetails() {
178-
return convertDetailsToMap(userDataDetails);
179-
}
180-
181166
public Long getAutoscaleUserId() {
182167
return autoscaleUserId;
183168
}

api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
3636
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
3737
import org.apache.cloudstack.api.response.TemplateResponse;
38-
import org.apache.cloudstack.api.response.UserDataResponse;
3938
import org.apache.cloudstack.api.response.UserResponse;
4039
import org.apache.cloudstack.context.CallContext;
4140

@@ -103,14 +102,6 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd {
103102
since = "4.18.0")
104103
private String userData;
105104

106-
@Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "the ID of the userdata",
107-
since = "4.18.1")
108-
private Long userDataId;
109-
110-
@Parameter(name = ApiConstants.USER_DATA_DETAILS, type = CommandType.MAP, description = "used to specify the parameters values for the variables in userdata.",
111-
since = "4.18.1")
112-
private Map userDataDetails;
113-
114105
@Parameter(name = ApiConstants.AUTOSCALE_USER_ID,
115106
type = CommandType.UUID,
116107
entityType = UserResponse.class,
@@ -165,14 +156,6 @@ public String getUserData() {
165156
return userData;
166157
}
167158

168-
public Long getUserDataId() {
169-
return userDataId;
170-
}
171-
172-
public Map<String, String> getUserDataDetails() {
173-
return convertDetailsToMap(userDataDetails);
174-
}
175-
176159
public Long getAutoscaleUserId() {
177160
return autoscaleUserId;
178161
}

api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd {
118118
private Long projectId;
119119

120120
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network. " +
121-
"If the account is not specified, but the acltype is Account or not specified, the network will be automatically assigned to the caller account and domain. " +
122-
"To create a network under the domain without linking it to any account, make sure to include acltype=Domain parameter in the api call. " +
123-
"If account is not specified, but acltype is Domain, the network will be created for the specified domain.")
121+
"If no account is provided then network will be assigned to the caller account and domain")
124122
private Long domainId;
125123

126124
@Parameter(name = ApiConstants.SUBDOMAIN_ACCESS,

api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
6262
@Parameter(name = ApiConstants.DOMAIN_ID,
6363
type = CommandType.UUID,
6464
entityType = DomainResponse.class,
65-
description = "The domain ID of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume. If account is NOT provided then snapshot will be assigned to the caller account and domain.")
65+
description = "The domain ID of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume.")
6666
private Long domainId;
6767

6868
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the disk volume")

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd implements SecurityG
109109
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the virtual machine. Must be used with domainId.")
110110
private String accountName;
111111

112-
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used. If account is NOT provided then virtual machine will be assigned to the caller account and domain.")
112+
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used.")
113113
private Long domainId;
114114

115115
//Network information
@@ -317,8 +317,17 @@ public ApiConstants.BootType getBootType() {
317317
}
318318

319319
public Map<String, String> getDetails() {
320-
Map<String, String> customparameterMap = convertDetailsToMap(details);
321-
320+
Map<String, String> customparameterMap = new HashMap<String, String>();
321+
if (details != null && details.size() != 0) {
322+
Collection parameterCollection = details.values();
323+
Iterator iter = parameterCollection.iterator();
324+
while (iter.hasNext()) {
325+
HashMap<String, String> value = (HashMap<String, String>)iter.next();
326+
for (Map.Entry<String,String> entry: value.entrySet()) {
327+
customparameterMap.put(entry.getKey(),entry.getValue());
328+
}
329+
}
330+
}
322331
if (getBootType() != null) {
323332
customparameterMap.put(getBootType().toString(), getBootMode().toString());
324333
}
@@ -457,7 +466,18 @@ public Long getUserdataId() {
457466
}
458467

459468
public Map<String, String> getUserdataDetails() {
460-
return convertDetailsToMap(userdataDetails);
469+
Map<String, String> userdataDetailsMap = new HashMap<String, String>();
470+
if (userdataDetails != null && userdataDetails.size() != 0) {
471+
Collection parameterCollection = userdataDetails.values();
472+
Iterator iter = parameterCollection.iterator();
473+
while (iter.hasNext()) {
474+
HashMap<String, String> value = (HashMap<String, String>)iter.next();
475+
for (Map.Entry<String,String> entry: value.entrySet()) {
476+
userdataDetailsMap.put(entry.getKey(),entry.getValue());
477+
}
478+
}
479+
}
480+
return userdataDetailsMap;
461481
}
462482

463483
public Long getZoneId() {

0 commit comments

Comments
 (0)