Skip to content

Commit be2994d

Browse files
committed
Merge branch 'main' of https://github.com/apache/cloudstack into clvm-enhancements
2 parents 34b0729 + ed575cc commit be2994d

File tree

143 files changed

+9042
-534
lines changed

Some content is hidden

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

143 files changed

+9042
-534
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
/plugins/storage/volume/linstor @rp-
1919
/plugins/storage/volume/storpool @slavkap
20+
/plugins/storage/volume/ontap @rajiv1 @sandeeplocharla @piyush5 @suryag
2021

2122
.pre-commit-config.yaml @jbampton
2223
/.github/linters/ @jbampton

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
7272
import org.apache.cloudstack.config.Configuration;
7373
import org.apache.cloudstack.config.ConfigurationGroup;
74-
import org.apache.cloudstack.framework.config.ConfigKey;
7574

7675
import com.cloud.alert.Alert;
7776
import com.cloud.capacity.Capacity;
@@ -108,14 +107,6 @@
108107
public interface ManagementService {
109108
static final String Name = "management-server";
110109

111-
ConfigKey<Boolean> JsInterpretationEnabled = new ConfigKey<>("Hidden"
112-
, Boolean.class
113-
, "js.interpretation.enabled"
114-
, "false"
115-
, "Enable/Disable all JavaScript interpretation related functionalities to create or update Javascript rules."
116-
, false
117-
, ConfigKey.Scope.Global);
118-
119110
/**
120111
* returns the a map of the names/values in the configuration table
121112
*
@@ -534,6 +525,4 @@ VirtualMachine upgradeSystemVM(ScaleSystemVMCmd cmd) throws ResourceUnavailableE
534525

535526
boolean removeManagementServer(RemoveManagementServerCmd cmd);
536527

537-
void checkJsInterpretationAllowedIfNeededForParameterValue(String paramName, boolean paramValue);
538-
539528
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ User createUser(String userName, String password, String firstName, String lastN
138138

139139
Long finalizeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
140140

141+
Long finalizeAccountId(Long accountId, String accountName, Long domainId, Long projectId);
142+
141143
/**
142144
* returns the user account object for a given user id
143145
* @param userId user id

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class ApiConstants {
2020
public static final String ACCOUNT = "account";
2121
public static final String ACCOUNTS = "accounts";
2222
public static final String ACCOUNT_NAME = "accountname";
23+
public static final String ACCOUNT_STATE_TO_SHOW = "accountstatetoshow";
2324
public static final String ACCOUNT_TYPE = "accounttype";
2425
public static final String ACCOUNT_ID = "accountid";
2526
public static final String ACCOUNT_IDS = "accountids";

api/src/main/java/org/apache/cloudstack/storage/volume/VolumeImportUnmanageService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public interface VolumeImportUnmanageService extends PluggableService, Configura
3737
Arrays.asList(Hypervisor.HypervisorType.KVM, Hypervisor.HypervisorType.VMware);
3838

3939
List<Storage.StoragePoolType> SUPPORTED_STORAGE_POOL_TYPES_FOR_KVM = Arrays.asList(Storage.StoragePoolType.NetworkFilesystem,
40-
Storage.StoragePoolType.Filesystem, Storage.StoragePoolType.RBD);
40+
Storage.StoragePoolType.Filesystem, Storage.StoragePoolType.RBD, Storage.StoragePoolType.SharedMountPoint);
4141

4242
ConfigKey<Boolean> AllowImportVolumeWithBackingFile = new ConfigKey<>(Boolean.class,
4343
"allow.import.volume.with.backing.file",

client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@
121121
<artifactId>cloud-plugin-storage-volume-adaptive</artifactId>
122122
<version>${project.version}</version>
123123
</dependency>
124+
<dependency>
125+
<groupId>org.apache.cloudstack</groupId>
126+
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
127+
<version>${project.version}</version>
128+
</dependency>
124129
<dependency>
125130
<groupId>org.apache.cloudstack</groupId>
126131
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>

core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import com.cloud.utils.Pair;
5353
import com.cloud.utils.UriUtils;
5454
import com.cloud.utils.exception.CloudRuntimeException;
55+
import com.cloud.utils.net.HttpClientCloudStackUserAgent;
5556
import com.cloud.utils.net.Proxy;
5657

5758
/**
@@ -125,6 +126,7 @@ private GetMethod createRequest(String downloadUrl) {
125126
GetMethod request = new GetMethod(downloadUrl);
126127
request.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, myretryhandler);
127128
request.setFollowRedirects(followRedirects);
129+
request.getParams().setParameter(HttpMethodParams.USER_AGENT, HttpClientCloudStackUserAgent.CLOUDSTACK_USER_AGENT);
128130
return request;
129131
}
130132

core/src/main/java/com/cloud/storage/template/MetalinkTemplateDownloader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
//
1919
package com.cloud.storage.template;
2020

21+
2122
import com.cloud.storage.StorageLayer;
2223
import com.cloud.utils.UriUtils;
24+
import com.cloud.utils.net.HttpClientCloudStackUserAgent;
25+
2326
import org.apache.commons.httpclient.HttpClient;
2427
import org.apache.commons.httpclient.HttpMethod;
2528
import org.apache.commons.httpclient.HttpMethodRetryHandler;
@@ -59,6 +62,7 @@ protected GetMethod createRequest(String downloadUrl) {
5962
GetMethod request = new GetMethod(downloadUrl);
6063
request.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, myretryhandler);
6164
request.setFollowRedirects(followRedirects);
65+
request.getParams().setParameter(HttpMethodParams.USER_AGENT, HttpClientCloudStackUserAgent.CLOUDSTACK_USER_AGENT);
6266
if (!toFileSet) {
6367
String[] parts = downloadUrl.split("/");
6468
String filename = parts[parts.length - 1];

core/src/main/java/com/cloud/storage/template/SimpleHttpMultiFileDownloader.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.apache.commons.lang3.StringUtils;
4545

4646
import com.cloud.storage.StorageLayer;
47+
import com.cloud.utils.net.HttpClientCloudStackUserAgent;
4748

4849
public class SimpleHttpMultiFileDownloader extends ManagedContextRunnable implements TemplateDownloader {
4950
private static final MultiThreadedHttpConnectionManager s_httpClientManager = new MultiThreadedHttpConnectionManager();
@@ -95,6 +96,7 @@ private GetMethod createRequest(String downloadUrl) {
9596
GetMethod request = new GetMethod(downloadUrl);
9697
request.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, retryHandler);
9798
request.setFollowRedirects(followRedirects);
99+
request.getParams().setParameter(HttpMethodParams.USER_AGENT, HttpClientCloudStackUserAgent.CLOUDSTACK_USER_AGENT);
98100
return request;
99101
}
100102

@@ -141,6 +143,7 @@ private void tryAndGetTotalRemoteSize() {
141143
continue;
142144
}
143145
HeadMethod headMethod = new HeadMethod(downloadUrl);
146+
headMethod.getParams().setParameter(HttpMethodParams.USER_AGENT, HttpClientCloudStackUserAgent.CLOUDSTACK_USER_AGENT);
144147
try {
145148
if (client.executeMethod(headMethod) != HttpStatus.SC_OK) {
146149
continue;

core/src/main/java/org/apache/cloudstack/backup/RestoreBackupCommand.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class RestoreBackupCommand extends Command {
3434
private List<String> backupVolumesUUIDs;
3535
private List<PrimaryDataStoreTO> restoreVolumePools;
3636
private List<String> restoreVolumePaths;
37+
private List<Long> restoreVolumeSizes;
3738
private List<String> backupFiles;
3839
private String diskType;
3940
private Boolean vmExists;
@@ -92,6 +93,14 @@ public void setRestoreVolumePaths(List<String> restoreVolumePaths) {
9293
this.restoreVolumePaths = restoreVolumePaths;
9394
}
9495

96+
public List<Long> getRestoreVolumeSizes() {
97+
return restoreVolumeSizes;
98+
}
99+
100+
public void setRestoreVolumeSizes(List<Long> restoreVolumeSizes) {
101+
this.restoreVolumeSizes = restoreVolumeSizes;
102+
}
103+
95104
public List<String> getBackupFiles() {
96105
return backupFiles;
97106
}

0 commit comments

Comments
 (0)