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
Allow selecting the network for doing the ssh with

Previously, nova ssh was searching for network types: public and
private, which seems to be incorrect (fixed and floating seems to be
correct), causing that this command has probably never worked.

This commit fixes the above and adds an option for selecting the network
to use, which is helpful when there are more networks for the VM.

Change-Id: I01ea6cee725c0feaacab60975c3792b0ac1305e9
Closes-Bug: #1227694
Closes-Bug: #1343991
Add support for security-group-default-rules

Add API & CLI support for security-group-default-rules. Security group
default rules allows users to create, delete, list, and get rules that
will be pre-populated into the Security Group "default" that is
populated in all projects on creation. This feature was intoduced in
Grizzly.

This commit also includes a small typo fix in the security_group_rules fake.

Change-Id: I6722b659934bde34bd206103f92dbd2cc42b1537
Closes-Bug: #1326941
Enable check for E131

* E131 continuation line unaligned for hanging indent

Change-Id: I719d5bcd1b51896c947e637f6dfce2e1f1a6bd2b
Fix order of arguments in assertEquals

Part 10

Related to: bug #1277104

Change-Id: I582cfcf88def00c6c885ab78f26f2b4fa30c4457
Updated from global requirements

Change-Id: Ia1c665bc9cf86003e72984564c6b954115ae13f0
Merge "Enable check for E131"
Enable several checks and do not check docs/source/conf.py

* E265 block comment should start with '# '
* H302 import only modules

Do not check docs/source/conf.py. The file is imported from the
cookiecutter template.

Documented why checks are ignored and if they should be enabled
in the future.

Change-Id: I367064ecaa6d1fd9d918f7ce003303e2db660647
Convert to requests-mock

We've had some trouble with httpretty in the past and so are moving to
requests-mock. There should be no functionality change in this patch,
simply a transition to a newer library.

Examples: 
 - Python 2/3 inconsistencies
 - Breaking compatibility between releases
 - Incorrect package dependency specifications
 - Problems with distro packaging around tests 
 - *can* introduce a maintained state between tests.

Change-Id: I666a5c7e6747f0c5c2dc96336774fd0fcd3f5907
Fix variable error for nova --service-type

When running 'nova' with '--service-type' option, it raises an variable
error.

$ nova --service-type compute list
ERROR: local variable 'os_compute_api_version' referenced before
assignment

When '--service-type' option is given, the default value of
'os_compute_api_version' does not apply.

Change-Id: I19554756e8eb56e3a5984ed3078137af9687f986
Closes-bug: 1315368
Fix the return code of the command "delete"

Currently, the command delete return a zero if it failed for any
of servers, the return code should be a nonzero.

Change-Id: If7009fdeb5a60fe2e357bcc447313cbdb7b2ff39
Closes-Bug: #1339647
Use adapter from keystoneclient

SessionClient is mostly common code that wasn't yet released in
keystoneclient. Now that 0.10 is released we should use the adapter from
there as much as possible.

Change-Id: Ief6cd7e752fd8c9e9157364f99e270da7faff074
Merge "Convert to requests-mock"
Fix listing of flavor-list (V1_1) to display swap value

Current version of flavor-list(v1_1 API) does not show
swap value because of selecting wrong field name. This
change displays swap value in the same way to v3 API

Closes-Bug: 1354546
Change-Id: I5c8fca8207032814b96b8410213bf58209d9b526
Merge "Use adapter from keystoneclient"
Merge "Fix listing of flavor-list (V1_1) to display swap value"
Updated from global requirements

Change-Id: I1155f67196b5a8393ff53361ac9c63f3f7c23ad0
Quickstart (README) doc should refer to nova

Closes Bug: #1358385

Change-Id: I0d9592d3221f3a4295bce7e5da8472ea73e0bcc7
Add filtering by service to hosts list command

This commit adds --service-name option to host-list command allowing
user to filter hosts by service.

DocImpact
Closes-Bug: 1224763
Change-Id: Ic67deb3af7ddbe23c14fa38ae180d43ab484b78f
Adding Nova Client support for auto find host APIv3

Adding nova client functionality to use the auto find
destination host for evacuate.
This change makes the target host optional
on evacuate command.

Partial Implements: blueprint find-host-and-evacuate-instance

Change-Id: I40619b8d1eea6ae44ed5e43fb50ce2c1862686d6
Co-Authored-By: Juan M. Olle <juan.m.olle@intel.com>