diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 1c303ad7f25..e6a95f41f0c 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -2639,7 +2639,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra && !_networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SourceNat))); if (cidr == null && ip6Cidr == null && cidrRequired) { if (ntwkOff.getGuestType() == GuestType.Shared) { - throw new InvalidParameterValueException("StartIp/endIp/gateway/netmask are required when create network of" + " type " + Network.GuestType.Shared); + throw new InvalidParameterValueException(String.format("Gateway/netmask are required when creating %s networks.", Network.GuestType.Shared)); } else { throw new InvalidParameterValueException("gateway/netmask are required when create network of" + " type " + GuestType.Isolated + " with service " + Service.SourceNat.getName() + " disabled"); } diff --git a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java index f1bc6813538..53a2f31f6a4 100644 --- a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java @@ -1249,8 +1249,8 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C } } - boolean ipv4 = true, ipv6 = false; - if (startIP != null) { + boolean ipv4 = false, ipv6 = false; + if (org.apache.commons.lang3.StringUtils.isNoneBlank(gateway, netmask)) { ipv4 = true; } if (StringUtils.isNoneBlank(ip6Cidr, ip6Gateway)) { @@ -1294,14 +1294,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C } else if (!NetUtils.isValidIp4(endIP)) { throw new InvalidParameterValueException("Invalid format for the endIp parameter"); } - } - - if (startIP != null && endIP != null) { if (!(gateway != null && netmask != null)) { throw new InvalidParameterValueException("gateway and netmask should be defined when startIP/endIP are passed in"); } } - if (gateway != null && netmask != null) { if (NetUtils.isNetworkorBroadcastIP(gateway, netmask)) { if (s_logger.isDebugEnabled()) { @@ -1335,6 +1331,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C if(StringUtils.isAllBlank(zone.getIp6Dns1(), zone.getIp6Dns2())) { throw new InvalidParameterValueException("Can only create IPv6 network if the zone has IPv6 DNS! Please configure the zone IPv6 DNS1 and/or IPv6 DNS2."); } + + if (!ipv4 && ntwkOff.getGuestType() == GuestType.Shared && _networkModel.isProviderForNetworkOffering(Provider.VirtualRouter, networkOfferingId)) { + throw new InvalidParameterValueException("Currently IPv6-only Shared network with Virtual Router provider is not supported."); + } } validateRouterIps(routerIp, routerIpv6, startIP, endIP, gateway, netmask, startIPv6, endIPv6, ip6Cidr); diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java index 93d8b6e2d9d..76da7e5d250 100644 --- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java @@ -2654,6 +2654,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir Map customParameters = new HashMap<>(); customParameters.put(VmDetailConstants.CPU_NUMBER, String.valueOf(newCpu)); customParameters.put(VmDetailConstants.MEMORY, String.valueOf(newMemory)); + customParameters.put(VmDetailConstants.CPU_SPEED, details.get(VmDetailConstants.CPU_SPEED)); validateCustomParameters(svcOffering, customParameters); } if (VirtualMachineManager.ResourceCountRunningVMsonly.value()) { diff --git a/ui/src/store/getters.js b/ui/src/store/getters.js index b3734d6ffe4..f6489ee6e35 100644 --- a/ui/src/store/getters.js +++ b/ui/src/store/getters.js @@ -30,6 +30,7 @@ const getters = { userInfo: state => state.user.info, addRouters: state => state.permission.addRouters, multiTab: state => state.app.multiTab, + listAllProjects: state => state.app.listAllProjects, headerNotices: state => state.user.headerNotices, isLdapEnabled: state => state.user.isLdapEnabled, cloudian: state => state.user.cloudian, diff --git a/ui/src/store/modules/app.js b/ui/src/store/modules/app.js index eff828d33ce..90be53bd97a 100644 --- a/ui/src/store/modules/app.js +++ b/ui/src/store/modules/app.js @@ -46,6 +46,7 @@ const app = { inverted: true, multiTab: true, metrics: false, + listAllProjects: false, server: '' }, mutations: { @@ -99,6 +100,9 @@ const app = { SET_METRICS: (state, bool) => { state.metrics = bool }, + SET_LIST_ALL_PROJECTS: (state, bool) => { + state.listAllProjects = bool + }, SET_USE_BROWSER_TIMEZONE: (state, bool) => { Vue.ls.set(USE_BROWSER_TIMEZONE, bool) state.usebrowsertimezone = bool @@ -151,6 +155,9 @@ const app = { SetMetrics ({ commit }, bool) { commit('SET_METRICS', bool) }, + SetListAllProjects ({ commit }, bool) { + commit('SET_LIST_ALL_PROJECTS', bool) + }, SetUseBrowserTimezone ({ commit }, bool) { commit('SET_USE_BROWSER_TIMEZONE', bool) }, diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 4c128a78090..35c65ca46af 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -39,6 +39,13 @@ :un-checked-children="$t('label.metrics')" :checked="$store.getters.metrics" @change="(checked, event) => { $store.dispatch('SetMetrics', checked) }"/> +