Skip to content

Commit 6e68f80

Browse files
committed
Merge branch 'main' of https://github.com/apache/cloudstack into clone-edit-existing-offerings
2 parents 231f22b + 1b0a036 commit 6e68f80

File tree

236 files changed

+11724
-1960
lines changed

Some content is hidden

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

236 files changed

+11724
-1960
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ updates:
2626
directory: "/" # Location of package manifests
2727
schedule:
2828
interval: "daily"
29+
cooldown:
30+
default-days: 7

.github/workflows/stale.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ jobs:
3333
stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
3434
stale-pr-message: 'This PR is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
3535
close-issue-message: 'This issue was closed because it has been stale for 120 days with no activity.'
36-
close-pr-message: 'This PR was closed because it has been stale for 120 days with no activity.'
36+
close-pr-message: 'This PR was closed because it has been stale for 240 days with no activity.'
3737
stale-issue-label: 'no-issue-activity'
3838
stale-pr-label: 'no-pr-activity'
3939
days-before-stale: 120
40+
days-before-close: -1
41+
days-before-pr-close: 240
4042
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
4143
exempt-pr-labels: 'status:ready-for-merge,status:needs-testing,status:on-hold'

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ repos:
6262
- .github/workflows/license-templates/LICENSE.txt
6363
- --fuzzy-match-generates-todo
6464
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$
65+
- id: insert-license
66+
name: add license for all properties files
67+
description: automatically adds a licence header to all properties files that don't have a license header
68+
files: \.properties$
69+
args:
70+
- --comment-style
71+
- '|#|'
72+
- --license-filepath
73+
- .github/workflows/license-templates/LICENSE.txt
74+
- --fuzzy-match-generates-todo
6575
- id: insert-license
6676
name: add license for all Shell files
6777
description: automatically adds a licence header to all Shell files that don't have a license header

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ public class EventTypes {
504504
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE";
505505
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE";
506506
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE";
507+
public static final String EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS = "VPN.S2S.GATEWAY.OBSOLETE.PARAMS";
507508
public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE";
508509
public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE";
509510
public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET";
@@ -1153,6 +1154,7 @@ public class EventTypes {
11531154
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class);
11541155
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class);
11551156
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class);
1157+
entityEventDetails.put(EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS, Site2SiteCustomerGateway.class);
11561158
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class);
11571159
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class);
11581160
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class);

api/src/main/java/com/cloud/network/NetworkModel.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ public interface NetworkModel {
125125
*/
126126
String getNextAvailableMacAddressInNetwork(long networkConfigurationId) throws InsufficientAddressCapacityException;
127127

128+
String getUniqueMacAddress(long macAddress, long networkId, long datacenterId) throws InsufficientAddressCapacityException;
129+
130+
boolean isMACUnique(String mac, long networkId);
131+
128132
PublicIpAddress getPublicIpAddress(long ipAddressId);
129133

130134
List<? extends Vlan> listPodVlans(long podId);
@@ -364,4 +368,8 @@ List<String[]> generateVmData(String userData, String userDataDetails, String se
364368

365369
boolean checkSecurityGroupSupportForNetwork(Account account, DataCenter zone, List<Long> networkIds,
366370
List<Long> securityGroupsIds);
371+
372+
default long getMacIdentifier(Long dataCenterId) {
373+
return 0;
374+
}
367375
}

api/src/main/java/com/cloud/user/AccountService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.cloud.offering.NetworkOffering;
3737
import com.cloud.offering.ServiceOffering;
3838
import org.apache.cloudstack.auth.UserTwoFactorAuthenticator;
39+
import org.apache.cloudstack.backup.BackupOffering;
3940

4041
public interface AccountService {
4142

@@ -115,6 +116,8 @@ User createUser(String userName, String password, String firstName, String lastN
115116

116117
void checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
117118

119+
void checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
120+
118121
void checkAccess(User user, ControlledEntity entity);
119122

120123
void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName, ControlledEntity... entities) throws PermissionDeniedException;

api/src/main/java/com/cloud/vm/VmDetailConstants.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public interface VmDetailConstants {
5555
String NIC_MULTIQUEUE_NUMBER = "nic.multiqueue.number";
5656
String NIC_PACKED_VIRTQUEUES_ENABLED = "nic.packed.virtqueues.enabled";
5757

58+
// KVM specific, disk controllers
59+
String KVM_SKIP_FORCE_DISK_CONTROLLER = "skip.force.disk.controller";
60+
5861
// Mac OSX guest specific (internal)
5962
String SMC_PRESENT = "smc.present";
6063
String FIRMWARE = "firmware";

api/src/main/java/org/apache/cloudstack/acl/SecurityChecker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import com.cloud.user.User;
2828
import com.cloud.utils.component.Adapter;
2929

30+
import org.apache.cloudstack.backup.BackupOffering;
31+
3032
/**
3133
* SecurityChecker checks the ownership and access control to objects within
3234
*/
@@ -145,4 +147,6 @@ boolean checkAccess(Account caller, AccessType accessType, String action, Contro
145147
boolean checkAccess(Account account, NetworkOffering nof, DataCenter zone) throws PermissionDeniedException;
146148

147149
boolean checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
150+
151+
boolean checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
148152
}

api/src/main/java/org/apache/cloudstack/alert/AlertService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private AlertType(short type, String name, boolean isDefault) {
7474
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true);
7575
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true);
7676
public static final AlertType ALERT_TYPE_EXTENSION_PATH_NOT_READY = new AlertType((short)33, "ALERT.TYPE.EXTENSION.PATH.NOT.READY", true);
77+
public static final AlertType ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS = new AlertType((short)34, "ALERT.S2S.VPN.GATEWAY.OBSOLETE.PARAMETERS", true);
7778
public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true);
7879
public static final AlertType ALERT_TYPE_OBJECT_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_OBJECT_STORAGE, "ALERT.STORAGE.OBJECT", true);
7980

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ public class ApiConstants {
375375
public static final String MAC_ADDRESS = "macaddress";
376376
public static final String MAC_ADDRESSES = "macaddresses";
377377
public static final String MANUAL_UPGRADE = "manualupgrade";
378+
public static final String MATCH_TYPE = "matchtype";
378379
public static final String MAX = "max";
379380
public static final String MAX_SNAPS = "maxsnaps";
380381
public static final String MAX_BACKUPS = "maxbackups";
@@ -1364,6 +1365,10 @@ public class ApiConstants {
13641365

13651366
public static final String RECURSIVE_DOMAINS = "recursivedomains";
13661367

1368+
public static final String VPN_CUSTOMER_GATEWAY_PARAMETERS = "vpncustomergatewayparameters";
1369+
public static final String OBSOLETE_PARAMETERS = "obsoleteparameters";
1370+
public static final String EXCLUDED_PARAMETERS = "excludedparameters";
1371+
13671372
/**
13681373
* This enum specifies IO Drivers, each option controls specific policies on I/O.
13691374
* Qemu guests support "threads" and "native" options Since 0.8.8 ; "io_uring" is supported Since 6.3.0 (QEMU 5.0).

0 commit comments

Comments
 (0)