cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...
Date Wed, 07 Sep 2016 03:32:30 GMT
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755606
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -922,10 +921,56 @@ public boolean release(final Network network, final NicProfile nic,
final Virtua
             return true;
         }
     
    +
         @Override
         public boolean configDhcpSupportForSubnet(final Network network, final NicProfile
nic, final VirtualMachineProfile vm, final DeployDestination dest,
    -            final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException,
ResourceUnavailableException {
    -        if (canHandle(network, Service.Dhcp)) {
    +                                              final ReservationContext context) throws
ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException
{
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean configDnsSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile
vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
InsufficientCapacityException, ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp,
getProvider())) {
    +            return true;
    +        } else {
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dns);
    +        }
    +    }
    +
    +    @Override
    +    public boolean removeDhcpSupportForSubnet(final Network network) throws ResourceUnavailableException
{
    +        return deleteDhcpSupportForSubnet(network, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean removeDnsSupportForSubnet(Network network) throws ResourceUnavailableException
{
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp,
getProvider())) {
    +            return true;
    +        } else {
    +            return deleteDhcpSupportForSubnet(network, Service.Dns);
    +        }
    +    }
    +
    +    @Override
    +    public boolean addDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile
vm, final DeployDestination dest, final ReservationContext context)
    +            throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException
{
    +        return applyDhcpEntries(network, nic, vm, dest, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean addDnsEntry(Network network, NicProfile nic, VirtualMachineProfile
vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
InsufficientCapacityException, ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp,
getProvider())) {
    +            return true;
    +        } else {
    --- End diff --
    
    This ``else`` block is unnecessary since the ``if`` block returns.  Please remove it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message