examples: improve glance listing using ServiceCatalog

The GlanceListImages example is now using the ServiceCatalog returned
during the authentication to discover the glance endpoint.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
resteasy: use DefaultExecutor for ClientRequestFactory

Discover the ClientRequest DefaultExecutor instead of forcing the
ApacheHttpClient4Executor implementation.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
connectors: throw OpenStackNotAuthorized on auth failure

A new specific exception has been introduced to properly identify the
authorization errors with username/password and tokens.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
jersey2: support the empty server responses

Depending on whether we expect or not a responseType entity we should
use the appropriate method invocations.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
client: remove the unused guava dependency

The guava dependency is not used.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
access: remove specific tenants implementation

There's no need for a specific Tenant implementation inside the Access
model. The general entity can be used.
access: move out the token implementation

Token shouldn't be a specific model inside Access. The code has been
moved to a separate class.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
client: set the token header

The OpenStackRequest configuration of enpoint and token has been
moved at the end of the process (just before the actual REST call).
The commands are now able to create their own OpenStackRequest
without depending on newOpenStackRequest (which has been removed).
command: rename execute to getCommandRequest

For consistency the method previously called "execute" has been renamed
to "getCommandRequest" since in fact it just returns the OpenStackRequest
to be executed.
token: add the OpenStackTokenProvider mechanism

The interface OpenStackTokenProvider has been introduced to allow the
dynamic generation of tokens. Instead of defining a static token two
methods are provided (by the OpenStackTokenProvider interface):

- getToken(): to get the token to be used
- expireToken(): to signal the the token is unusable (wrong/expired)
  and it should be expunded

A basic implementation of the interface has been introduced to maintain
the ability to specify a static token: OpenStackSimpleTokenProvider.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
token: add the KeystoneTokenProvider

As part of the

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>