Skip to content

Commit 5ba953d

Browse files
Merge branch '4.18' into 4.18-asgroup-add-userdata-support
2 parents 8d4aa1a + 6d24217 commit 5ba953d

File tree

22 files changed

+133
-64
lines changed

22 files changed

+133
-64
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ 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 no account is provided then network will be assigned to the caller account and domain")
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.")
122124
private Long domainId;
123125

124126
@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.")
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.")
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: 1 addition & 1 deletion
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.")
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.")
113113
private Long domainId;
114114

115115
//Network information

api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd implements UserC
7070
type = CommandType.UUID,
7171
entityType = DomainResponse.class,
7272
description = "the domain ID associated with the disk offering. If used with the account parameter"
73-
+ " returns the disk volume associated with the account for the specified domain.")
73+
+ " returns the disk volume associated with the account for the specified domain." +
74+
"If account is NOT provided then the volume will be assigned to the caller account and domain.")
7475
private Long domainId;
7576

7677
@Parameter(name = ApiConstants.DISK_OFFERING_ID,

api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class UploadVolumeCmd extends BaseAsyncCmd implements UserCmd {
7878
@Parameter(name = ApiConstants.DOMAIN_ID,
7979
type = CommandType.UUID,
8080
entityType = DomainResponse.class,
81-
description = "an optional domainId. If the account parameter is used, domainId must also be used.")
81+
description = "an optional domainId. If the account parameter is used, domainId must also be used. If account is NOT provided then volume will be assigned to the caller account and domain.")
8282
private Long domainId;
8383

8484
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.")

api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
103103
private String group;
104104

105105
@SerializedName(ApiConstants.ZONE_ID)
106-
@Param(description = "the ID of the availablility zone for the virtual machine")
106+
@Param(description = "the ID of the availability zone for the virtual machine")
107107
private String zoneId;
108108

109109
@SerializedName(ApiConstants.ZONE_NAME)

packaging/centos8/cloud.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ intelligent IaaS cloud implementation.
5353
%package management
5454
Summary: CloudStack management server UI
5555
Requires: java-11-openjdk
56-
Requires: tzdata-java
56+
Requires: (tzdata-java or timezone-java)
5757
Requires: python3
5858
Requires: bash
5959
Requires: gawk

plugins/acl/static-role-based/src/main/java/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ public boolean isEnabled() {
7676
if (roleService.isEnabled()) {
7777
LOGGER.debug("RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.");
7878
}
79-
return roleService.isEnabled();
79+
return !roleService.isEnabled();
8080
}
8181

8282
@Override
8383
public List<String> getApisAllowedToUser(Role role, User user, List<String> apiNames) throws PermissionDeniedException {
84-
if (isEnabled()) {
84+
if (!isEnabled()) {
8585
return apiNames;
8686
}
8787

@@ -93,7 +93,7 @@ public List<String> getApisAllowedToUser(Role role, User user, List<String> apiN
9393

9494
@Override
9595
public boolean checkAccess(User user, String commandName) throws PermissionDeniedException {
96-
if (isEnabled()) {
96+
if (!isEnabled()) {
9797
return true;
9898
}
9999

@@ -107,6 +107,10 @@ public boolean checkAccess(User user, String commandName) throws PermissionDenie
107107

108108
@Override
109109
public boolean checkAccess(Account account, String commandName) {
110+
if (!isEnabled()) {
111+
return true;
112+
}
113+
110114
RoleType roleType = accountService.getRoleType(account);
111115
if (isApiAllowed(commandName, roleType)) {
112116
return true;

plugins/api/rate-limit/src/main/java/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class ResetApiLimitCmd extends BaseCmd {
5353
/////////////////////////////////////////////////////
5454

5555
@ACL
56-
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.UUID, entityType = AccountResponse.class, description = "the ID of the acount whose limit to be reset")
56+
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.UUID, entityType = AccountResponse.class, description = "the ID of the account whose limit to be reset")
5757
private Long accountId;
5858

5959
/////////////////////////////////////////////////////

plugins/network-elements/tungsten/src/main/java/org/apache/cloudstack/network/tungsten/api/command/ListTungstenFabricTagCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class ListTungstenFabricTagCmd extends BaseListCmd {
6161
@Parameter(name = ApiConstants.VM_UUID, type = CommandType.STRING, description = "the uuid of Tungsten-Fabric vm")
6262
private String vmUuid;
6363

64-
@Parameter(name = ApiConstants.NIC_UUID, type = CommandType.STRING, description = "tthe uuid of Tungsten-Fabric nic")
64+
@Parameter(name = ApiConstants.NIC_UUID, type = CommandType.STRING, description = "the uuid of Tungsten-Fabric nic")
6565
private String nicUuid;
6666

6767
@Parameter(name = ApiConstants.POLICY_UUID, type = CommandType.STRING, description = "the uuid of Tungsten-Fabric policy")

0 commit comments

Comments
 (0)