Skip to content

Commit 0dbd761

Browse files
author
Daan Hoogland
committed
Merge branch '4.20'
2 parents 4d46bec + 61e74e0 commit 0dbd761

File tree

21 files changed

+258
-509
lines changed

21 files changed

+258
-509
lines changed

.github/workflows/ui.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
npm run test:unit
5757
5858
- uses: codecov/codecov-action@v4
59+
if: github.repository == 'apache/cloudstack'
5960
with:
6061
working-directory: ui
6162
files: ./coverage/lcov.info

api/src/main/java/com/cloud/storage/VolumeApiService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ Volume updateVolume(long volumeId, String path, String state, Long storageId,
171171
* </table>
172172
*/
173173
boolean doesStoragePoolSupportDiskOffering(StoragePool destPool, DiskOffering diskOffering);
174+
175+
/**
176+
* Checks if the storage pool supports the required disk offering tags
177+
* destPool the storage pool to check the disk offering tags
178+
* diskOfferingTags the tags that should be supported
179+
* return whether the tags are supported in the storage pool
180+
*/
174181
boolean doesStoragePoolSupportDiskOfferingTags(StoragePool destPool, String diskOfferingTags);
175182

176183
Volume destroyVolume(long volumeId, Account caller, boolean expunge, boolean forceExpunge);

core/src/main/java/com/cloud/agent/api/ConvertInstanceAnswer.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,13 @@
1616
// under the License.
1717
package com.cloud.agent.api;
1818

19-
import org.apache.cloudstack.vm.UnmanagedInstanceTO;
20-
2119
public class ConvertInstanceAnswer extends Answer {
2220

2321
private String temporaryConvertUuid;
2422

2523
public ConvertInstanceAnswer() {
2624
super();
2725
}
28-
private UnmanagedInstanceTO convertedInstance;
29-
30-
public ConvertInstanceAnswer(Command command, boolean success, String details) {
31-
super(command, success, details);
32-
}
33-
34-
public ConvertInstanceAnswer(Command command, UnmanagedInstanceTO convertedInstance) {
35-
super(command, true, "");
36-
this.convertedInstance = convertedInstance;
37-
}
3826

3927
public ConvertInstanceAnswer(Command command, String temporaryConvertUuid) {
4028
super(command, true, "");
@@ -44,8 +32,4 @@ public ConvertInstanceAnswer(Command command, String temporaryConvertUuid) {
4432
public String getTemporaryConvertUuid() {
4533
return temporaryConvertUuid;
4634
}
47-
48-
public UnmanagedInstanceTO getConvertedInstance() {
49-
return convertedInstance;
50-
}
5135
}

core/src/main/java/com/cloud/agent/api/ConvertInstanceCommand.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@
2020
import com.cloud.agent.api.to.RemoteInstanceTO;
2121
import com.cloud.hypervisor.Hypervisor;
2222

23-
import java.util.List;
24-
2523
public class ConvertInstanceCommand extends Command {
2624

2725
private RemoteInstanceTO sourceInstance;
2826
private Hypervisor.HypervisorType destinationHypervisorType;
29-
private List<String> destinationStoragePools;
3027
private DataStoreTO conversionTemporaryLocation;
3128
private String templateDirOnConversionLocation;
3229
private boolean checkConversionSupport;
@@ -36,12 +33,10 @@ public class ConvertInstanceCommand extends Command {
3633
public ConvertInstanceCommand() {
3734
}
3835

39-
public ConvertInstanceCommand(RemoteInstanceTO sourceInstance, Hypervisor.HypervisorType destinationHypervisorType,
40-
List<String> destinationStoragePools, DataStoreTO conversionTemporaryLocation,
36+
public ConvertInstanceCommand(RemoteInstanceTO sourceInstance, Hypervisor.HypervisorType destinationHypervisorType, DataStoreTO conversionTemporaryLocation,
4137
String templateDirOnConversionLocation, boolean checkConversionSupport, boolean exportOvfToConversionLocation) {
4238
this.sourceInstance = sourceInstance;
4339
this.destinationHypervisorType = destinationHypervisorType;
44-
this.destinationStoragePools = destinationStoragePools;
4540
this.conversionTemporaryLocation = conversionTemporaryLocation;
4641
this.templateDirOnConversionLocation = templateDirOnConversionLocation;
4742
this.checkConversionSupport = checkConversionSupport;
@@ -56,10 +51,6 @@ public Hypervisor.HypervisorType getDestinationHypervisorType() {
5651
return destinationHypervisorType;
5752
}
5853

59-
public List<String> getDestinationStoragePools() {
60-
return destinationStoragePools;
61-
}
62-
6354
public DataStoreTO getConversionTemporaryLocation() {
6455
return conversionTemporaryLocation;
6556
}

core/src/main/java/org/apache/cloudstack/direct/download/HttpsDirectTemplateDownloader.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939

4040
import javax.net.ssl.HttpsURLConnection;
4141
import javax.net.ssl.SSLContext;
42-
import javax.net.ssl.TrustManager;
4342

44-
import org.apache.cloudstack.utils.security.SSLUtils;
4543
import org.apache.commons.collections.MapUtils;
4644
import org.apache.commons.httpclient.HttpStatus;
4745
import org.apache.commons.io.IOUtils;
@@ -55,6 +53,7 @@
5553
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
5654
import org.apache.http.impl.client.CloseableHttpClient;
5755
import org.apache.http.impl.client.HttpClients;
56+
import org.apache.http.ssl.SSLContexts;
5857
import org.apache.http.util.EntityUtils;
5958

6059
import com.cloud.utils.Pair;
@@ -120,10 +119,10 @@ private SSLContext getSSLContext() {
120119
String password = "changeit";
121120
defaultKeystore.load(is, password.toCharArray());
122121
}
123-
TrustManager[] tm = HttpsMultiTrustManager.getTrustManagersFromKeyStores(customKeystore, defaultKeystore);
124-
SSLContext sslContext = SSLUtils.getSSLContext();
125-
sslContext.init(null, tm, null);
126-
return sslContext;
122+
return SSLContexts.custom()
123+
.loadTrustMaterial(customKeystore, null)
124+
.loadTrustMaterial(defaultKeystore, null)
125+
.build();
127126
} catch (KeyStoreException | NoSuchAlgorithmException | CertificateException | IOException | KeyManagementException e) {
128127
logger.error(String.format("Failure getting SSL context for HTTPS downloader, using default SSL context: %s", e.getMessage()), e);
129128
try {

core/src/main/java/org/apache/cloudstack/direct/download/HttpsMultiTrustManager.java

Lines changed: 0 additions & 102 deletions
This file was deleted.

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42000to42010.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ private void addIndexes(Connection conn) {
100100

101101
DbUpgradeUtils.addIndexIfNeeded(conn, "network_offering_details", "name");
102102

103-
DbUpgradeUtils.addIndexIfNeeded(conn, "network_offering_details", "resource_id", "resource_type");
104-
105103
DbUpgradeUtils.addIndexIfNeeded(conn, "service_offering", "cpu");
106104
DbUpgradeUtils.addIndexIfNeeded(conn, "service_offering", "speed");
107105
DbUpgradeUtils.addIndexIfNeeded(conn, "service_offering", "ram_size");

0 commit comments

Comments
 (0)