Statistics
| Branch: | Tag: | Revision:

root / lib / netutils.py @ 29e8788e

History | View | Annotate | Download (13.6 kB)

# Date Author Comment
17f7fd27 08/23/2010 02:58 pm Manuel Franceschini

Fix a few epydoc docstrings

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

981732fb 08/23/2010 01:31 pm Manuel Franceschini

Make family argument in FormatAddress optional

By doing this we delegate the task of finding the correct address family
to the FormatAddress method.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

f3044516 08/20/2010 02:10 pm Manuel Franceschini

Make Hostname object always intialize its name to fqdn

This patch restores the behaviour of Hostname (previously known as
HostInfo) to always use fqdn. This was broken due to the fact that the
now used getaddrinfo does not return an fqdn in contrast to
gethostbyname_ex()....

b43dcc5a 08/19/2010 12:44 pm Manuel Franceschini

Support IPv6 node add

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

e7b3ad26 08/19/2010 12:41 pm Manuel Franceschini

netutils: make re class attribute and catch IndexError

These missing changes were initially agreed upon but then forgotten.
First, we move the valid name regex to the class-level such that it
won't be compiled for every invocation of GetIP() and we wrap the result...

7845b8c8 08/18/2010 04:07 pm Manuel Franceschini

Fix some small newline style issues

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

1a8337f2 08/18/2010 11:28 am Manuel Franceschini

rapi.client, http.client: Format url correctly when using IPv6

This patch moves the FormatAddress helper function from daemon.py to
netutils.py. This enables its use in http.client as well as in
rapi.client. Furthermore this adds functionality to format IPv6...

b705c7a6 08/18/2010 11:27 am Manuel Franceschini

Support for resolving hostnames to IPv6 addresses

This patch enables IPv6 name resolution by using socket.getaddrinfo
instead of socket.gethostbyname_ex.

It renames the HostInfo class to Hostname and unifies its use throughout
the code. This is achieved by using static calls where no object is...

8b312c1d 08/18/2010 11:26 am Manuel Franceschini

Introduce new IPAddress classes

This patch unifies the netutils functions dealing with IP addresses to
three classes:
- IPAddress: Common IP address functionality
- IPv4Address: IPv4 specific functionality
- IPv6address: IPv6-specific functionality

Furthermore it adds methods to check whether an address is a loopback...

a744b676 07/09/2010 04:37 pm Manuel Franceschini

Introduce lib/netutils.py

This patch moves network utility functions to a dedicated module.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>