Skip to content

Commit b1ac10b

Browse files
authored
Merge branch 'main' into gha-checkout-credentials-persist-false
2 parents ab57b58 + 408e8c0 commit b1ac10b

File tree

799 files changed

+14528
-4576
lines changed

Some content is hidden

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

799 files changed

+14528
-4576
lines changed

.github/workflows/stale.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ jobs:
4141
days-before-pr-close: 240
4242
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
4343
exempt-pr-labels: 'status:ready-for-merge,status:needs-testing,status:on-hold'
44+
- uses: actions/stale@v10
45+
with:
46+
stale-issue-label: 'archive'
47+
days-before-stale: 240
48+
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
49+
days-before-close: -1

.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: 3 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";
@@ -582,6 +583,7 @@ public class EventTypes {
582583

583584
// Network ACL
584585
public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE";
586+
public static final String EVENT_NETWORK_ACL_IMPORT = "NETWORK.ACL.IMPORT";
585587
public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE";
586588
public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE";
587589
public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE";
@@ -1151,6 +1153,7 @@ public class EventTypes {
11511153
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class);
11521154
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class);
11531155
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class);
1156+
entityEventDetails.put(EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS, Site2SiteCustomerGateway.class);
11541157
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class);
11551158
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class);
11561159
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/network/vpc/NetworkACLService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.List;
2020

2121
import org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd;
22+
import org.apache.cloudstack.api.command.user.network.ImportNetworkACLCmd;
2223
import org.apache.cloudstack.api.command.user.network.ListNetworkACLListsCmd;
2324
import org.apache.cloudstack.api.command.user.network.ListNetworkACLsCmd;
2425
import org.apache.cloudstack.api.command.user.network.MoveNetworkAclItemCmd;
@@ -98,4 +99,6 @@ public interface NetworkACLService {
9899
NetworkACLItem moveNetworkAclRuleToNewPosition(MoveNetworkAclItemCmd moveNetworkAclItemCmd);
99100

100101
NetworkACLItem moveRuleToTheTopInACLList(NetworkACLItem ruleBeingMoved);
102+
103+
List<NetworkACLItem> importNetworkACLRules(ImportNetworkACLCmd cmd) throws ResourceUnavailableException;
101104
}

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/storage/VolumeApiService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public interface VolumeApiService {
5656
Boolean.class,
5757
"use.https.to.upload",
5858
"true",
59-
"Determines the protocol (HTTPS or HTTP) ACS will use to generate links to upload ISOs, volumes, and templates. When set as 'true', ACS will use protocol HTTPS, otherwise, it will use protocol HTTP. Default value is 'true'.",
59+
"Controls whether upload links for ISOs, volumes, and templates use HTTPS (true, default) or HTTP (false). After changing this setting, the Secondary Storage VM (SSVM) must be recreated",
6060
true,
61-
ConfigKey.Scope.StoragePool);
61+
ConfigKey.Scope.Zone);
6262

6363
/**
6464
* Creates the database object for a volume based on the given criteria

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

0 commit comments

Comments
 (0)