Skip to content

Commit ee9c893

Browse files
committed
Merge branch 'refactor-allocate-to-method' into guest-os-rules
2 parents 70b4846 + 6b24b2e commit ee9c893

File tree

116 files changed

+1525
-782
lines changed

Some content is hidden

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

116 files changed

+1525
-782
lines changed

.asf.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ github:
5353
- acs-robot
5454
- gpordeus
5555
- hsato03
56-
- bernardodemarco
5756
- FelipeM525
5857
- lucas-a-martins
5958
- nicoschmdt
6059
- abh1sar
61-
- sudo87
6260
- rosi-shapeblue
61+
- sudo87
6362

6463
protected_branches: ~
6564

.github/linters/.markdown-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,6 @@ MD046: false
8686

8787
# MD052/reference-links-images Reference links and images should use a label that is defined
8888
MD052: false
89+
90+
# MD059/descriptive-link-text Link text should be descriptive
91+
MD059: false

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ repos:
2525
hooks:
2626
- id: identity
2727
- id: check-hooks-apply
28+
- repo: https://github.com/gitleaks/gitleaks
29+
rev: v8.27.2
30+
hooks:
31+
- id: gitleaks
32+
name: run gitleaks
33+
description: detect hardcoded secrets
2834
- repo: https://github.com/pre-commit/pre-commit-hooks
2935
rev: v4.6.0
3036
hooks:
@@ -87,7 +93,7 @@ repos:
8793
^setup/bindir/cloud-setup-encryption\.in$|
8894
^venv/.*$
8995
- repo: https://github.com/igorshubovych/markdownlint-cli
90-
rev: v0.43.0
96+
rev: v0.45.0
9197
hooks:
9298
- id: markdownlint
9399
name: run markdownlint

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ public class ApiConstants {
223223
public static final String FORCED_DESTROY_LOCAL_STORAGE = "forcedestroylocalstorage";
224224
public static final String FORCE_DELETE_HOST = "forcedeletehost";
225225
public static final String FORCE_MS_TO_IMPORT_VM_FILES = "forcemstoimportvmfiles";
226+
public static final String FORCE_UPDATE_OS_TYPE = "forceupdateostype";
226227
public static final String FORMAT = "format";
227228
public static final String FOR_VIRTUAL_NETWORK = "forvirtualnetwork";
228229
public static final String FOR_SYSTEM_VMS = "forsystemvms";

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
5151
description = "the ID of the OS type that best represents the OS of this image.")
5252
private Long osTypeId;
5353

54+
@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.")
56+
private Boolean forceUpdateOsType;
57+
5458
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "the format for the image")
5559
private String format;
5660

@@ -112,6 +116,10 @@ public Long getOsTypeId() {
112116
return osTypeId;
113117
}
114118

119+
public Boolean getForceUpdateOsType() {
120+
return forceUpdateOsType;
121+
}
122+
115123
public Boolean getPasswordEnabled() {
116124
return passwordEnabled;
117125
}

api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupScheduleCmd.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
description = "Deletes the backup schedule of a VM",
4444
responseObject = SuccessResponse.class, since = "4.14.0",
4545
authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User})
46-
public class DeleteBackupScheduleCmd extends BaseCmd {
46+
public class DeleteBackupScheduleCmd extends BaseCmd {
4747

4848
@Inject
4949
private BackupManager backupManager;
@@ -52,17 +52,13 @@ public class DeleteBackupScheduleCmd extends BaseCmd {
5252
//////////////// API parameters /////////////////////
5353
/////////////////////////////////////////////////////
5454

55-
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID,
56-
type = CommandType.UUID,
57-
entityType = UserVmResponse.class,
58-
description = "ID of the VM")
55+
@Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class,
56+
description = "ID of the VM from which all backup schedules will be deleted.")
5957
private Long vmId;
6058

61-
@Parameter(name = ApiConstants.ID,
62-
type = CommandType.UUID,
63-
entityType = BackupScheduleResponse.class,
64-
description = "ID of the schedule",
65-
since = "4.20.1")
59+
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = BackupScheduleResponse.class,
60+
since = "4.20.1", description = "ID of the backup schedule to be deleted. It has precedence over the 'virtualmachineid' parameter, " +
61+
"i.e., when the 'id' parameter is specified, the 'virtualmachineid' parameter will be ignored.")
6662
private Long id;
6763

6864
/////////////////////////////////////////////////////

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
@EntityReference(value = BackupSchedule.class)
3030
public class BackupScheduleResponse extends BaseResponse {
31+
@SerializedName(ApiConstants.ID)
32+
@Param(description = "ID of the backup schedule.", since = "4.21.0")
33+
private String id;
3134

3235
@SerializedName(ApiConstants.VIRTUAL_MACHINE_NAME)
3336
@Param(description = "name of the VM")
@@ -51,7 +54,11 @@ public class BackupScheduleResponse extends BaseResponse {
5154

5255
@SerializedName(ApiConstants.MAX_BACKUPS)
5356
@Param(description = "maximum number of backups retained")
54-
private Integer maxBakups;
57+
private Integer maxBackups;
58+
59+
public void setId(String id) {
60+
this.id = id;
61+
}
5562

5663
public String getVmName() {
5764
return vmName;
@@ -93,7 +100,7 @@ public void setTimezone(String timezone) {
93100
this.timezone = timezone;
94101
}
95102

96-
public void setMaxBakups(Integer maxBakups) {
97-
this.maxBakups = maxBakups;
103+
public void setMaxBackups(Integer maxBackups) {
104+
this.maxBackups = maxBackups;
98105
}
99106
}

api/src/main/java/org/apache/cloudstack/backup/BackupSchedule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ public interface BackupSchedule extends InternalIdentity {
3131
Date getScheduledTimestamp();
3232
Long getAsyncJobId();
3333
Integer getMaxBackups();
34+
String getUuid();
3435
}

client/pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,16 +321,6 @@
321321
<artifactId>cloud-plugin-hypervisor-ucs</artifactId>
322322
<version>${project.version}</version>
323323
</dependency>
324-
<dependency>
325-
<groupId>org.apache.cloudstack</groupId>
326-
<artifactId>cloud-plugin-hypervisor-ovm</artifactId>
327-
<version>${project.version}</version>
328-
</dependency>
329-
<dependency>
330-
<groupId>org.apache.cloudstack</groupId>
331-
<artifactId>cloud-plugin-hypervisor-ovm3</artifactId>
332-
<version>${project.version}</version>
333-
</dependency>
334324
<dependency>
335325
<groupId>org.apache.cloudstack</groupId>
336326
<artifactId>cloud-plugin-hypervisor-kvm</artifactId>

engine/components-api/src/main/java/com/cloud/vm/VirtualMachineProfileImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class VirtualMachineProfileImpl implements VirtualMachineProfile {
4040
VirtualMachine _vm;
4141
ServiceOffering _offering;
4242
VirtualMachineTemplate _template;
43-
UserVmDetailVO _userVmDetails;
43+
VMInstanceDetailVO _userVmDetails;
4444
Map<Param, Object> _params;
4545
List<NicProfile> _nics = new ArrayList<NicProfile>();
4646
List<DiskTO> _disks = new ArrayList<DiskTO>();

0 commit comments

Comments
 (0)