Add way to specify key-name from environ

If you're using a standard SSH keypair, it becomes tedious to have to type
`--key-name` for every novaclient command.

This patch introduces a new environment variable `NOVACLIENT_DEFAULT_KEY_NAME`
which can be used to set this value persistently.

Change-Id: I1a1180b7d474d1a4e039dbb7044cd8eaf04cc9ad
Closes-Bug: 1327418
Adding cornercases for set_metadata

Aggregate_set_metadata leaves users confused because it currently
does not check for duplicate key=value parameters for addition
or a missing key for deletion. All that user sees is that "metadata has been updated"
more details in bug1292572

This patch checks for above mentioned corner cases and informs users when and why
there was no change made in above corner cases

Adding better testcases also.

   Closes-Bug: #1292572

Change-Id: I820d793ac44680295df8b2a3f58a0834f7019875
Convert server tests to httpretty

Change-Id: If18980fbe94cee389b7dab9925fdad8f920f9885
blueprint: httpretty-testing
Sync apiclient from oslo-incubator

Need to sync the latest apiclient from oslo-incubator to make nova
cli cache work. Command used:
python update.py --base novaclient --dest-dir ../python-novaclient/ \
--modules apiclient

syncd patches:

apiclient:
  * 12341ef504 Merge "Restore UUID and human-ID bash completion"
  * 468afcb335 Merge "Don't slugify names that don't exist"

Change-Id: Iec2ad851b47628c5dde4272f438cce4150e11912
Close-bug: 1337033
Fix booting from volume when using api v3

The current code in novaclient/base.py, class BootingManagerWithFind
do not take in account the differences required to boot an instance from
a volume in API v3. V3 expects UUID as volume id and also the source type
to be set.

Change-Id: Id8cfb2d7811aead27cb26cf7ff615c7a9ed05d54
Close-bug: 1325303
Mention keystoneclient.Session use in docs

Jamie added some excellent "Using Sessions" docs to keystoneclient in
I5e44c1029ce160cb2798cfb8a535aa9f3311799a. These will be published to

  http://docs.openstack.org/developer/python-keystoneclient/using-sessions.html

once the version after 0.9.0 is released.

Let's add a brief example on how to use this API and reference the
keystoneclient docs.

Change-Id: Icbcef45f13c1f962c90aa3db9dde4360520166ff
Fixes typo in error message of do_network_create

'eith' is inappropriate

Change-Id: I12b219bd5869d2194d7a8c3495e51e0ead4a64c9
Merge "Mention keystoneclient.Session use in docs"
Merge "Add way to specify key-name from environ"
Add missing parameters for server rebuild

Currently, nova rebuild only support reset: password, image,
preserve-ephemeral. While nova api support other parameters
like: name, metadata, personality. This patch adds these missing
parameters for server rebuild.

Change-Id: I4edd8146bbbb0b2e0c9e01907af5dab96f090029
Closes-bug: 1268435
Filter endpoints by region whenever possible

Previously, the endpoints command just returned the first endpoint. This
was not very useful; people expected to see the endpoints in the region
they specified. This patch does the following:

- If there's only one endpoint, use that.
- If there's a specific one for your region, use that.
- If there isn't, warn, and show the other ones.

Closes-Bug: #1256009
Change-Id: I70b82bdffb9b2e3da415a3bb941bcff287e39789
Description is mandatory parameter when creating Security Group

As per the bug, description should not be a mandatory parameter
as it creates inconsistency with other opestack items which has
description as an optional parameter.

So in the fix, the description argument has been made optional.
The old command was:
nova secgroup-create <name> <description>
Now new command will be:
nova secgroup-create <name> [<description>]

Patch updated based on the comments received

Updated commit message for gerrit autolink

Closes-Bug: #1332133
Change-Id: I2ded915be4a57f3c46e6cf5d1bf00e8c917cd0b9
Add "version-list" for listing REST API versions

Nova provides REST API versions.
This patch adds a subcommand "version-list" for outputting the versions.

Change-Id: I1b40ad57912aa740c0b1d9221018aba9b13a5436
Merge "Convert server tests to httpretty"
Add support for new fields in network create

Also adds missing network-delete shell command. Additionally changes
the type of vlan and vlan_start to int to match the api samples.

Partially-implements blueprint better-support-for-multiple-networks

Change-Id: I233614431db4737284cceaf8e6b947f50dd84602
Edits on help strings

Improve help strings for consistency. Fix wording, typos,
capitalization and add "." as appropriate.

Change-Id: I376f6d0269aee8dd0e67ffab6386eac2139844ab
Enabled hacking checks H305 and H307

* H305  imports not grouped correctly
* H307  like imports should be grouped together

Change-Id: I23fdad285508707a2c1d7c832ff8b1a6a10e8f88
Don't log sensitive auth data

This code change redacts the password in keystone request, and
also redact the token text in keystone response. The code still
makes REST call by itelf, instead of calling keystone client.

Closes-Bug: 1327019

Change-Id: Ib9c0610c1ef351a127364478721cf961c2a30125
Merge "Enabled hacking checks H305 and H307"
Merge "Add "version-list" for listing REST API versions"