quality: Cleaning code (2/2)

2nd pass to clean code to let 'make quality' happy
{pxe|health}: Reporting git hash during boot

If edeploy pxe or health initrd got built on top of a git repo, let's
report the version during the boot.

This could avoid searching to solve already solved bugs... sometimes
only the ramfs didn't got rebuilt or not properly booted.

A typical output looks like:

 Info: Probing ipmi_devintf failed
 Info: Added fake IPMI device
 Required kernel modules for 3.2.0-4-amd64 x86_64 are : ata_piix,
 piix4_smbus, virtio-pci,
 Running eDeploy with git hash = 718aa6438dade62354c809b630a3171266054c41
 ################################################################
 Configuring system via server 10.0.2.2
 ################################################################
health: Don't run too big memory tests

While running the memory test, it's important checking that we are not
testing more than the available memory unless we'll face some OOMs.

All tests requiring too much memory will be ignored.
health: Let's print git rev before running tests

As per commit 4b861c39bab5b8029b6a59f6d257e8446960afe8, let's print the
git revision before running the tests.

It could be useful to determine what code is running.
health-check: Fixing MB/s detection

Prior this patch, we were changing B/s before MB/s leading to a trailing
'M'.

It's important removing MB and KB before removing B.
health-check: Let's do destructive tests first

destructive tests shall be done _before_ doing the read test to avoid
fake reads like VMware does. VMware considers that reading from a device
that never been wrote should get IOs from the memory and not from the
device.

Commiting writes first avoid this effect. Note that randread can remain
partially wrong and randomwrite are not obviously getting the same
pattern.
health-check: Quality commit

Let's make health-check much more flake compliant
grapher: Removing -r option in help

-r option is not supported, let's remove it
grapher: Quality commit

Applying flakes quality warnings
grapher: Adding epilog to documentation

Let's add a sample execution command at the end.
That could help some understanding how to use it.
grapher: Quality commit

Fixing stylish issue from models
grapher: Allow non-string items

When computing some values, grapher considered that everything was a
string while some where integers.

This patch insures that everything is turned into string.
detect & health-check: All values as string

Insure that all values as set as string to keep a consistency across
values.

This could be useful also for grapher to estimate that everything is the
same.
test_detect: Fixing tests for CPU

Commit 0ddcf42c4739cf172fe371d5de001e1be9abd3cc used strings for every
items. As thoses from tests didn't got updated, the self test was
failing.
health-check: Removing trailing space on IOPS
health-check: Fixing DDR detection

Some quality reworked broke some indent and turned this code as unused.
This patch make it work again by fixing the indent
health-check: Fixing broken commands for cpu tests

Some string got broken during quality rework preventing some multiple
CPU tests to be run properly.
netdetect: detect all servers before network bench

This commit add a new program to automize the detection of available
server to perform a network bench.

It features two parts :
- client side
It generates keepalive message on a multicast adress containing all it's
IP adresses taken from hw.py

- server side
Collects all the keepalive message and save server's name (mac address)
and it's associated IP adresses

If with miss 2 consecutive keepalive, the entry is deleted (that's the
scrubbing process)
If no changes occurs within a defined time, the discovery process is
over.

The first server that complete the detection send its server list to the
other to insure all servers have the same list.

A typical output is :
[root@localhost src]# ./netdetect.py hw.py
Sending keepalive for 00:21:cc:d9:bf:26
Adding 00:21:cc:d9:bf:26
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Adding d8:9d:67:1b:07:e4
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Received Keepalive from d8:9d:67:1b:07:e4
Adding d8:9d:67:1a:d0:fc
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Received Keepalive from d8:9d:67:1b:07:e4
Received Keepalive from d8:9d:67:1a:d0:fc
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Received Keepalive from d8:9d:67:1b:07:e4
Received Keepalive from d8:9d:67:1a:d0:fc
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Received Keepalive from d8:9d:67:1b:07:e4
Received Keepalive from d8:9d:67:1a:d0:fc
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Received Keepalive from d8:9d:67:1b:07:e4
Received Keepalive from d8:9d:67:1a:d0:fc
Sending keepalive for 00:21:cc:d9:bf:26
Received Keepalive from 00:21:cc:d9:bf:26
Received Keepalive from d8:9d:67:1b:07:e4
Received Keepalive from d8:9d:67:1a:d0:fc
About to send the synthesis
Exiting Client, end of discovery
Received Synthesis
End of Discovery with 3 systems!
Exiting server
Synthesis result
Server d8:9d:67:1b:07:e4 -> 10.66.6.136
Server d8:9d:67:1a:d0:fc -> 10.66.6.249
Server 00:21:cc:d9:bf:26 -> 192.168.1.185 10.152.18.104
detect: Adding ipv4 netmask and cidr value

If an IPV4 address got found, its usefull to report its netmask and cidr
representation to add more context.

This will be used by AHC mode to determine what network is the common
point between all servers.

A typical output is like :
 ('network', 'eth0', 'ipv4', '10.142.32.227'),
 ('network', 'eth0', 'ipv4-netmask', '255.255.255.0'),
 ('network', 'eth0', 'ipv4-cidr', '24'),
detect: Adding ipv4 network

It could be useful to get the network too.

A typical output is :
 ('network', 'eth0', 'ipv4-network', '10.142.32.0'),