Skip to content

Commit 5220a3e

Browse files
committed
Merge remote-tracking branch 'apache/main' into feature-sync-ext
2 parents 02c87ea + ffb8b91 commit 5220a3e

File tree

150 files changed

+5139
-1678
lines changed

Some content is hidden

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

150 files changed

+5139
-1678
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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ public class EventTypes {
583583

584584
// Network ACL
585585
public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE";
586+
public static final String EVENT_NETWORK_ACL_IMPORT = "NETWORK.ACL.IMPORT";
586587
public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE";
587588
public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE";
588589
public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE";

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/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/org/apache/cloudstack/alert/AlertService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ private AlertType(short type, String name, boolean isDefault) {
7171
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true);
7272
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true);
7373
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
74-
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true);
75-
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true);
74+
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true);
75+
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "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);
7777
public static final AlertType ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS = new AlertType((short)34, "ALERT.S2S.VPN.GATEWAY.OBSOLETE.PARAMETERS", true);
7878
public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@
5050
RoleType[] authorized() default {};
5151

5252
Class<?>[] entityType() default {};
53+
54+
String httpMethod() default "";
5355
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public class ApiConstants {
282282
public static final String HOST = "host";
283283
public static final String HOST_CONTROL_STATE = "hostcontrolstate";
284284
public static final String HOSTS_MAP = "hostsmap";
285+
public static final String HTTP_REQUEST_TYPE = "httprequesttype";
285286
public static final String HYPERVISOR = "hypervisor";
286287
public static final String INLINE = "inline";
287288
public static final String INSTANCE = "instance";

api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
import com.cloud.exception.DiscoveryException;
3030
import com.cloud.storage.ImageStore;
3131
import com.cloud.user.Account;
32+
import org.apache.commons.collections.MapUtils;
33+
34+
import java.util.Collection;
35+
import java.util.HashMap;
36+
import java.util.Map;
3237

3338
@APICommand(name = "addSecondaryStorage", description = "Adds secondary storage.", responseObject = ImageStoreResponse.class,
3439
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
@@ -44,6 +49,9 @@ public class AddSecondaryStorageCmd extends BaseCmd {
4449
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the secondary storage")
4550
protected Long zoneId;
4651

52+
@Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].copytemplatesfromothersecondarystorages=true")
53+
protected Map details;
54+
4755
/////////////////////////////////////////////////////
4856
/////////////////// Accessors ///////////////////////
4957
/////////////////////////////////////////////////////
@@ -56,6 +64,20 @@ public Long getZoneId() {
5664
return zoneId;
5765
}
5866

67+
public Map<String, String> getDetails() {
68+
Map<String, String> detailsMap = new HashMap<>();
69+
if (MapUtils.isNotEmpty(details)) {
70+
Collection<?> props = details.values();
71+
for (Object prop : props) {
72+
HashMap<String, String> detail = (HashMap<String, String>) prop;
73+
for (Map.Entry<String, String> entry: detail.entrySet()) {
74+
detailsMap.put(entry.getKey(),entry.getValue());
75+
}
76+
}
77+
}
78+
return detailsMap;
79+
}
80+
5981
/////////////////////////////////////////////////////
6082
/////////////// API Implementation///////////////////
6183
/////////////////////////////////////////////////////
@@ -68,7 +90,7 @@ public long getEntityOwnerId() {
6890
@Override
6991
public void execute(){
7092
try{
71-
ImageStore result = _storageService.discoverImageStore(null, getUrl(), "NFS", getZoneId(), null);
93+
ImageStore result = _storageService.discoverImageStore(null, getUrl(), "NFS", getZoneId(), getDetails());
7294
ImageStoreResponse storeResponse = null;
7395
if (result != null ) {
7496
storeResponse = _responseGenerator.createImageStoreResponse(result);

api/src/main/java/org/apache/cloudstack/api/command/admin/offering/IsAccountAllowedToCreateOfferingsWithTagsCmd.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
import org.apache.cloudstack.api.response.IsAccountAllowedToCreateOfferingsWithTagsResponse;
2727

2828
@APICommand(name = "isAccountAllowedToCreateOfferingsWithTags", description = "Return true if the specified account is allowed to create offerings with tags.",
29-
responseObject = IsAccountAllowedToCreateOfferingsWithTagsResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
29+
responseObject = IsAccountAllowedToCreateOfferingsWithTagsResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
30+
httpMethod = "GET")
3031
public class IsAccountAllowedToCreateOfferingsWithTagsCmd extends BaseCmd {
3132

3233
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account UUID", required = true)

api/src/main/java/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public void execute() {
6363
response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize"));
6464
response.setRegionSecondaryEnabled((Boolean)capabilities.get("regionSecondaryEnabled"));
6565
response.setKVMSnapshotEnabled((Boolean)capabilities.get("KVMSnapshotEnabled"));
66+
response.setSnapshotShowChainSize((Boolean)capabilities.get("SnapshotShowChainSize"));
6667
response.setAllowUserViewDestroyedVM((Boolean)capabilities.get("allowUserViewDestroyedVM"));
6768
response.setAllowUserExpungeRecoverVM((Boolean)capabilities.get("allowUserExpungeRecoverVM"));
6869
response.setAllowUserExpungeRecoverVolume((Boolean)capabilities.get("allowUserExpungeRecoverVolume"));

0 commit comments

Comments
 (0)