Skip to content

Commit c1d05b8

Browse files
committed
handle review comment and merge main
1 parent f179705 commit c1d05b8

File tree

204 files changed

+2572
-592
lines changed

Some content is hidden

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

204 files changed

+2572
-592
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ repos:
4848
exclude: >
4949
(?x)
5050
^scripts/vm/systemvm/id_rsa\.cloud$|
51+
^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java$|
5152
^server/src/test/java/com/cloud/keystore/KeystoreTest\.java$|
5253
^server/src/test/resources/certs/dsa_self_signed\.key$|
5354
^server/src/test/resources/certs/non_root\.key$|
@@ -57,7 +58,8 @@ repos:
5758
^server/src/test/resources/certs/rsa_self_signed\.key$|
5859
^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$|
5960
^systemvm/agent/certs/localhost\.key$|
60-
^systemvm/agent/certs/realhostip\.key$
61+
^systemvm/agent/certs/realhostip\.key$|
62+
^test/integration/smoke/test_ssl_offloading.py$
6163
- id: end-of-file-fixer
6264
exclude: \.vhd$
6365
- id: fix-byte-order-marker
@@ -75,7 +77,7 @@ repos:
7577
name: run codespell
7678
description: Check spelling with codespell
7779
args: [--ignore-words=.github/linters/codespell.txt]
78-
exclude: ^systemvm/agent/noVNC/|^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$
80+
exclude: ^systemvm/agent/noVNC/|^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$|^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java$|^test/integration/smoke/test_ssl_offloading.py$
7981
- repo: https://github.com/pycqa/flake8
8082
rev: 7.0.0
8183
hooks:

api/src/main/java/com/cloud/agent/api/to/LoadBalancerTO.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, S
7171
this.destinations = new DestinationTO[destinations.size()];
7272
this.stickinessPolicies = null;
7373
this.sslCert = null;
74-
this.lbProtocol = null;
74+
this.lbProtocol = protocol;
7575
int i = 0;
7676
for (LbDestination destination : destinations) {
7777
this.destinations[i++] = new DestinationTO(destination.getIpAddress(), destination.getDestinationPortStart(), destination.isRevoked(), false);
@@ -205,6 +205,10 @@ public LbSslCert getSslCert() {
205205
return this.sslCert;
206206
}
207207

208+
public void setLbSslCert(LbSslCert sslCert) {
209+
this.sslCert = sslCert;
210+
}
211+
208212
public String getSrcIpVlan() {
209213
return srcIpVlan;
210214
}

api/src/main/java/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
3535
//////////////// API parameters /////////////////////
3636
/////////////////////////////////////////////////////
3737

38-
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring Snapshots by Snapshot policy ID")
38+
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring snapshots by Snapshot policy ID")
3939
private Long snapshotPolicyId;
4040

41-
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring Snapshots by volume ID")
41+
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring snapshots by volume ID")
4242
private Long volumeId;
4343

4444
/////////////////////////////////////////////////////

api/src/main/java/com/cloud/network/lb/LoadBalancingRulesService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ LoadBalancer createPublicLoadBalancerRule(String xId, String name, String descri
106106

107107
boolean applyLoadBalancerConfig(long lbRuleId) throws ResourceUnavailableException;
108108

109-
boolean assignCertToLoadBalancer(long lbRuleId, Long certId);
109+
boolean assignCertToLoadBalancer(long lbRuleId, Long certId, boolean isForced);
110110

111111
boolean removeCertFromLoadBalancer(long lbRuleId);
112112

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
5858
private String domainName;
5959

6060
@SerializedName(ApiConstants.DOMAIN_PATH)
61-
@Param(description = "path of the Domain the affinity group belongs to", since = "4.19.2.0")
61+
@Param(description = "Path of the Domain the affinity group belongs to", since = "4.19.2.0")
6262
private String domainPath;
6363

6464
@SerializedName(ApiConstants.PROJECT_ID)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
5252
private Long osTypeId;
5353

5454
@Parameter(name = ApiConstants.FORCE_UPDATE_OS_TYPE, type = CommandType.BOOLEAN, since = "4.21", description = "Force OS type update. Warning: Updating OS type will " +
55-
"Update the guest OS configuration for all the existing Instances deployed with this template/iso, which may affect their behavior.")
55+
"Update the guest OS configuration for all the existing Instances deployed with this Template/ISO, which may affect their behavior.")
5656
private Boolean forceUpdateOsType;
5757

5858
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "The format for the image")

api/src/main/java/org/apache/cloudstack/api/command/admin/acl/CreateRoleCmd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void execute() {
8383
if (getRoleId() != null) {
8484
Role existingRole = roleService.findRole(getRoleId());
8585
if (existingRole == null) {
86-
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided");
86+
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role ID provided");
8787
}
8888

8989
CallContext.current().setEventDetails("Role: " + getRoleName() + ", from role: " + getRoleId() + ", description: " + getRoleDescription());
@@ -101,15 +101,15 @@ public void execute() {
101101

102102
private void validateRoleParameters() {
103103
if (getRoleType() == null && getRoleId() == null) {
104-
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Neither role type nor role id is provided");
104+
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Neither role type nor role ID is provided");
105105
}
106106

107107
if (getRoleType() != null && getRoleId() != null) {
108-
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Both role type and role id should not be specified");
108+
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Both role type and role ID should not be specified");
109109
}
110110

111111
if (getRoleId() != null && getRoleId() < 1L) {
112-
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided");
112+
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role ID provided");
113113
}
114114
}
115115

api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class AddAnnotationCmd extends BaseCmd {
4444
@Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The following entity types are allowed VM, VOLUME, SNAPSHOT, VM_SNAPSHOT, INSTANCE_GROUP, SSH_KEYPAIR, USER_DATA, NETWORK, VPC, PUBLIC_IP_ADDRESS, VPN_CUSTOMER_GATEWAY, TEMPLATE, ISO, KUBERNETES_CLUSTER, SERVICE_OFFERING, DISK_OFFERING, NETWORK_OFFERING, ZONE, POD, CLUSTER, HOST, DOMAIN, PRIMARY_STORAGE, SECONDARY_STORAGE, VR, SYSTEM_VM, AUTOSCALE_VM_GROUP, MANAGEMENT_SERVER")
4545
private String entityType;
4646

47-
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The id of the entity to annotate")
47+
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The ID of the entity to annotate")
4848
private String entityUuid;
4949

5050
@Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, since = "4.16.0",

api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/ListAnnotationsCmd.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@
3737
public class ListAnnotationsCmd extends BaseListCmd {
3838

3939

40-
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, description = "The id of the annotation")
40+
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, description = "The ID of the annotation")
4141
private String uuid;
4242

4343
@Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The entity type")
4444
private String entityType;
4545

46-
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The id of the entity for which to show annotations")
46+
@Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The ID of the entity for which to show annotations")
4747
private String entityUuid;
4848

4949
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, since = "4.16.0",
50-
description = "Optional: The id of the user of the annotation", required = false)
50+
description = "Optional: The ID of the user of the annotation", required = false)
5151
private String userUuid;
5252

5353
@Parameter(name = ApiConstants.ANNOTATION_FILTER,

api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/UpdateAnnotationVisibilityCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class UpdateAnnotationVisibilityCmd extends BaseCmd {
3838

3939

4040
@Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true,
41-
description = "The id of the annotation")
41+
description = "The ID of the annotation")
4242
private String uuid;
4343

4444
@Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, required = true,

0 commit comments

Comments
 (0)