Fix typo in call in cinder.API unreserve_volume

Fixes bug #1038599

def unreserve_volume(self, context, volume):
-    cinderclient(context).volumes.reserve(volume['id'])
+    cinderclient(context).volumes.unreserve(volume['id'])

Change-Id: Ida96b01d93f2e82fe842fa93c1a8edbc27434279
Add nosehtmloutput as a test dependency.

Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: I45191e872a41eed8e6a9e14757675ee7a28b3836
Remove unused flags

Fix bug 1040818

* s3_dmz
* osapi_scheme
* osapi_path
* default_project
* auth_token_ttl
* powervm_vios

Change-Id: I799ff4746046302e8fcfb47ba3c23efb3454b28f
Make instance_update_and_get_original() atomic

Use the same session object within a transaction to retrieve
and update the instance object, including metadata and system
metadata.

In preparation to fix bug 1037372

Change-Id: I886da12bb85f60c2b23609a35b6d9a43040216ce
Fix deallocate_fixed_ip() call by unifying signature

deallocate_fixed_ip() is defined in 3 classes with incompatible
signatures:

RPCAllocateFixedIP:
deallocate_fixed_ip(self, context, address, host, **kwargs)
NetworkManager:
deallocate_fixed_ip(self, context, address, **kwargs)
FlatManager:
deallocate_fixed_ip(self, context, address, **kwargs)

There is a non-trivial multiple inheritance relationship among
them. The complication leads to incorrect function call signatures
(see bug 1024789). The kwargs magic is also never used, and discarded
during rpc calls anyway.

This patch makes the call signature exactly the same for all
deallocate_fixed_ip() definitions, drops kwargs and fixes bug
1024789.

Change-Id: I9c139810d4a5c93fa9f50b89a07bfe44e73e6c8a
Adds integration testing for api samples

We have no validation the the samples at api.openstack.org are
actually correct. This creates a framework to validate the request
and response samples through integration tests.

Adds a bit of stubbing in fake_network to return simple network_info
along with instance records and adds a call in image/fake to get
av valid image.

It will create non-templated versions of the samples when
the tests are running if GENERATE_SAMPLES is set in the environment
when running  nova/tests/integrated/test_api_samples.py

Change-Id: Id134af0b23f0d0932c8789697439ce94bbe2834b
Returns hypervisor_hostname in xml of extension

The extended_server_attributes extension returns hypervisor_hostname
in json output, but it was inadvertently omitted from xml. This makes
the output consistent between the two. Tests included.

Fixes bug 1039276

Change-Id: Ib8cd71cd5bfb65785a02085061fea5e515a0568c
Ensure hairpin_mode is set whenever vifs is added to bridge.

Fix the bug that when create a snapshot of an instance, the
instance cann't ping it's floating ip.
fix bug lp:1040537

Change-Id: I25aa1a323fa84e8c72f969cb56ada4dffa509150
Clean up network create exception handling

The NetworkManager code will not raise webob exceptions, so there's no
point in explicitly catching those.

Also, the contrib.networks module is unused in nova-manage.

Change-Id: I5f9fe7fa7f4365f44e7a70b3d9536da8f10b8fa7
Simplify network create logic

The logic to determine default values for num_networks and network_size
is currently overly convoluted. Simplify it in order to make the intent
more clear, without actually changing the behaviour.

Change-Id: Iadb83b1a45aaf52822ee34b972b3f004cef65ef3
Check volume status before detaching.

If the volume is already detached previously, check the volume
status before preforming the detach. Otherwise you get a nasty
traceback because the instance_uuid no longer exists.

Change-Id: I0df4240fb6500d5f99a20d63d82fd258fccdc9fc
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Trap iscsiadm error

If the iscsitarget was previously deleted and the user tries
to delete the iscsi target again, then you get a nasty traceback
in the logfiles.

According to the iscsiadm man page, iscsiadm returns an error 21,
ISCSI_ERR_NO_OBJS_FOUND if there is no records/targets/sessions/portals
found to execute the operation on.

LP: #1011166

Change-Id: I3087c1a114fe91bd7361d92688d4f926bc3f8951
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Remove unused and old methods in hyperv and powervm driver.

fix bug lp:1040758

Change-Id: I0376384a2481e62f55a51e4a877d12c596aadaa1
Make pre block migration create correct disk files.

fix bug lp:1039356

Change-Id: Iede2c6d2ec2b1a68c37d1e8f8735fd2e5d273c67
Add lintstack error checker based on pylint

Add a new silent test target lintstack based on pylint in Jenkins.
lintstack will compare the pylint errors between HEAD and HEAD~1,
filter out known false positives and report violations in pylint
original parseable format for Jenkins to consume.

Change-Id: Ic2962cb42a174bfe9535aea88475ff4ede3bf9ff
Remove unused permitted_instance_types

Commit 5ea7db9b removed the ArchFilter and moved its functionality
to the ImagePropertiesFilter, which uses 'supported_instances' from
the compute nodes to determine if a node satisfies the arch,
preferred hypervisor, and virtual machine mode requested by the
instance.  permitted_instance_types is no longer used and can be
removed.

Change-Id: Idf9d72746d7c3dcd2a7385913823df122eaa7cd6
Add missing context argument to start_transfer calls

The first argument of start_transfer is context. Apparently it
is missing.

Partially fix bug 1037183

Change-Id: I83b30a8f7d275d7675d11bd8dcad76dd7a893deb
Remove duplicated method VM_migrate_send

The correct signature is defined in line 653 later in the code.

Partially fix bug 1037183

Change-Id: Ib6904ea962da2bcef391416be4a09801976d8bcd
Use the compute_rpcapi instance not the module

compute_rpcapi.get_console_pool_info is only available from
the ComputeAPI object, not nova.compute.rpcapi module.

Partially fix bug 1037183

Change-Id: I57df710389bf349c7ba1dd7980105222918bff92
Merge "Adds integration testing for api samples"