Fixes "bad format" in replicator for valid hosts

Due to a bad regex, the glance-replicator tool rejects any source or
target host:port combination that contains a period. As a result, only
hostnames without periods can be used.

This fix expands the host/port checks to:
  - allow periods in hostnames
  - allow and verify IPv6 addr/port pairs (i.e., [fe80::f00d:face]:1234)
  - allow and verify IPv4 addr/port pairs (i.e., 172.17.17.2:1234)
  - sanity-check port numbers

This also includes extensive tests for each component of the parsing,
and adds network_utils to openstack-common.conf.

Change-Id: I94fdd7a57a4cb0aa5d79f66d68be159d1f1266d1
Closes-Bug: #1216247
Merge "Fixes "bad format" in replicator for valid hosts"
Fixes installation of test-requirements

pip install fails because the "-f http...pysendfile.2.0.0.tar.gz"
returns 404. pip will install pysendfile 2.0.0 without defining
the url.

Ref: http://code.google.com/p/pysendfile/issues/detail?id=20&can=1

Closes bug 1314968

Change-Id: I15baf378b37841f8abb21294efebe2dee95077c3
Prevent creation of http images with invalid URIs

Active images should always be ready to be downloaded, regardless
they're locally or remotely stored. This patch prevents images with
invalid location URIs from being created and entering the 'active'
state with no data. This is only for the HTTP store.

Closes-Bug: #1257273
Co-authored: Jon Bernard <jobernar@redhat.com>
Change-Id: Iffce79b654cabe8397c85b2cc50c4b7f59733ea5
Replace unicode() for six.text_type

To support Python3, unicode() calls has been replaced by
six.text_type.
Added utils.exception_to_str(): is the proper way to convert
an exception to string, since it manages logic related to
encoding.

Change-Id: I27101390e4f95e5c7690b1b445b7e75b8bcb9a08
Closes-Bug: #1284677
Ensures that task.message is of type unicode

It is likely that a task script might store the message in a format
which is not 'Text', like a json message. To ensure that we save the
task message in the appropriate format, we should typecast it.

partially implements bp async-glance-workers

Change-Id: I4eaebb75357d448d4ea458cd7fe5e4ac96b33ace
Merge "Replace unicode() for six.text_type"