Add NMap tool for getting IP.

In some condition, vm may have fixed IP, but tcpdump couldn't get it until some packaged sent.
So can we start another tool 'nmap' parallel when tcpdump is working?
Following codes are simple description of this tool, just for hints. :)  

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>

On 12/11/2014 05:44 PM, Fergus Yu wrote:
>
> In virttest/virt_vm.py
> <https://github.com/autotest/virt-test/pull/1861#discussion-diff-21666123>:
>
> > @@ -912,7 +929,7 @@ def login(self, nic_index=0, timeout=LOGIN_TIMEOUT,
> >          linesep = eval("'%s'" % self.params.get("shell_linesep", r"\n"))
> >          client = self.params.get("shell_client")
> >          neigh_attach_if = ""
> > -        address = self.get_address(nic_index)
> > +        address = self.wait_for_get_address(nic_index, timeout)
>
> Hey, @FengYang <https://github.com/FengYang>, I found there was no
> timeout for self.login to get VM's address in ff5a257..84e6e20 .
> But in the scene that vm‘s booting time is long enough or vm is
> running(no tcpdump info for vm),
>
We have login() and wait_for_login() function. So login() should be one
time try function.  I think we'd better do not Call wait_for_* function
in a one time function. Or many timeout mix together make the timeout
longer than what we set in wait_for_login(). We do not know what is the
actual timeout for wait_for_login.  It even fail our login sometimes.
>
> we will miss the get_address if serial is not configured in this one
> time addressing.
>
As we always call login in wait_for_login(). If get_address() did not
return in one call. It could try again in another call for login.
wait_for_login() will call login many times. It should not fail our login.

The idea is try to make wait_for_login() return after setting timeout
Seconds.


> So, I think a timeout for getting address is essential, what's your idea?
> Maybe we can think about renovating wait_for_get_address to save
> waited time instead of do once checking.
>




 
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/autotest/virt-test/pull/1861/files#r21666123>.
>