Fixes Hyper-V dynamic memory issue with vNUMA

vNUMA and dynamic memory are mutually exclusive, so the former
needs to be disabled for instances where dynamic memory is enabled.

Change-Id: Ic730c294ffc89925076688a44adf2594c7f6712b
Closes-Bug: #1305897
Make separate calls to libvirt volume

This is a follow up patch to
https://review.openstack.org/#/c/116998/, where libvirt
volume's connect_volume method were split into get_config and
connect_volume. The following patch changes libvirt driver
to call the appropriate volume method, get_config or
connect_volume, instead of the old monolithic call to
connect_volume. connect_volume will no longer need to return
the libvirt xml after this switch over. This will improve
performance and eliminate possible race conditions.

Change-Id: I0d0d7ba98c53ad7509c28bb4866c488c0a049d2f
Closes-Bug: #1359617
Ironic: Continue pagination when listing nodes

Ironic API supports pagination and limit the number of items returned
by the API based on a config option, by default a max of 1000 items is
returned per request. The Ironic client library by default respect that
limit, so when the Nova Ironic driver list the nodes it might hit that
limit and the wrong information will be passed to nova.

This patch fix the problem by passing a "limit=0" flag to the client
library to tell it to continue pagination until there're no more nodes
ot be returned.

Change-Id: I63795e2b4de828fa41e97812e99a714f04d2f580
Closes-Bug: #1367349
Remove duplicated comments in virt/storage_users

Change-Id: Ia8f45dc6588b5e456dcfef9c64b5aa14df9365e7
Remove outdated docstring for XenApi driver's options

XenAPI's driver options's help strings can explain how to
use these options, so remove these duplicated and outdated
docstring.

Change-Id: I3de257e75ba13352e9460070f5bb2a6d7cf36a4e
fixed typo in test name

Change-Id: I751c288122215c7a9ffafd3f9f4c61a321b23dab
Remove useless join in nova.virt.vmwareapi.vm_util

This change replaces in nova.virt.vmwareapi.vm_util the pattern
''.join(['fo...o'], ['b...ar']) by the pattern 'fo...ob...ar' which
avoids runtime string concatenation.

Change-Id: If23d8377acde2c3419b67ca11b03a1c898561c77
Remove duplicate index from model

Migration 249 dropped this duplicate index, but didn't update the model
to match what happened in the migration.

Change-Id: I3f63d31a0bb6f2652f49d8505cf0c02b090de89e
Reduce the complexity of stub_out_db_network_api()

stub_out_db_network_api' is too complex (57)

Running flake8 to check for cyclomatic complexity showed that the test
method stub_out_db_network_api() in the db/fakes.py module had a
complexity of 57. This change refactors the code to reduce that
method's complexity to 2. No functional changes are included.

Change-Id: Ieb77066ba1133eae5c201121d27a970ce040117e
Separate image props filter unit tests

Pull the unit tests for the image properties filters out of
test_host_filters.py and uncruft the unnecessary service_up stubouts.

Change-Id: I5d2cd393fd18de9debff424d9ef37e549c2a7ea2
Separate compute caps filter unit tests

Pulls the unit tests for compute capabilities filters out of
test_host_filters.py and into their own test file.

Change-Id: Ifa941790fdbe872433629424fd96f2781272c60c
Move JSON filter unit tests into own file

Separates JSON filter unit tests from test_host_filters.py and refactors
the test methods to remove some cruft.

Change-Id: I31b9b409f4bbc17074067f42ea9da1418d963086
Separate filter unit tests for agg extra specs

This patch separates the unit tests for the aggregate instance extra
specs filters out from test_host_filters.py. In the process, it converts
the unit tests to NoDBTestCase and mocks out any database calls.

Change-Id: I7b9f186052825667b585674491d0ddf6b566f8de
Port fixed_ip extention to v2.1

This patch ports fixed_ip extention from v2 to v2.1,
and have v2 unit test cases shared between v2.1 and v2.

