script for configuring a vif in Xen in non-bridged mode

Creates a new vif device without attaching it to a
bridge. Quantum Linux Bridge Agent will attach the
created device to the belonging bridge.

Change-Id: I1818a92a47882d98e384b57e0fa84a0fa09d40ea
Verify the disk file exists before running qemu-img on it.

Should resolve bug 955788, although it is a little hard to tell
because the bug is so old.

Change-Id: Ic0c47f4b6181f56a98cf58d4ebe2cc926d06d524
Allow pinging own float when using fixed gateway

When pinging your own floating ip, the snat rule is not hit if
dnsmasq is set up to give out an external gateway.

Fixes bug 1096259

Change-Id: Ib71312bf37b3a890567cf6212acabb5821846ab8
Refactor work with TaskLog in sqlalchemy.api

Add _task_log_get_query() private method
It is used to remove from task_log_get() and task_log_get_all() session.
parametr and save performance.

task_log_get() method
Remove session parameter from public method.

task_log_get_all() method
Remove session parameter from public method.

task_log_begin_task()
Remove session parameter from public method.
Remove unused return value.

task_log_end_task()
Remove session parameter from public method.
Use 1 db request instead of 2.
Remove unused return value.

blueprint db-session-cleanup

Change-Id: I2c8252de7978e8fddd800e903f18a73ee9a95034
Upgrade WebOb to 1.2.3

The version of WebOb being used in OpenStack was more than
1 year old. This change updates to the latest stable release.

Upgrading WebOb resolves a version conflict between OpenStack
and Pecan, the web framework used by the Ceilometer team for
version 2 of the ceilometer API.

Refer to http://docs.webob.org/en/latest/news.html
for the list of changes between 1.0.8 and 1.2.3.

bug 1092227

Change-Id: Ib5a005665a5b11198006ce2aa2432399a41fc3d9
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Support cinderclient http retries.

HTTP retries were recently added to cinderclient. This adds the
config option required to use it. The default (unchanged) behavior
is 0 retries.

Change-Id: Ia7ad831045e8df9ad9c22f0119ae3485d91ad949
Conductor instance_get_all replaces _by_filters

Updates the Nova conductor so that it uses instance_get_all()
and instance_get_all_by_host() from the Nova DB API to
implement its own like named functions.

This fixes a regression that occured in d22b0ca where we switched
from using the DB API's instance_get_all_by_host and instance_get_all
methods over to the DB APIs instance_get_all_by_filters.

This caused some subtle regressions due to the fact that
instance_get_all_by_filters has different defaults for
deleted records.

The previously used (prior to d22b0ca) instance_get_all() and
instance_get_all_by_host() functions rely on the context.read_deleted
and also handle the display of deleted and soft deleted records differently.

Fixes LP Bug #1096972.

Change-Id: Icb587ef169d1d7dd86cf6ee682e74bd4e84c37e2
Add exception handler for previous deleted flavor.

An exception happens if a previous flavor is deleted and
'nova resize-revert' run, because 'nova resize-revert' does
not handle the deleted flavor.
And also we have the same problem in _update_usage_from_migration().
This patch fixes the problems.

How to reproduce the problem on DevStack:
  $ nova flavor-create sample 10 512 0 2
  $ nova boot --image cirros-0.3.0-x86_64-uec --flavor sample test01
  $ nova resize test01 m1.tiny
  $ nova flavor-delete 10
  $ nova resize-revert test01

Before applying this patch:
  $ nova resize-revert test01
  ERROR: The server could not comply with the request since it is
  either malformed or otherwise incorrect. (HTTP 400) (Request-ID:
  req-b0d3e016-9608-4a87-a0cc-44dfe00b25a1)
  $

After applying this patch:
  $ nova resize-revert test01
  ERROR: Flavor used by the instance could not be found. (HTTP 400)
  (Request-ID: req-ed4ce174-33f2-4258-b522-674a1023ea74)
  $

Fixes bug 1091490

Change-Id: I39dd23a7565ae66544e8bc2aa7ad3299eb61bfcc
Add api extension to get and reset password

Password is stored in system_instance_metadata as four items with the
keys 'password_0' through 'password_3'. The extension adds a resource
endpoint with two methods:

