> On Oct. 31, 2013, 8:29 a.m., Laszlo Hornyak wrote:
> > I haven't had a chance to test it yet, but I prefer this solution over my 
> > own patchset, since I was only trying to fix some broken functionality 
> > without radically changing the behavior.
> > One minor problem I see in there is that still lots of code in static 
> > initializer block, it is hard to write unit tests for it. I think we can 
> > solve that later.

I can't remove the static initialization atm but we can move the contents of 
the static block to a method findDefaultMacAddress that returns the MacAddress. 
 Then the static block would just be the assignment.  That should help with 
unit testing. I wasn't too sure how to unit test this code.  If you want to 
move around the code and see if you can write some tests that would be great.


- Darren


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


On Oct. 31, 2013, 12:18 a.m., Darren Shepherd wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15108/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2013, 12:18 a.m.)
> 
> 
> Review request for cloudstack, Alex Huang and Laszlo Hornyak.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> The MAC address is determined in the following order
> 
> 1. Look for MAC that matches interface of cluster.node.IP
> 2. Look for first interface alphabetically that has a non-linklocal address
> 3. Look for first interface alphabetically
> 4. Randomly generate a mac address
> 
> 
> Diffs
> -----
> 
>   utils/src/com/cloud/utils/net/MacAddress.java 15350c8 
> 
> Diff: https://reviews.apache.org/r/15108/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Darren Shepherd
> 
>

Reply via email to