change ipv6 format to pass on postgresql

postgresql recently moved to storing ip addresses as native types.
The problem being that we send down some slightly unnatural looking
IPv6 strings, so when we return them our simple comparitors fail.

Converting this to a more IPv6 natural definition makes it pass with
postgresql.

Fixes bug #1101645

Change-Id: I282eb7e873d824e7c03923c2200bbe1e2d0bbada
Fix PEP8 compliance problems

This patch fixes some pep8 compliance issues. Looks like either some new
checking has been added recently or its suddenly covering more files, but its
picking up new pep8 failures now.

Change-Id: I80a3509ed17d6ff49517bd1cffb636e48ec7351a
Merge "change ipv6 format to pass on postgresql"