libvirt: remove use of CONF.libvirt.virt_type in vif.py

The vif.py class imports the CONF.libvirt.virt_type parameter
from the main driver.py file. This sets up a circular dependency
which prevents driver.py importing vif.py in the top of the file,
since the CONF.libvirt.virt_type parameter won't have been
registered yet.

It is generally bad design practice to rely on global variables,
which is effectively what the CONF.* parameters are, so change
the VIF driver get_config() API to accept 'virt_type' as a
parameter instead.

Related-bug: #1302796
Change-Id: I023851df96640eeeb54124add8cc5c725b8d13be
libvirt: remove 'vif_driver' config parameter

The 'vif_driver' config parameter was deprecated in the
previous cycle, so can be deleted now.

The two places in the test file which were overriding
the 'vif_driver' config parameter were redundant as
mocking already ensured the real VIF driver module
was not exercised.

The FakeVIFDriver class is thus no longer required, and
the FakeIptablesFirewallDriver class was already not
required, so both are deleted.

DocImpact
Related-bug: #1302796
Change-Id: I75519266ffc65df92efd20badfeaf88ac0d66f8a
Fix the error status code of duplicated agents

If posting the duplicated agent info to "create a agent" API, Nova v2
API returns a HTTP500 response(Internal Server Error).
The duplicated resources are not internal errors and this behavior has
been fixed on Nova v3 API. In this case, Nova v3 API returns a HTTP409
response(Conflict).
This patch fixes it for Nova v2 API.

Change-Id: I0b9424f9792270f6807cabcbf27a0f6e5ec42669
Merge BadRequest tests of "create a keypair" API

In test_attach_interfaces, there are BadRequest tests of "create a keypair".
Most parts of them are duplicated.
This patch merges them for the readability and clarifying their purposes.

Change-Id: I784f5d05969aa9a0c85b63f064190ab4e92ed7f7
Merge "Fix the error status code of duplicated agents"
Merge "Merge BadRequest tests of "create a keypair" API"
Merge "libvirt: remove use of CONF.libvirt.virt_type in vif.py"
Merge "libvirt: remove 'vif_driver' config parameter"