Merge release branch 4.13 to master

* 4.13:
  Fixed guest vlan range going missing when using zone wizzard (#4042)
  Volume migration (#4043)
This commit is contained in:
Daan Hoogland 2020-04-23 20:19:30 +02:00
commit 689e529d7b
2 changed files with 7 additions and 6 deletions

View File

@ -348,8 +348,9 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
// directly to s3
ImageStoreEntity imageStore = (ImageStoreEntity)dataStoreMgr.getImageStoreWithFreeCapacity(destScope.getScopeId());
if (imageStore == null || !imageStore.getProtocol().equalsIgnoreCase("nfs") && !imageStore.getProtocol().equalsIgnoreCase("cifs")) {
s_logger.debug("can't find a nfs (or cifs) image store to satisfy the need for a staging store");
return null;
String errMsg = "can't find a nfs (or cifs) image store to satisfy the need for a staging store";
Answer answer = new Answer(null, false, errMsg);
return answer;
}
DataObject objOnImageStore = imageStore.create(srcData);

View File

@ -4173,7 +4173,7 @@
} else if (args.data.returnedZone.networktype == "Advanced") { //update VLAN in physical network(s) in advanced zone
var physicalNetworksHavingGuestIncludingVlan = [];
$(args.data.physicalNetworks).each(function() {
if (this.guestConfiguration != null && this.guestConfiguration.vlanRangeStart != null && this.guestConfiguration.vlanRangeStart.length > 0) {
if (args.data.guestTraffic != null && args.data.guestTraffic.vlanRangeStart != null && args.data.guestTraffic.vlanRangeStart.length > 0) {
physicalNetworksHavingGuestIncludingVlan.push(this);
}
});
@ -4186,10 +4186,10 @@
var updatedCount = 0;
$(physicalNetworksHavingGuestIncludingVlan).each(function() {
var vlan;
if (this.guestConfiguration.vlanRangeEnd == null || this.guestConfiguration.vlanRangeEnd.length == 0)
vlan = this.guestConfiguration.vlanRangeStart;
if (args.data.guestTraffic.vlanRangeEnd == null || args.data.guestTraffic.vlanRangeEnd.length == 0)
vlan = args.data.guestTraffic.vlanRangeStart;
else
vlan = this.guestConfiguration.vlanRangeStart + "-" + this.guestConfiguration.vlanRangeEnd;
vlan = args.data.guestTraffic.vlanRangeStart + "-" + args.data.guestTraffic.vlanRangeEnd;
var originalId = this.id;
var returnedId;