Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r76991083
  
    --- Diff: 
plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
 ---
    @@ -242,6 +249,40 @@ public void reserve(NicProfile nic, Network network, 
VirtualMachineProfile vm, D
                     throw new IllegalStateException("The broadcast URI path " 
+ network.getBroadcastUri() + " is empty or in an incorrect format.");
                 }
     
    +            HostVO nuageVspHost = 
getNuageVspHost(network.getPhysicalNetworkId());
    +            VspNetwork vspNetwork = 
_nuageVspEntityBuilder.buildVspNetwork(network, false);
    +
    +            // Set flags for dhcp options
    +            boolean networkHasDns = networkHasDns(network);
    +            Boolean defaultHasDns = null;
    +            // Determine if dhcp options of the other nics in the network 
need to be updated
    +            if (VirtualMachine.Type.DomainRouter.equals(vm.getType()) && 
!State.Implementing.equals(network.getState())) {
    +                // Update dhcp options if a VR is added when we are not 
initiating the network
    +                s_logger.debug(String.format("DomainRouter is added to an 
existing network: %s in state: %s", network.getName(), network.getState()));
    +                List<VspDhcpVMOption> dhcpOptions = Lists.newArrayList();
    +                for (NicVO userNic 
:_nicDao.listByNetworkId(network.getId())){
    +                    if 
(!VirtualMachine.Type.DomainRouter.equals(userNic.getVmType())) {
    +                        // Dhcp options for Domain router are handled later
    +                        VMInstanceVO userVm  = 
_vmInstanceDao.findById(userNic.getInstanceId());
    --- End diff --
    
    It is not necessary to fetch the vm here, as only the id is used.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to