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

    https://github.com/apache/cloudstack/pull/1578#discussion_r76991270
  
    --- Diff: 
plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java
 ---
    @@ -403,4 +448,25 @@ private HostVO getNuageVspHost(long physicalNetworkId) 
{
             }
             return nuageVspHost;
         }
    +
    +    private boolean networkHasDns(Network network) {
    +
    +        if (network != null) {
    +            List<String> dnsProvider = 
_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(network.getNetworkOfferingId(),
 Network.Service.Dns);
    +            if (dnsProvider.contains("VirtualRouter") || 
dnsProvider.contains("VpcVirtualRouter")) {
    +                return true;
    +            }
    +        }
    +        return false;
    +    }
    +
    +
    +    private NetworkVO getDefaultNetwork (long vmId) {
    +
    +        NicVO defaultNic = _nicDao.findDefaultNicForVM(vmId);
    +        if (defaultNic != null ) return 
_networkDao.findById(_nicDao.findById(defaultNic.getId()).getNetworkId());
    --- End diff --
    
    Not necessary to fetch the nic from DB twice.


---
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