Skip to content

Commit e044303

Browse files
committed
Merge branch 'master' into ui-mixed-zone-management
2 parents c3009e3 + 977162b commit e044303

43 files changed

Lines changed: 743 additions & 431 deletions

Some content is hidden

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

‎api/src/com/cloud/network/IpAddress.java‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,7 @@ enum Purpose {
7878

7979
boolean getSystem();
8080

81-
/**
82-
* @return
83-
*/
8481
Long getVpcId();
8582

86-
/**
87-
* @param vpcId
88-
*/
89-
void setVpcId(Long vpcId);
9083
String getVmIp();
91-
void setVmIp(String vmIp);
92-
9384
}

‎api/src/com/cloud/network/PublicIpAddress.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,4 @@ public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan, Inte
3030
public String getNetmask();
3131

3232
public String getGateway();
33-
34-
@Override
35-
public String getVlanTag();
3633
}

‎api/src/com/cloud/user/Account.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.apache.cloudstack.api.Identity;
2323
import org.apache.cloudstack.api.InternalIdentity;
2424

25+
2526
public interface Account extends ControlledEntity, InternalIdentity, Identity {
2627
public enum Type {
2728
Normal,
@@ -64,4 +65,7 @@ public enum State {
6465
public Long getDefaultZoneId();
6566

6667
public String getUuid();
68+
69+
boolean isDefault();
70+
6771
}

‎api/src/com/cloud/user/User.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,7 @@ public interface User extends OwnedBy, InternalIdentity {
7272
String getRegistrationToken();
7373

7474
boolean isRegistered();
75+
76+
boolean isDefault();
7577

7678
}

‎api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
6464
private List<String> vmIdList;
6565

6666
public AffinityGroupResponse() {
67-
this.vmIdList = new ArrayList<String>();
6867
}
6968

7069
@Override
@@ -149,6 +148,10 @@ public void setVMIdList(List<String> vmIdList) {
149148
}
150149

151150
public void addVMId(String vmId) {
151+
if (this.vmIdList == null) {
152+
this.vmIdList = new ArrayList<String>();
153+
}
154+
152155
this.vmIdList.add(vmId);
153156
}
154157

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public List<Long> getSecurityGroupIdList() {
230230
for (String groupName : securityGroupNameList) {
231231
Long groupId = _responseGenerator.getSecurityGroupId(groupName, getEntityOwnerId());
232232
if (groupId == null) {
233-
throw new InvalidParameterValueException("Unable to find group by name " + groupName + " for account " + getEntityOwnerId());
233+
throw new InvalidParameterValueException("Unable to find group by name " + groupName);
234234
} else {
235235
securityGroupIds.add(groupId);
236236
}
@@ -344,8 +344,7 @@ public List<Long> getAffinityGroupIdList() {
344344
for (String groupName : affinityGroupNameList) {
345345
Long groupId = _responseGenerator.getAffinityGroupId(groupName, getEntityOwnerId());
346346
if (groupId == null) {
347-
throw new InvalidParameterValueException("Unable to find group by name " + groupName
348-
+ " for account " + getEntityOwnerId());
347+
throw new InvalidParameterValueException("Unable to find affinity group by name " + groupName);
349348
} else {
350349
affinityGroupIds.add(groupId);
351350
}

‎api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
9595

9696
@Parameter(name=ApiConstants.DETAILS, type=CommandType.LIST, collectionType=CommandType.STRING,
9797
description="comma separated list of host details requested, " +
98-
"value can be a list of [all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min]." +
98+
"value can be a list of [all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min, affgrp]." +
9999
" If no parameter is passed in, the details will be defaulted to all" )
100100
private List<String> viewDetails;
101101

‎api/src/org/apache/cloudstack/api/response/AccountResponse.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public class AccountResponse extends BaseResponse {
183183

184184
@SerializedName(ApiConstants.ACCOUNT_DETAILS) @Param(description="details for the account")
185185
private Map<String, String> details;
186+
187+
@SerializedName(ApiConstants.IS_DEFAULT) @Param(description="true if account is default, false otherwise", since="4.2.0")
188+
private Boolean isDefault;
186189

187190

188191
@Override
@@ -381,4 +384,8 @@ public void setSecondaryStorageAvailable(String secondaryStorageAvailable) {
381384
public void setDefaultZone(String defaultZoneId) {
382385
this.defaultZoneId = defaultZoneId;
383386
}
387+
388+
public void setIsDefault(Boolean isDefault) {
389+
this.isDefault = isDefault;
390+
}
384391
}

‎api/src/org/apache/cloudstack/api/response/UserResponse.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import java.util.Date;
2020

21+
import org.apache.cloudstack.api.ApiConstants;
2122
import org.apache.cloudstack.api.BaseResponse;
2223
import org.apache.cloudstack.api.EntityReference;
2324

@@ -74,6 +75,9 @@ public class UserResponse extends BaseResponse {
7475

7576
@SerializedName("iscallerchilddomain") @Param(description="the boolean value representing if the updating target is in caller's child domain")
7677
private boolean isCallerChildDomain;
78+
79+
@SerializedName(ApiConstants.IS_DEFAULT) @Param(description="true if user is default, false otherwise", since="4.2.0")
80+
private Boolean isDefault;
7781

7882
@Override
7983
public String getObjectId() {
@@ -206,4 +210,8 @@ public boolean getIsCallerSubdomain() {
206210
public void setIsCallerChildDomain(boolean isCallerChildDomain) {
207211
this.isCallerChildDomain = isCallerChildDomain;
208212
}
213+
214+
public void setIsDefault(Boolean isDefault) {
215+
this.isDefault = isDefault;
216+
}
209217
}

‎core/src/com/cloud/user/AccountVO.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public class AccountVO implements Account {
6565

6666
@Column(name="default_zone_id")
6767
private Long defaultZoneId = null;
68+
69+
@Column(name = "default")
70+
boolean isDefault;
6871

6972
public AccountVO() {
7073
this.uuid = UUID.randomUUID().toString();
@@ -179,4 +182,8 @@ public void setUuid(String uuid) {
179182
this.uuid = uuid;
180183
}
181184

185+
@Override
186+
public boolean isDefault() {
187+
return isDefault;
188+
}
182189
}

0 commit comments

Comments
 (0)