Fixes evacuate doesn't honor enable password conf for v3

The evacuate api should honor enable_instance_password conf
setting just like server creation, rebuild and rescue api does,
enables this flag will returning the instance password from
server API call evacuate, If the hypervisor does not support
password injection then the password returned will not be
correct, this patch just fixes v3 evacuate api, since change
return value of v2 could potentially break apps which depend
on this being returned.

This patch also changes the evacuate response code to 202 to
keep consistency with api.

DocImpact
Change-Id: I2b9e5a067323ca84e2040e175a0425de3c0fafba
Closes-Bug: #1244203
Support IPv6 when booting instances

When nova uses neutron, IPv6 addresses may be allocated.  This ensures
those addresses are supported.

Change-Id: Ic904f3a7811b07264128bc62067cdf0bca9efac9
Closes-bug: #1267685
Accurate comment in compute layer

Currently instance usually refer to an object instead of a dict
but comments didn't update in compute, this patch update it.

Change-Id: I7902f09b21c951c1e7a9d32a75b3c75208fb6d86
Add doc update for 4 filters which is missing in filter_scheduler.rst

DiskFilter
NumInstancesFilter
IoOpsFilter
PciPassthroughFilter
are missing in doc/source/devref/filter_scheduler.rst, add them.

DocImpact

Change-Id: I50868598c9769783e1677c9ec50abf031896af82
Closes-Bug: #1276575
Fix typo and add test for refresh_instance_security_rules

Change Ia36b0dfb adds virt driver API method
refresh_instance_security_rules but there is a typo in the method's
docstring and it needs to be covered in test_virt_drivers.py.

Closes-Bug: #1290036

Change-Id: Idacffe2087f0bec6290e3422d1e777376b489615
Specify spacing on periodic_tasks in manager.py

Some methods in compute/manager.py were using the @periodic_task
decorator to ensure they were called regularly, but were not passing
in the `spacing` kwarg.  In this case the method can only be called at
the default rate, calculated as min(60 seconds, <spacings from all
periodic_tasks>), regardless of the poll interval set in config.

Although there was throttling code which prevented the methods from
executing too often, the case where we do want the method to execute
very often was missed.  This patch ensures that setting the config
values low will cause the method to be called as frequently.

Change-Id: I1530c8b3b6ac71f4d9e2e41188c0eca4a6556e01
Closes-Bug: #1274317
Fix "computeFault" when v3 API "GET /versions/:(id)" is called

Usually, the API of "GET /versions/:(id)" is not called directly.
However we can call it directly. So this commit fixes it to work
without the "computeFault ... Unexpected API Error".

Change-Id: Ic5513e5bce214d6fe90a9ccd7d056ac1dd0a4d19
Closes-Bug: #1281936
xenapi: boot from volume without image_ref

Currently xenapi does not deal well with image_meta that does not
contain "disk_format". This happens when we get image_meta from an
associated volume, rather than from glance.

Change-Id: Id673158442fde27e8d468ca412c9bd557a886e6b
Closes-Bug: #1294069
Don't refresh network cache for instances building or deleting

Refreshing the network cache for an instance which is still building
is both unnecessary (the build itself will update the cache when it
completes) and can lead to a race condition if the periodic task gets
incomplete network information, then gets pre-empted by the build
thread, and then updates the cache after the build has finished.

Likewise there is no value in updating the network cache for an
instance which is in the process of being deleted.

Change-Id: I7dd1d0a005662b979eaea3476af2506cbc51f17a
Closes-Bug: 1254320
Remove unused method from fake_network.py

Excessive indentation caused it to never be parsed as a method. Turns out
it's not necessary anyway

Change-Id: I5cdbe75065bfce0bad0705a3bc52e49e041da07c
Remove commented out code in test_cinder_cloud

Noticed this code while chasing down an info_cache issue.

Change-Id: Ie539d9160b07fa188444eec29658b1d97753a63e
Closes-bug: #1294480
Change initial delay for servicegroup api reporting

Initial delay should not necessarily be equal to
report_interval. Instead make it a reasonable value
such as 5 seconds.

This is so the surprising behavior of a service not
reporting when you start it up doesn't happen if your
report interval is configured to a larger value.

For example, in an environment where there are many
services it may not be optimal to have them all reporting
every 10 seconds which is the default. You may have them
report every 5 minutes. It is confusing to start up the
service and not have it show as available until 5 minutes
later.

Fixes bug #1226370

Change-Id: I85c4146bfa465fffaf89d4c2c74e6cb4ef84cee2
Remove the nova.config.sample file

This file is not gated anymore and therefore it gets
out of date. Replacing it with a README that explains
how to generate it

DocImpact
Closes-Bug: 1294774
Change-Id: I2a72a005208a2c86d69ac461d72e54c53bd395cf
Fix the explanations of HTTPNotFound for new APIs

Nova wsgi framework gets "explanation" from HTTPNotFound exception and
outputs it into a response body as "message" attribute. Now some error
explanations are passed to HTTPNotFound exception without explanation
argument and they are not output to a response body. As the result,
the default message "The resource could not be found." of wsgi library
are output to a response body instead.

This patch fixes them to output right message to a response body.

The commit I80d3a2da6258e94c485ce024eb310a63bcf39773 has fixed this
kind of bug already, but it cannot cover the ones of new APIs. Then
this patch is necessary again.

Change-Id: Ia784e09cda986a421e83c2820dfd0a2267867cdd
Closes-Bug: #1285437
Revert "VMware Driver update correct disk usage stat"

This reverts commit 9adba6727bbec051c1437ee95367ecb97b207f35.

Reporting aggregate storage space is not correct, since the nova
scheduler will assume that it can send a guest of that size to
the node, which the node will be unable to support due to lack of
contiguous disk space. The previous behavior was correct, where
the largest available chunk was reported.

Change-Id: Ia3a6e3f502282d44473d4908f68d71a97167e85f
Merge "Remove the nova.config.sample file"
Merge "Remove unused method from fake_network.py"
Merge "Specify spacing on periodic_tasks in manager.py"
Merge "Revert "VMware Driver update correct disk usage stat""
Merge "Change initial delay for servicegroup api reporting"