Skip to content

Commit 26f0bab

Browse files
author
Rene Glover
authored
Merge branch '4.19' into 4.19-fix-saml-account-selector
2 parents d61991f + a09c579 commit 26f0bab

File tree

279 files changed

+2812
-1396
lines changed

Some content is hidden

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

279 files changed

+2812
-1396
lines changed

agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.19.2.0-SNAPSHOT</version>
27+
<version>4.19.3.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.19.2.0-SNAPSHOT</version>
27+
<version>4.19.3.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

api/src/main/java/com/cloud/agent/api/to/RemoteInstanceTO.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class RemoteInstanceTO implements Serializable {
2727

2828
private Hypervisor.HypervisorType hypervisorType;
2929
private String instanceName;
30+
private String instancePath;
3031

3132
// VMware Remote Instances parameters (required for exporting OVA through ovftool)
3233
// TODO: cloud.agent.transport.Request#getCommands() cannot handle gsoc decode for polymorphic classes
@@ -44,9 +45,10 @@ public RemoteInstanceTO(String instanceName) {
4445
this.instanceName = instanceName;
4546
}
4647

47-
public RemoteInstanceTO(String instanceName, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) {
48+
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) {
4849
this.hypervisorType = Hypervisor.HypervisorType.VMware;
4950
this.instanceName = instanceName;
51+
this.instancePath = instancePath;
5052
this.vcenterHost = vcenterHost;
5153
this.vcenterUsername = vcenterUsername;
5254
this.vcenterPassword = vcenterPassword;
@@ -61,6 +63,10 @@ public String getInstanceName() {
6163
return this.instanceName;
6264
}
6365

66+
public String getInstancePath() {
67+
return this.instancePath;
68+
}
69+
6470
public String getVcenterUsername() {
6571
return vcenterUsername;
6672
}

api/src/main/java/com/cloud/exception/StorageAccessException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class StorageAccessException extends RuntimeException {
2727
private static final long serialVersionUID = SerialVersionUID.StorageAccessException;
2828

29-
public StorageAccessException(String message) {
30-
super(message);
29+
public StorageAccessException(String message, Exception causer) {
30+
super(message, causer);
3131
}
3232
}

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

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -135,34 +135,49 @@ public static enum TemplateType {
135135
ISODISK /* Template corresponding to a iso (non root disk) present in an OVA */
136136
}
137137

138+
public enum EncryptionSupport {
139+
/**
140+
* Encryption not supported.
141+
*/
142+
Unsupported,
143+
/**
144+
* Will use hypervisor encryption driver (qemu -> luks)
145+
*/
146+
Hypervisor,
147+
/**
148+
* Storage pool handles encryption and just provides an encrypted volume
149+
*/
150+
Storage
151+
}
152+
138153
public static enum StoragePoolType {
139-
Filesystem(false, true, true), // local directory
140-
NetworkFilesystem(true, true, true), // NFS
141-
IscsiLUN(true, false, false), // shared LUN, with a clusterfs overlay
142-
Iscsi(true, false, false), // for e.g., ZFS Comstar
143-
ISO(false, false, false), // for iso image
144-
LVM(false, false, false), // XenServer local LVM SR
145-
CLVM(true, false, false),
146-
RBD(true, true, false), // http://libvirt.org/storage.html#StorageBackendRBD
147-
SharedMountPoint(true, true, true),
148-
VMFS(true, true, false), // VMware VMFS storage
149-
PreSetup(true, true, false), // for XenServer, Storage Pool is set up by customers.
150-
EXT(false, true, false), // XenServer local EXT SR
151-
OCFS2(true, false, false),
152-
SMB(true, false, false),
153-
Gluster(true, false, false),
154-
PowerFlex(true, true, true), // Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
155-
ManagedNFS(true, false, false),
156-
Linstor(true, true, false),
157-
DatastoreCluster(true, true, false), // for VMware, to abstract pool of clusters
158-
StorPool(true, true, true),
159-
FiberChannel(true, true, false); // Fiber Channel Pool for KVM hypervisors is used to find the volume by WWN value (/dev/disk/by-id/wwn-<wwnvalue>)
154+
Filesystem(false, true, EncryptionSupport.Hypervisor), // local directory
155+
NetworkFilesystem(true, true, EncryptionSupport.Hypervisor), // NFS
156+
IscsiLUN(true, false, EncryptionSupport.Unsupported), // shared LUN, with a clusterfs overlay
157+
Iscsi(true, false, EncryptionSupport.Unsupported), // for e.g., ZFS Comstar
158+
ISO(false, false, EncryptionSupport.Unsupported), // for iso image
159+
LVM(false, false, EncryptionSupport.Unsupported), // XenServer local LVM SR
160+
CLVM(true, false, EncryptionSupport.Unsupported),
161+
RBD(true, true, EncryptionSupport.Unsupported), // http://libvirt.org/storage.html#StorageBackendRBD
162+
SharedMountPoint(true, true, EncryptionSupport.Hypervisor),
163+
VMFS(true, true, EncryptionSupport.Unsupported), // VMware VMFS storage
164+
PreSetup(true, true, EncryptionSupport.Unsupported), // for XenServer, Storage Pool is set up by customers.
165+
EXT(false, true, EncryptionSupport.Unsupported), // XenServer local EXT SR
166+
OCFS2(true, false, EncryptionSupport.Unsupported),
167+
SMB(true, false, EncryptionSupport.Unsupported),
168+
Gluster(true, false, EncryptionSupport.Unsupported),
169+
PowerFlex(true, true, EncryptionSupport.Hypervisor), // Dell EMC PowerFlex/ScaleIO (formerly VxFlexOS)
170+
ManagedNFS(true, false, EncryptionSupport.Unsupported),
171+
Linstor(true, true, EncryptionSupport.Storage),
172+
DatastoreCluster(true, true, EncryptionSupport.Unsupported), // for VMware, to abstract pool of clusters
173+
StorPool(true, true, EncryptionSupport.Hypervisor),
174+
FiberChannel(true, true, EncryptionSupport.Unsupported); // Fiber Channel Pool for KVM hypervisors is used to find the volume by WWN value (/dev/disk/by-id/wwn-<wwnvalue>)
160175

161176
private final boolean shared;
162177
private final boolean overProvisioning;
163-
private final boolean encryption;
178+
private final EncryptionSupport encryption;
164179

165-
StoragePoolType(boolean shared, boolean overProvisioning, boolean encryption) {
180+
StoragePoolType(boolean shared, boolean overProvisioning, EncryptionSupport encryption) {
166181
this.shared = shared;
167182
this.overProvisioning = overProvisioning;
168183
this.encryption = encryption;
@@ -177,6 +192,10 @@ public boolean supportsOverProvisioning() {
177192
}
178193

179194
public boolean supportsEncryption() {
195+
return encryption == EncryptionSupport.Hypervisor || encryption == EncryptionSupport.Storage;
196+
}
197+
198+
public EncryptionSupport encryptionSupportMode() {
180199
return encryption;
181200
}
182201
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ Snapshot takeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account acc
133133
Snapshot allocSnapshotForVm(Long vmId, Long volumeId, String snapshotName) throws ResourceAllocationException;
134134

135135
/**
136-
* Checks if the target storage supports the disk offering.
136+
* Checks if the storage pool supports the disk offering tags.
137137
* This validation is consistent with the mechanism used to select a storage pool to deploy a volume when a virtual machine is deployed or when a data disk is allocated.
138138
*
139139
* The scenarios when this method returns true or false is presented in the following table.
140140
* <table border="1">
141141
* <tr>
142-
* <th>#</th><th>Disk offering tags</th><th>Storage tags</th><th>Does the storage support the disk offering?</th>
142+
* <th>#</th><th>Disk offering diskOfferingTags</th><th>Storage diskOfferingTags</th><th>Does the storage support the disk offering?</th>
143143
* </tr>
144144
* <body>
145145
* <tr>
@@ -163,7 +163,7 @@ Snapshot takeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account acc
163163
* </body>
164164
* </table>
165165
*/
166-
boolean doesTargetStorageSupportDiskOffering(StoragePool destPool, String diskOfferingTags);
166+
boolean doesStoragePoolSupportDiskOfferingTags(StoragePool destPool, String diskOfferingTags);
167167

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

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class ApiConstants {
4646
public static final String BACKUP_OFFERING_NAME = "backupofferingname";
4747
public static final String BACKUP_OFFERING_ID = "backupofferingid";
4848
public static final String BASE64_IMAGE = "base64image";
49+
public static final String BATCH_SIZE = "batchsize";
4950
public static final String BITS = "bits";
5051
public static final String BOOTABLE = "bootable";
5152
public static final String BIND_DN = "binddn";
@@ -437,11 +438,12 @@ public class ApiConstants {
437438
public static final String STATE = "state";
438439
public static final String STATS = "stats";
439440
public static final String STATUS = "status";
440-
public static final String STORAGE_TYPE = "storagetype";
441-
public static final String STORAGE_POLICY = "storagepolicy";
442-
public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
443441
public static final String STORAGE_CAPABILITIES = "storagecapabilities";
444442
public static final String STORAGE_CUSTOM_STATS = "storagecustomstats";
443+
public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
444+
public static final String STORAGE_POLICY = "storagepolicy";
445+
public static final String STORAGE_POOL = "storagepool";
446+
public static final String STORAGE_TYPE = "storagetype";
445447
public static final String SUBNET = "subnet";
446448
public static final String OWNER = "owner";
447449
public static final String SWAP_OWNER = "swapowner";
@@ -1106,6 +1108,7 @@ public class ApiConstants {
11061108
public static final String PARAMETER_DESCRIPTION_IS_TAG_A_RULE = "Whether the informed tag is a JS interpretable rule or not.";
11071109

11081110
public static final String NFS_MOUNT_OPTIONS = "nfsmountopts";
1111+
public static final String VMWARE_DC = "vmwaredc";
11091112

11101113
/**
11111114
* This enum specifies IO Drivers, each option controls specific policies on I/O.

api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class HostResponse extends BaseResponseWithAnnotations {
152152
@Deprecated
153153
@SerializedName("memoryallocated")
154154
@Param(description = "the amount of the host's memory currently allocated")
155-
private long memoryAllocated;
155+
private Long memoryAllocated;
156156

157157
@SerializedName("memoryallocatedpercentage")
158158
@Param(description = "the amount of the host's memory currently allocated in percentage")
@@ -395,7 +395,7 @@ public void setMemWithOverprovisioning(String memWithOverprovisioning){
395395
this.memWithOverprovisioning=memWithOverprovisioning;
396396
}
397397

398-
public void setMemoryAllocated(long memoryAllocated) {
398+
public void setMemoryAllocated(Long memoryAllocated) {
399399
this.memoryAllocated = memoryAllocated;
400400
}
401401

@@ -659,8 +659,8 @@ public Long getMemoryTotal() {
659659
return memoryTotal;
660660
}
661661

662-
public long getMemoryAllocated() {
663-
return memoryAllocated;
662+
public Long getMemoryAllocated() {
663+
return memoryAllocated == null ? 0 : memoryAllocated;
664664
}
665665

666666
public void setMemoryAllocatedPercentage(String memoryAllocatedPercentage) {

api/src/main/java/org/apache/cloudstack/vm/UnmanagedInstanceTO.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public enum PowerState {
3333

3434
private String internalCSName;
3535

36+
private String path;
37+
3638
private PowerState powerState;
3739

3840
private PowerState cloneSourcePowerState;
@@ -75,6 +77,14 @@ public void setInternalCSName(String internalCSName) {
7577
this.internalCSName = internalCSName;
7678
}
7779

80+
public String getPath() {
81+
return path;
82+
}
83+
84+
public void setPath(String path) {
85+
this.path = path;
86+
}
87+
7888
public PowerState getPowerState() {
7989
return powerState;
8090
}

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.cloudstack</groupId>
2727
<artifactId>cloudstack</artifactId>
28-
<version>4.19.2.0-SNAPSHOT</version>
28+
<version>4.19.3.0-SNAPSHOT</version>
2929
</parent>
3030
<dependencies>
3131
<dependency>

0 commit comments

Comments
 (0)