Skip to content

Commit 02c87ea

Browse files
committed
Merge remote-tracking branch 'apache/main' into feature-sync-ext
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2 parents de78f5b + 25cb545 commit 02c87ea

File tree

378 files changed

+10949
-2101
lines changed

Some content is hidden

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

378 files changed

+10949
-2101
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ repos:
5252
args: ['644']
5353
files: \.md$
5454
stages: [manual]
55+
- id: insert-license
56+
name: add license for all cfg files
57+
description: automatically adds a licence header to all cfg files that don't have a license header
58+
files: \.cfg$
59+
args:
60+
- --comment-style
61+
- '|#|'
62+
- --license-filepath
63+
- .github/workflows/license-templates/LICENSE.txt
64+
- --fuzzy-match-generates-todo
5565
- id: insert-license
5666
name: add license for all Markdown files
5767
files: \.md$
@@ -62,6 +72,16 @@ repos:
6272
- .github/workflows/license-templates/LICENSE.txt
6373
- --fuzzy-match-generates-todo
6474
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$
75+
- id: insert-license
76+
name: add license for all properties files
77+
description: automatically adds a licence header to all properties files that don't have a license header
78+
files: \.properties$
79+
args:
80+
- --comment-style
81+
- '|#|'
82+
- --license-filepath
83+
- .github/workflows/license-templates/LICENSE.txt
84+
- --fuzzy-match-generates-todo
6585
- id: insert-license
6686
name: add license for all Shell files
6787
description: automatically adds a licence header to all Shell files that don't have a license header

agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ private void launchConsoleProxy(final byte[] ksBits, final String ksPassword, fi
331331
final Object resource = this;
332332
logger.info("Building class loader for com.cloud.consoleproxy.ConsoleProxy");
333333
if (consoleProxyMain == null) {
334-
logger.info("Running com.cloud.consoleproxy.ConsoleProxy with encryptor password={}", encryptorPassword);
334+
logger.info("Running com.cloud.consoleproxy.ConsoleProxy");
335335
consoleProxyMain = new Thread(new ManagedContextRunnable() {
336336
@Override
337337
protected void runInContext() {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ public class EventTypes {
503503
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE";
504504
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE";
505505
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE";
506+
public static final String EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS = "VPN.S2S.GATEWAY.OBSOLETE.PARAMS";
506507
public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE";
507508
public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE";
508509
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/network/NetworkService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ Network createGuestNetwork(long networkOfferingId, String name, String displayTe
108108
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType) throws
109109
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
110110

111+
Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
112+
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
113+
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
114+
111115
Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd cmd);
112116

113117
boolean deleteNetwork(long networkId, boolean forced);

api/src/main/java/com/cloud/server/ResourceTag.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
// under the License.
1717
package com.cloud.server;
1818

19-
import org.apache.cloudstack.acl.ControlledEntity;
20-
import org.apache.cloudstack.api.Identity;
21-
import org.apache.cloudstack.api.InternalIdentity;
22-
2319
import java.util.HashMap;
2420
import java.util.Locale;
2521
import java.util.Map;
2622

23+
import org.apache.cloudstack.acl.ControlledEntity;
24+
import org.apache.cloudstack.api.Identity;
25+
import org.apache.cloudstack.api.InternalIdentity;
26+
2727
public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity {
2828

2929
// FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
@@ -70,7 +70,7 @@ public enum ResourceObjectType {
7070
GuestOs(false, true),
7171
NetworkOffering(false, true),
7272
VpcOffering(true, false),
73-
Domain(false, false, true),
73+
Domain(true, false, true),
7474
ObjectStore(false, false, true);
7575

7676

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

Lines changed: 4 additions & 1 deletion
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,13 +116,15 @@ 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;
121124

122125
void validateAccountHasAccessToResource(Account account, AccessType accessType, Object resource);
123126

124-
Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
127+
Long finalizeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
125128

126129
/**
127130
* returns the user account object for a given user id

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";

0 commit comments

Comments
 (0)