cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-9165) unable to use reserved IP range in a network for external VMs
Date Mon, 25 Jan 2016 04:51:39 GMT


ASF GitHub Bot commented on CLOUDSTACK-9165:

Github user alexandrelimassantana commented on the pull request:
    Hello, there is also something bugging me with this piece of code which appears on the
changed files:
    final String gatewayCidr = guestNetwork.getNetworkCidr() == null ? guestNetwork.getCidr()
: guestNetwork.getNetworkCidr();
    First, it is repeated code, which could turn into a function in the superclass, since
VirtualNetworkApplianceManagerImpl and NetworkHelpImpl are implementation classes.
    Also, you are calling the function getNetworkCidr twice in the event of it's return value
not being null. It's both confusing and not efficient. You could try writing a separate method
for the purpose of correctly setting this variable, such as:
    protected String getValidGatewayCidr(){
        String gatewayCidr = guestNetwork.getNetworkCidr();
        return gatewayCidr == null ? guestNetwork.getCidr() : null;
    These changes would make the code more understandable, provided that you could write javadocs
on these pieces of code.

> unable to use reserved IP range in a network for external VMs
> -------------------------------------------------------------
>                 Key: CLOUDSTACK-9165
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: sudharma jain

This message was sent by Atlassian JIRA

View raw message