History | View | Annotate | Download (20.8 kB)
Remove requirement that host names are FQDN
We currently require that hostnames are FQDN not short names(node1.example.com instead of node1). We can allow short names as longas: - we always resolve the names as returned by socket.gethostname() - we rely on having a working resolver...
Change resolved hostname from dict to a class
The current result of utils.LookupHostname() is a dict, but this doesnot allow static checkers to check the correctness of the code. Thispatch introduces a new class names HostInfo and changes LookupHostname...
Cleanup up selective imports for utils and utils unit test.
Reviewed-by: iustinp, imsnah
Added TcpPing to do ping-alike via TCP connect(2) with defined source address.To be used to replace the currently fping(8) based reachability test.
Reviewed-by: imsnah
Change the way how locales are overridden:- Set only LC_ALL, it overrides any other variable- Restore environment after unittest
Reviewed-by: iustinp
Filters out LANG and LC_* on RunCmd
This filters out the LANG and LC_ variables from the environment of programsexecuted by RunCmd, in order to get consistent output of execute programs likelvs, etc.
Add function to get all local IP addresses, will be used in cmdlib.py.
Reviewed-by: schreiberal
Switch utils.RunCmd from popen2 to subprocess
This changes the implementation of RunCmd from using the popen2 moduleto using the (new in 2.4) subprocess module.
This is helpful because the subprocess module has more advanced featuresthan popen2, the most important ones being the ability to run code in the...
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
Comment formatting updates.
Initial commit.