Start adding support for v1.1

This patch adds basic support for the API version 1.1. It basically
re-uses the specs and implementations from v1 since the API hasn't
really changed much.

Future patches will add support for the new methods and other changes.

Partially-Implements blueprint: api-v1.1

Change-Id: I40d02d6c2d3b932725f35204708d79785f59116b
Send more than 1 message in messages_get_many

A bug in falcon prevented this test to be meaningful. That bug has been
fixed and now we can serialize several messages ids in a query
parameter.

Change-Id: Ida8d790fc6222c00b24e24a7a4c303d5b3d16351
Merge "Start adding support for v1.1"
Merge "Send more than 1 message in messages_get_many"
Merge "CLI support for queue existence and metadata operations"
Add support for bulk message delete in v1

Bulk message delete was missing in the client. This patch implements
that feature for both v1 and v1.1.

Change-Id: Ief73fe5f67ae71d396c6122048c26020ea9592bb
Add support for `pop` implemented in v1.1

This patch implements pop in the client library. Pop is a new operation
that has been implemented in v1.1. It allows a client to remove N
messages from the top of queue. Although pop is a query parameter in the
server, it has been implemented as if it were an action.

Partially-Implements blueprint: api-v1.1

Change-Id: I29b771a6167185033821139bd795311f1a25a5e1
Rename `shard` to `pool`

The server's shard feature has been renamed to pool. This patch reflects
that change in the client library. The patch keeps old `shard*` methods
and functions for backwards compatibility and it also raises a
deprecation warning whenever they are used. These functions will be
removed right after k-1

Change-Id: I842bfbcf075845750bc4fff345086636cc775371
Closes-bug: #1348196
Add support for flavor to the client library

This patch adds support for flavors to the client library. Flavors are
an admin endpoint, which means pool's rules apply to them.

Since flavors were added since 1.1, this patch also adds a version
decorator that will help making sure features are accessible just if the
api_version the client has been instantiated with matches the version
the feature was added into.

Note that the core module does not use the version decorator. There are
2 reasons for this:

    1. Users accessing the core module should know what they're doing
    2. If the transport loads the spec for the API version it was
    instantiated with. If that spec does not contain a specific action,
    the whole operation will fail before hitting the wire.

Partially-Implements blueprint: api-v1.1

Change-Id: I92dbe417655a9eeefb030481a81a67840a63dd0e
Fix functional tests

Do not append the version suffix to the URL. The request transport will
take care of that.

Change-Id: If5cd729ce2d2b28d9f8522cedaa15bea032b4a82
Use queue_creation to send queue's metadata

Since v1.1, the queue metadata is part of the queue endpoint. It has to
be set/updated by using the queue endpoint. The old set_metadata and
get_metadata endpoitns have been removed.

Partially-Implements blueprint: api-v1.1

Change-Id: I7b5b50529c4591701c62a1fa92dddbae9add6265
Respect queue's lazy creation

Queue's are now lazy resources. This patch removes the `auto_create`
keyword from the queue's constructor. Either posting a message to a
queue or setting its metadata will create the queue server side.

Partially-Implements blueprint: api-v1.1
Change-Id: I4f2f2f240404b2619ba0ee75a99fecd0ad10040e
Always pass a project_id

Since v1.1, the `X_PROJECT-ID` became a required header. This patch adds
a way to specify the project id regardless of the backend. In order to
pass the project id, it's necessary to pass the `os_project_id` option
in the `auth_opts` dictionary. For example:

  auth_opts = {'options': {'os_project_id': 'yadayada'}}

Partially-Implements blueprint: api-v1.1

Change-Id: If72b758e634dc1e6bc1e1cc0c63361e8a43861bb
Cleanup technical debt

* Unused variable
* Not necessary trailing /

Change-Id: I65c8801b44ff8870426a03fdab2710a67b8a20cc
Updated from global requirements

Change-Id: I7a933f1ab110f62a7c32862da61a83ec0521d147
CLI support for message CRUD operations

This patch extends the queues operation supported by the CLI.

Features added:
- List the messages
- Post a message
- Get one or set of messages
- Delete one or set of  messages

Some examples:
    $ openstack message list --queue_name test_queue
    $ openstack message post --queue_name test_queue --ttl 3600 \
        --body '{"name":"user1", "password":"pass"}'
    $ openstack message get --queue_name test_queue 7778899
    $ openstack message get-set --queue_name test_queue \
        778899 889900 990011
    $ openstack message delete --queue_name test_queue 779900
    $ openstack message delete-set --queue_name test_queue \
        778899 889900 990011

Change-Id: I5ebd153f32704e616fa78d388bf3d50f36c287fa
Partially-Implements: blueprint cli
CLI support for claim CRUD operations

This patch extends the queues operation supported by the CLI.

Features added:
- Create claim
- Query claim
- Update claim
- Release claim

Some examples:
    $ openstack claim create --queue_name test_queue --ttl 3600 \
        --grace 120
    $ openstack claim query --queue_name test_queue 7788990
    $ openstack claim update --queue_name test_queue --ttl 720 \
        7788990
    $ openstack claim release --queue_name test_queue 7788990

Change-Id: I610b1b236376e6be19014717dbe926d8a749198d
Partially-Implements: blueprint cli
Code refactor for bp/cli

Remove the duplicate code.

Partially-Implements: blueprint cli
Change-Id: Ib60f0e42f0640d84564255fe7508c669a78720f5
add queue in cli

Change-Id: I0a1a0f87e592ab1f8c70d092d27baefb7eac1ef3