You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by daan Hoogland <da...@gmail.com> on 2014/08/14 11:01:13 UTC

Re: Review Request 23395: CLOUDSTACK-5663 :- Handled the NULL check for network's cidr field to avoid NPE for createNetwork and listNetwork

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23395/#review50566
-----------------------------------------------------------

Ship it!


adf7de9a95fb5a9d08d4c091e85469605ae2074a on master

- daan Hoogland


On July 24, 2014, 10:45 a.m., Girish Chaudhari wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23395/
> -----------------------------------------------------------
> 
> (Updated July 24, 2014, 10:45 a.m.)
> 
> 
> Review request for cloudstack, daan Hoogland and Parth Jagirdar.
> 
> 
> Bugs: CLOUDSTACK-5663
>     https://issues.apache.org/jira/browse/CLOUDSTACK-5663
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-5663 - API:MS: Network with NULL CIDR raises NPE for createNetwork and listNetwork
> 
> Root Cause:
> In the listNetworks and createNetworks API execution flow, existing networks analysed to check whether they can be used for deploy. In this step, all the available IPs are calculated using the Network CIDR. In case the CIDR is NULL it results into the NPE. 
> 
> Solution:
> Added the NULL check to avoid NPE, in case of NULL CIDR, API populate the "canusefordeploy" attribute as false.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/network/NetworkModelImpl.java 0ef5cb9 
> 
> Diff: https://reviews.apache.org/r/23395/diff/
> 
> 
> Testing
> -------
> 
> Tested on master for listNetworks and createNetwork command with NULL network cidr. 
> 
> 
> Thanks,
> 
> Girish Chaudhari
> 
>