Update tools hacking for pep8 1.2 and beyond

* https://github.com/jcrocholl/pep8/commit/b9f72b16011aac981ce9e3a47fd0ffb1d3d2e085
  broke tools/hacking.py
* Upgrade pep8 to 1.2 and disable the following new tests: E12,E711,E712,E721,E502

Change-Id: I32a8808c6c9cccfedcc4d2a26649333aca1cd713
Remove unneeded lines from aggregates extension API sample tests.

In change I8f0f5b022795dc1d766e585cab8fe5f8445a3722 there was an unneeded
entry in the subs dictionary for 2 different tests.

Change-Id: I2dd5286acbde57499a1594d2c09e38d9ba6254f7
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Return proper error messages while associating floating IP

Handled the FloatingIpNotFoundForAddress, NotAuthorized exceptions
raised while associating floating IPs which are not allocated
or allocated to another project.

Fixes bug 1057906

Change-Id: I2d6eba9159b4e855fe615ed4dfa23c388d28c6d0
Fix reserve_block_device_name while attach volume

The block device name will not be reserved in current implementation
due to missing volume_id in block_device_mapping. This will cause
block_device.instance_block_mapping does not return the ebs device
which should be reserved.

This patch adds the volume_id to block_device_mapping while reserving
block device name and changes the rpcapi to send the volume_id.

Fixes bug 1062033

Change-Id: I8f08b568619fefa99850de0bee7d605749d53b0a
Add Multiple Create extension to API sample tests.

Change-Id: Ifa5cf31cc61e4269502ff692508866948670e46f
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Update kernel_id and ramdisk_id while rebuilding instance

While rebuilding an instances if kernel_id and ramdisk_id associated
with new image_ref then update instances table for instance_id
with the new kernel and ramdisk.

Fixes bug 1060925

Change-Id: I07dfdbed8580411adea14fd6c5be1a9569a7a021
Drop claim timeouts from resource tracker

Removed the claim timeouts.  The timeouts are basically irrelevant
since the re-work done here: https://review.openstack.org/#/c/13182/

Each claim is a marker of an operation consuming resources, valid
until the next invocation of the audit process
update_available_resource(), which does a full reconciliation of all
resource usage values from the DB.

Change-Id: I5cb0dd8903d358272ec223cf73f6eb4c06371a96
powervm: add polling timeout for LPAR stop command

We need to poll the LPAR state after a stop command is sent to
verify that the LPAR actually stops. Optionally, a timeout
value in seconds can be specified.

Also, fixes power_on and power_off calling the wrong
start/stop functions

bp powervm-compute-enhancements

Change-Id: I9ffd0125c1968e9a656d9456ea3eb85f5db8f1ab
Clarify trusted_filter conf options

The trusted_filter conf options are vague with names like 'port' and 'server'.
Clarified that options are for the attestation server

* Prepend conf options with 'attestation'
* deprecate old names for Grizzly.

Change-Id: I6ad6c6731343e87e058a9f4e6bb7aa8decf1847a
Imported Translations from Transifex

Change-Id: Icc57f190f53df71160d549903a93eef4d0908add
handle IPv6 race condition due to hairpin mode

bug 1011134

When using IPv6 an instance sees its own neighbour advertisement,
because of the reflective property of the hairpin mode.

Because of this the trigger-happy duplicate address detection in
the instance's kernel deconfigures the IPv6 address on the interface,
resulting in no IPv6 connectivity.

Approach of this commit is to to add an nwfilter to libvirt which
identifies this particular scenario and filters it.

Change-Id: I28f9b49cee4b2ab6ff591fae4feee623955f845f
Merge "Drop claim timeouts from resource tracker"
Tell SQLite to enforce foreign keys.

Fixes bug 1021023.

This requires SQLite version 3.6.19 or greater.  Older versions of
SQLite have no support for enforcing foreign keys.  However, SQLite
ignores unknown PRAGMA commands rather than treating them as errors,
so this change should be harmless with old versions of SQLite.

SQLAlchemy events require SQLAlchemy 0.7 or greater.  But other code
in this module already uses events, so this change should impose no
new SQLAlchemy version requirements.

Change-Id: Ic3eeeddbe012af65fe18c884674699cf16725d8d
Remove cast_to_network from scheduler.

This patch removes some dead code from the scheduler.  rpc casting to
network hosts has been unused in the scheduler since commit
d328ddcadb24d1b1961bd05a7676bc8f54b6776f.

Change-Id: I0ba49d0e9f7e9476f84b5d389c06b7fc43cf0438
Merge "powervm: add polling timeout for LPAR stop command"
Merge "Imported Translations from Transifex"
Remove unneeded temp variable

Removed in network.manager and tests.network.test_manager

Change-Id: I118661457ab2be665f0aacb119d7f65752591791
Merge "Remove unneeded temp variable"
Merge "Remove cast_to_network from scheduler."
Fixes test_libvirtr spawn_with_network_info test

This patch fixes the LibvirtConnTestCase.test_spawn_with_network_info
test case that was reported as bug 1053572.

The new implementation of the test makes no assumptions about the raised
exceptions, and exercises the LibvirtDriver.spawn method completely.
The test has the network_info faked and the libvirt connection mocked out.

In addition. it also fixes the fake_network.FakeVIFDriver class used in
this test to return a LibvirtConfigGuestInterface instance with fake
values instead of just a dict. Also fixes some docstring inaccuracies
in the nova.libvirt.vif module that may have lead to the FakeVIFDrivers
wrong implementation before.

Fixes bug 1053572

Change-Id: Ie5b69a2269ab099267231329eae21bd308fef835