Make strutils.mask_password more secure

Make some enhancements to strutils.mask_password to allow it to
catch more cases of passwords in strings.

The following is a listing of patterns that will be handled. The
keyword that mask_password uses (a list of four now) is represented
by <key> and the password is shown as <password>. Quotes (both single
and double) are represented as <quote>.

--<key> <password>
--<key> <quote><password><quote>
<key> = <password>
<key> = <quote><password><quote>

All existing tests and patterns are still handled.

Cherry-pick from review.openstack.org/113407
Partial-Bug: #1345233

Change-Id: I693baaf225c5b393401d499d14f271cadb63eb2c
Mask passwords in exceptions and error messages

When a ProcessExecutionError is thrown by processutils.execute(), the
exception may contain information such as password. Upstream
applications that just log the message (as several appear to do) could
inadvertently expose these passwords to a user with read access to the
log files. It is therefore considered prudent to invoke
strutils.mask_password() on the command, stdout and stderr in the
exception.

Cherry-pick from review.openstack.org/109417
Partial-Bug: #1343604

Change-Id: I9741dcdebdb4bed295ddc5ec4c4b117fffcfe88c
Make neutronapi use NetworkRequest for allocate_for_instance()

This makes the neutronapi code use the NetworkRequest object for
the allocate_for_instance() operation. It also prepares validate_networks()
by using the object internally, which will make it easier when we
actually start passing that from the caller.

Change-Id: I71c85ed4124e1e00b8c4c6d8dc02f2f280d69cfa
Change v3 quota-sets API to v2.1

This patch changes v3 quota-sets API to v2.1 and makes v2 unit tests
share between v2 and v2.1.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3 .

Partially implements blueprint v2-on-v3-api

Change-Id: I96377c2c5c02e00cb70eadde225f3e17d0e0025c
Add support for ipv6 nameservers

Update interfaces.template to support ipv6 based dns servers. Make
sure we validate the version of the ip addresses before we
fill them in.

Closes-Bug: #1355777

Change-Id: I7229656bfa5ff5a29c63befc3b9ce91c46e04723
Add user namespace support for libvirt-lxc

This change adds two config values that allow deployers
to enable user namespacing for libvirt-lxc containers.
User namespacing allows the mapping of uids and gids in
a container to separate uids and gids outside of the
container. The main advantage of this is to allow a
container's processes to appear to be running as root,
while actually running as a different user on the host.

Implements: bp libvirt-lxc-user-namespaces

DocImpact: This adds two config options to the libvirt
group, uid_maps and gid_maps. Default values are empty
strings and will leave user namespacing disabled for
libvirt-lxc containers.

Change-Id: I5f517f228b477f8238eccbb604b9ffd0ebaa5927
Add amd64 to arch.canonicalize()

Allows mapping 'amd64' to 'x86_64'.

Change-Id: I0b8a527bacc2d3b4308a1eb2ce3b6d1efd71e487
Closes-Bug: 1362699
Merge "Change v3 quota-sets API to v2.1"
Merge "Make neutronapi use NetworkRequest for allocate_for_instance()"
Merge "Add user namespace support for libvirt-lxc"
Merge "Make strutils.mask_password more secure"
Merge "Add amd64 to arch.canonicalize()"
Merge "Mask passwords in exceptions and error messages"
Merge "Add support for ipv6 nameservers"