GET v2/servers/<uuid>/os-server-password  # get_password
DELETE v2/servers/<uuid>/os-server-password # reset_password

get_password retuns:

JSON: {"password": "xxx"}
XML: <?xml version='1.0' encoding='UTF-8'?><password>xxx</password>

Note that this is intended to be an encrypted password set by the
guest. Includes api tests for json and xml. Also includes api samples.

Part of blueprint get-password

Change-Id: I6c03f9c3bc8a2c70403bbb3e57917ab9522d75bd
fix N401 errors, stop ignoring all N4* errors

We had previously been ignoring all our custom N4xx hacking.py
errors. This fixes all the N401 errors "doc strings
should not start with a space" and reduces the ignore set down
to N402 only "single line docstrings should end with period".

It also fixes the N401 parser to catch only docstrings, and
not tripple quoted string blocks used later on in a function.

Clean up a few of the more crazy uses of """ in our code

Clean up additional funky comments to make indents a bit more
consistent, and pull in lines when possible.

Change-Id: I9040a1d2ca7efda83bd5e425b95d1408b5b63577
attach/detach_volume() take instance as a parameter

Previously the methods take instance['name'] as a parameter.
With this change, ComputeDriver can lookup informations about
the instance from hypervisor (in bare-metal driver, it is a local DB)
by any other attributes of the instance.

blueprint general-bare-metal-provisioning-framework

Change-Id: Ibd0567f34ed5053909ce1a408f9cbf87516ba597
Remove unused osapi_path option

This has been unused since deprecated auth was removed. It looks like
we intended to remove this in commit ea06eff7.

Change-Id: I7a5868c42300ba92d5c8f528a447cfe3fbace297
Move global glance opts into nova.image.glance

Move the glance_host, glance_port and glance_protocol options into the
nova.image.glance module.

Also move the generate_glance_url() and generate_image_url() utility
methods there since they're the only uses of the options outside of the
module.

blueprint: scope-config-opts
Change-Id: I3beca1a65cdd902a94ddc1c512d79a4de635ef38
Move global s3 opts into nova.image.s3

s3_host and s3_port are only used in nova.image.s3.

blueprint: scope-config-opts
Change-Id: Ia841406ebe7c03b2a58392e2453118e2646ad7ce
Move cert_topic into nova.cert.rpcapi

The cert_topic opt is only used in nova.cert.rpcapi and it makes sense
for the RPC module to "own" the topic option.

blueprint: scope-config-opts
Change-Id: If3584b8e1984e0425d9f33133f9d291739b04d49
Move network_topic into nova.network.rpcapi

The network_topic opt is only used in nova.network.rpcapi and it makes
sense for the RPC module to "own" the topic option.

blueprint: scope-config-opts
Change-Id: Icd779f34df47ac6dd048b3e41995e872d8859872
Move console_topic into nova.console.rpcapi

Even though the console_topic opt is used outside nova.console.rpcapi,
it makes sense for the RPC module to "own" the topic option.

blueprint: scope-config-opts
Change-Id: I0f00927ca1c0bba7b21315240165e83e7075ebb7
Move scheduler_topic into nova.scheduler.rpcapi

The scheduler_topic opt is only used in nova.scheduler.rpcapi and it
makes sense for the RPC module to "own" the topic option.

blueprint: scope-config-opts
Change-Id: Iafb8705eb716b650b63e060fe1dd36666bcee812
Adds a new tenant-centric network extension

Implements: blueprint tenant-networks

Adds a new API extension that supports a more tenant-centric model for
interacting with isolated networks. Additionally, the patch renames the
existing networks extension as os-admin-networks to more fully fit the
self-described implementation. Two new novaclient extensions and a
novaclient change accompany this patch.

DocImpact

Change-Id: Ib90a65c0a92445f86e930fab88ab4495aefff7c7
Fix baremetal VIFDriver

Commit Id287f7e661 removed the nova/virt/vif.py file and the VIFDriver
base class, and erroneously stated in its commit message that baremetal
driver did not use it. This patch repeats the work of that earlier patch
by removing the import of nova.virt.vif from baremetal/vif_driver.py.

blueprint general-bare-metal-provisioning-framework

Change-Id: Ifac9510a72a028dc5d3574148f3c4a6410b1d249