Partially implements blueprint v2-on-v3-api
Change-Id: Ifa7e0dd5a91cfe881077b92aeb7019d0435d780a
Clean up iSCSI multipath devices in Post Live Migration

When a volume is attached to a VM in the source compute node through
multipath, the related files in /dev/disk/by-path/ are like this

stack@ubuntu-server12:~/devstack$ ls /dev/disk/by-path/*24
/dev/disk/by-path/ip-192.168.3.50:3260-iscsi-iqn.1992-04.com.emc:cx.
fnm00124500890.a5-lun-24
/dev/disk/by-path/ip-192.168.4.51:3260-iscsi-iqn.1992-04.com.emc:cx.
fnm00124500890.b4-lun-24

The information on its corresponding multipath device is like this
stack@ubuntu-server12:~/devstack$ sudo multipath -l 3600601602ba034
00921130967724e411
3600601602ba03400921130967724e411 dm-3 DGC,VRAID
size=1.0G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=-1 status=active
| `- 19:0:0:24 sdl 8:176 active undef running
`-+- policy='round-robin 0' prio=-1 status=enabled
  `- 18:0:0:24 sdj 8:144 active undef running

But when the VM is migrated to the destination, the related information is
like the following example since we CANNOT guarantee that all nodes are able
to access the same iSCSI portals and the same target LUN number. And the
information is used to overwrite connection_info in the DB before the post
live migration logic is executed.

stack@ubuntu-server13:~/devstack$ ls /dev/disk/by-path/*24
/dev/disk/by-path/ip-192.168.3.51:3260-iscsi-iqn.1992-04.com.emc:cx.
fnm00124500890.b5-lun-100
/dev/disk/by-path/ip-192.168.4.51:3260-iscsi-iqn.1992-04.com.emc:cx.
fnm00124500890.b4-lun-100

stack@ubuntu-server13:~/devstack$ sudo multipath -l 3600601602ba034
00921130967724e411
3600601602ba03400921130967724e411 dm-3 DGC,VRAID
size=1.0G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=-1 status=active
| `- 19:0:0:100 sdf 8:176 active undef running
`-+- policy='round-robin 0' prio=-1 status=enabled
  `- 18:0:0:100 sdg 8:144 active undef running

As a result, if post live migration in source side uses <IP>, <IQN> and
<TARGET LUN Number> to find the devices to clean up, it may use 192.168.3.51,
iqn.1992-04.com.emc:cx.fnm00124500890.a5 and 100.
However, the correct one should be 192.168.3.50, iqn.1992-04.com.emc:cx.
fnm00124500890.a5 and 24.

Similar philosophy in (https://bugs.launchpad.net/nova/+bug/1327497) can be
used to fix it: Leverage the unchanged multipath_id to find correct devices
to delete.

Change-Id: I875293c3ade9423caa2b8afe9eca25a74606d262
Closes-Bug: #1357368
Moves trusted filter unit tests into own file

Breaks out trusted filter unit tests into their own file. In the
process, we remove all DB accesses from the unit tests and uncruft the
unit tests with mock.

Change-Id: Ic895b06a9f6a224f153f12ca5ab54dc8be931f13
VMware: rename vmware_images to images

There is no need for the prefix vmware. vmware_images.py has been
renamed to images.py and test_vmware_images.py has been renamed
to test_images.py.

Change-Id: Icbc64da072f60713c1a79aca2ed503dcd7586063
Replacement `_` on `_LE` in all LOG.error

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Change-Id: I5a8f381b6f8fdb4e8febe9e6a901f7cdc6846646
VMware: delete the driver VMwareESXDriver

In Juno we had a deprcation warning about the VMwareESXDriver no
longer being supported. This class is now deleted.

Change-Id: Id5b50fa944f57cd8fd61611d93caac8066cfd93d
Console: delete code for VMRCConsole and VMRCSessionConsole

In Juno there was warning that this code will be removed in Kilo.
This patch deletes the VMRC console classes for the ESX and VC drivers.
This code has not worked since the Icehouse release.

Change-Id: If2d1e237f92eb080dadc2eee1f2f2771a06ce2f6