mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix CLOUDSTACK-2061 Hitting java NPE in addNicToVirtualMachine api when trying to add a shared network to a VM
This commit is contained in:
parent
985b2aa88d
commit
dfbe11355c
@ -876,8 +876,8 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
|
|||||||
if (publicNetwork) {
|
if (publicNetwork) {
|
||||||
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
|
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
|
||||||
} else {
|
} else {
|
||||||
Long podId = dest.getPod().getId();
|
|
||||||
if (isPodBased) {
|
if (isPodBased) {
|
||||||
|
Long podId = dest.getPod().getId();
|
||||||
routers = _routerDao.listByNetworkAndPodAndRole(network.getId(), podId, Role.VIRTUAL_ROUTER);
|
routers = _routerDao.listByNetworkAndPodAndRole(network.getId(), podId, Role.VIRTUAL_ROUTER);
|
||||||
} else {
|
} else {
|
||||||
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
|
routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user