'policy' should be required in server_group_create

The 'policies' param is a required param in nova api now.
So, we also need to change it in cli.

After the modification, the 'policy' param will be required now,
and the old '--policy' style will still be available.

Change-Id: I97921eef0f635c8d50a04bbdaf3ef4f1bfaa3e9d
Closes-Bug: #1323909
Overhaul bash-completion to support non-UUID based IDs

There are a few things currently wrong with bash-completion as it stands now:

    1) IDs are currently required to be UUIDs. This is an arbitrary limitation
       and doesn't make sense for certain kinds of objects, like `Flavors`
       where a valid ID could be `performance-16gb`.

    2) The code is spread out between Oslo's `Resource` and Novaclient's
       `Manager` class. This makes it difficult to improve the code because it
       requires changes to two separate projects. We should centralize the
       code in Novaclient until the API is stable, then import the code into
       Oslo in its entirety, not partially like it is now.

    3) The completion code is handled by the `Manager` of which there is one
       per Resource-type. In the interest of centralizing this functionality,
       we should create a `CompletionCache` class and hang it off of `Client`
       of which there is one-per-session.

    4) The completion-code currently runs by default even in headless mode
       (e.g. novaclient without the shell). It'd be much more efficient to
       only write to the completion cache if we're accessing the `Client` from
       the novaclient shell. We can make this an option to support third-party
       CLI clients that want to use the completion-cache as well.

NOTE:
    * The corresponding Oslo patch is here:

        https://review.openstack.org/#/c/101376/

    * This patch was tested in multithreaded mode to prevent any regression
      from:

        https://bugs.launchpad.net/python-novaclient/+bug/1213958.

Change-Id: Idada83de103358974b739f81d4f392574f9e1237
Closes-Bug: 1332270
Sync Oslo's apiclient

Oslo's version of apiclient fixes a bug where if `human_id` is `None` it
causes `novaclient` to crash, so lets sync it over to fix that bug.

Change-Id: I53f174a1d3356c4038dcbdf88f4f9c4ea179418c
References-Bug: 1288397
add disk bus and device type to volume attach

This change adds the optional parameters: disk bus and device type
to the volume-attach command for the V3 API.

DocImpact
Closes-Bug: #1303875

Change-Id: I4fd07726887d08e5b669139b559bdb2c2d21826e
Convert floating IP pool tests to httpretty

Change-Id: Ic9332ddd30a0bc3ffc5ed7c046f60ded3f940e85
blueprint: httpretty-testing
Merge "'policy' should be required in server_group_create"
Merge "Convert floating IP pool tests to httpretty"
Fix using a variable which is not defined

There is a variable which is not defined but used, we should define it
before using. Add a test for get_resource_manager_extra_kwargs_hook
function, and change the exception to a more detail instead broad
'Exception'.

Change-Id: I7a798dad55a65f06ebbe175925a00028940bb168
Convert hosts tests to httpretty

Change-Id: Ib1cdb508ef04a86350d3890c14e181b6ed1177f2
blueprint: httpretty-testing
Convert Hypervisor tests to httpretty

Change-Id: I0dc0167af618e88f76ace9b893b2b26966903457
blueprint: httpretty-testing
Convert image tests to httpretty

Change-Id: I3abc51ba4dcc641b72e3ac5e09955e4b22718451
blueprint: httpretty-testing
Convert keypair tests to httpretty

Change-Id: I6876d97dd6600a0a34b89d9f693078f495085622
blueprint: httpretty-testing
Convert limit tests to httpretty

Change-Id: I10e0357e0f79c009a00759fd22e6148d10b5286d
blueprint: httpretty-testing
Convert network tests to httpretty

Change-Id: I81a83c98b925a2bc7373dd17f2c2ecd78fa23a6d
blueprint: httpretty-testing
Merge "Fix using a variable which is not defined"
Merge "Convert hosts tests to httpretty"
Merge "Convert Hypervisor tests to httpretty"
Merge "Convert image tests to httpretty"
Merge "Convert keypair tests to httpretty"
Merge "Convert limit tests to httpretty"