Use new pci device handling code in pci_manager

As we remove some pci device method from PCI device object,
update the pci manager accordingly.

Closes-Bug: #1273852

Change-Id: I0ec0e7b03625888a207918816b6e2d537b6d7d54
Remove the device handling from pci device object

Remove the device handling code at pci device object to make
it similar to other NovaObject.

Remove some usage in test cases.

Closes-Bug: #1273852

Change-Id: I4487ae0b36de18365d12593f480c05f0fe726769
Add bulk create/destroy functionality to FloatingIP

This adds bulk create and destroy functionality to the FloatingIP
object, which in turn requires that the DB API return the list of
IPs that it created.

This also fixes a bug in the load routine for FloatingIP, which
would previously try to load a FixedIP object with id=None,
which doesn't make sense.

Related to blueprint compute-manager-objects-juno

Change-Id: Ie3c7a5e672fcdb3e0df3d0e46b905b237dcfa182
Completely object-ify the floating_ips_bulk V2 extension

This converts the floating_ips_bulk APIv2 extension from using
direct DB access to using the FloatingIP object.

Related to blueprint compute-manager-objects-juno

Change-Id: I5fa7637b5eb06a9be51d7638701d98e3e033d68d
Move the fixed_ips APIv2 extension to use objects

This converts the fixed_ips extension to use the FixedIP object
instead of direct database access.

Related to blueprint compute-manager-objects-juno

Change-Id: I21afae063a360c1c36a417f0455e213b7236b541
Object-ify server_password APIv2 extension

This makes the server_password extension use the Instance object
instead of direct database access.

Related to blueprint compute-manager-objects-juno

Change-Id: I54f7762d14868278ef72589a8c6e3fc80c0e48c8
Object-ify server_password APIv3 extension

This makes the server_password APIv3 extension use the Instance object
instead of direct database access.

Related to blueprint compute-manager-objects-juno

Change-Id: I960840e8261bacd4a9c99934f02342861e53bc74
Add EC2InstanceMapping object for use in EC2

The EC2 code has a table mapping instance UUIDs to EC2 IDs.  This patch
creates the Nova object for this so that we can remove direct use of
these db.api calls from the EC2 code.

Change-Id: Ib55426de29c1290ff9c7bcb999fb3b3124521750
ec2: Convert to use EC2InstanceMapping object

Update the EC2 code to make use of the EC2InstanceMapping object instead
of using the db API directly for managing instance UUID to EC2 ID
mappings.

Change-Id: I66d60a29f0d909edd381e8492a4754bdd0eb8e52
Rename VolumeMapping to EC2VolumeMapping

During the code review for adding the InstanceMapping object, a
request was made by a couple of people to rename it to
EC2InstanceObject.  I did that so now I think we should rename the one
that already merged to also have the EC2 prefix.

Change-Id: I0b0847b6d4e229c973e268045709fa90726baed9
Log cleanups for nova.virt.libvirt.imagecache

More log cleanups:
 - add log hints for error, warning and info levels
 - move from LOG.warning to LOG.warn

Change-Id: I452cf18f9a5199bfc1c1b104f6a2b03561bf2fc4
devref policy: code is canonical source of truth for API

Although many reviewers know that documentation isn't the source of
truth for API behavior, we have never written this policy down before.

Change-Id: Ibe7b355947200b668324028972c121e5357a0470
Removes the use of mutables as default args

Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None, then use 'arg = arg or {}', 'arg = arg or []'. For unit code which
doesn't use the args , just set with None. This commit also adds hacking
check.

Closes-Bug: #1327473
Change-Id: I5a8492bf8ffef8e000b13b6bdfaef1968b96f816
Fix "fixed_ip" parameters in unit tests

In test_create_instance_with_neutronv2_fixed_ip_already_in_use of both
v2 and v3, these tests pass wrong parameters "fixed-ip" instead of
valid parameter "fixed_ip".
The purposes of these tests are to check the behaviors when passing
in-use addresses, but current tests contain two negative factors and
we cannot test the purposes now.

This patch fixes the parameters. This problem was detected through the
API validation works and Ic17d2227909c9180ca86c9d578dad4c73ec57dfc needs
this fixing.

Change-Id: I4d54a1522983c996431b995ed157b32d13c3bc88
Closes-Bug: #1331317
Merge "devref policy: code is canonical source of truth for API"
Merge "Removes the use of mutables as default args"
Merge "Add bulk create/destroy functionality to FloatingIP"
Merge "Completely object-ify the floating_ips_bulk V2 extension"
Merge "Move the fixed_ips APIv2 extension to use objects"
Merge "Object-ify server_password APIv2 extension"