'--public' ignored on image create

Currently, if '--public' is specified, an image is created but
it is not marked as public:

$ glance image-create --public --name minus-minus-public --disk-format raw \
 --container-format bare < /etc/fstab
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
.
.
.
| is_public        | False                                |
.
.
.
+------------------+--------------------------------------+

This is inconsistent.

'--public' has been deprecated for some time, and has
been removed from devstack (https://review.openstack.org/#/c/39323/),
so we can finally get rid of it.

We now raise the standard error for unsupported arguments.

Change-Id: I15d16f690f9bd92b4cefbc8ed36ed2d171ff22f3
Closes-bug: #1378844
Refactor method of constructing dicts in some tests

In some of the v2 tests, dictionaries are construed from lists of
tuples of length two. For example:

    dict([('visibility', 'private')])

There could be a very good reason for doing it that way, but it eludes
me. This patch replaces those with dictionary literals.

Change-Id: Ie9668bd681538ef41521f08a20cb8c3417ac91e8
Don't set X-Auth-Token key in http session header if no token provided

Commit f980fc549247fa2deb87dfacebc6d8d13ccd45d1 changed how the
X-Auth-Token header was scrubbed when logging the request, but
effectively made the value required which can lead to an AttributeError
if the value for the header is None.

The value can be None if you're using Nova but don't have Nova
configured with auth_strategy='keystone' (see
nova.image.glance._create_glance_client for details).

This patch simply checks if the auth_token is set in the http client
object and if not, it doesn't set the X-Auth-Token key in the session
header.

Closes-Bug: #1381295

Change-Id: Ie285d5253df28a9f0f964147a53c99ceaa919c5c
Add --property-filter option to v2 image-list

The option is present in the v1 shell, but missing from the v2 shell. This
allows the user to filter based on any image property.

Example:

    $ glance --os-image-api-version 2 image-list --property-filter os_distro=NixOS

DocImpact
Closes-Bug: #1383326

Change-Id: Ia65a08520e3eaf3ecd9b9018be9f6a8e2d3d4f0b
Merge "Add --property-filter option to v2 image-list"
Merge "'--public' ignored on image create"
Merge "Don't set X-Auth-Token key in http session header if no token provided"
Merge "Refactor method of constructing dicts in some tests"