Adds diagnostics command for the libvirt driver.

This code provides an implementation of the get_diagnostics
API for the libvirt driver. This API is invoked by the
'nova diagnostic' command.

There is no existing formal specification for what data items
to expose from the 'get_diagnostics' API, so the XenAPI driver
is used as an informal guide. The Xen implementation currently
produces the following output:

+----------------+-----------------+
|    Property    |      Value      |
+----------------+-----------------+
| cpu0           | 4.3627          |
| memory         | 1171088064.0000 |
| memory_target  | 1171088064.0000 |
| vbd_xvda_read  | 0.0             |
| vbd_xvda_write | 0.0             |
| vif_0_rx       | 3223.6870       |
| vif_0_tx       | 0.0             |
| vif_1_rx       | 104.4955        |
| vif_1_tx       | 0.0             |
+----------------+-----------------+

The new libvirt implementation will return a similar set of stats
for guest CPUs, memory, disks and network interfaces, resulting
in the following output:

+------------------+------------+
| Property         | Value      |
+------------------+------------+
| cpu0_time        | 2870000000 |
| memory           | 524288     |
| vda_errors       | -1         |
| vda_read         | 262144     |
| vda_read_req     | 112        |
| vda_write        | 5606400    |
| vda_write_req    | 376        |
| vnet0_rx         | 63343      |
| vnet0_rx_drop    | 0          |
| vnet0_rx_errors  | 0          |
| vnet0_rx_packets | 431        |
| vnet0_tx         | 4905       |
| vnet0_tx_drop    | 0          |
| vnet0_tx_errors  | 0          |
| vnet0_tx_packets | 45         |
+------------------+------------+

The implementation has only been tested with the libvirt KVM
driver.

In a future a formal specification for the required data
format should be written and all virt drivers made to comply.

Finally, the fakelibvirt driver has been updated in order to
support the methods required by the get_diagnostics method.

For those interested, below is the formula to extract the
CPU usage based on the CPU time. I've added it here for reference
since it's not used at the moment and it took quite a while
to locate it in the libvirt documentation.

  usage = 100 * (current_cpu_time - last_cpu_time) /
          (measurement_interval * (10 ** 9))

Fixes bug 986200.
Change-Id: I92da392f43d0840ed31cfd88f54570ea5830bb4a
Don't block instance delete on missing block device volume

It's easy to create an undeletable instance by specifying an invalid
volume id in the block device mapping. The instance errors, but
subsequent delete fails because the volume is missing. We already
ignore the DiskNotFound case during delete, so this adds a case for
VolumeNotFound.

Change-Id: Ibc516ee4452d088cddf10bbeb315697ce900e5c5
Refactors more snapshot code into vm_utils.

Simplifies vmops a bit while moving logic into vmutils where it better
matches how we've seperated concerns.

Change-Id: Ic6d7559903d0f809f4c90577f4a8c4a0857cae90
allows setting accessIPvs to null via update call

fixes bug 1022700

Change-Id: I4b37508ebec1ea23d8dfd91c41ecbd96b2d701bc
Merge "Refactors more snapshot code into vm_utils."
Merge "allows setting accessIPvs to null via update call"
Adds bootlocking to the xenserver suspend and resume

Bootlock prevents an instance from being resumed accidentally if the dom0
were rebooted or a whole slew of other possible interactions. We'd prefer to
keep suspended instances suspended.

Change-Id: I82fb734b79270aa87cd3bb08797885d5fda11f6b
Imports base64 to fix xen file injection

Adds base64 to agent.py as its required for file injection to work.

Fixes bug 1023698

Change-Id: I231b6f5e031106471aeff38769e8fc79dcd45b45
Fix .mailmap to generate unique AUTHORS list.

As per 3456b667c38aa1d439482b9c95838aba6d3d6c5c, Monty
merged code to generate AUTHORS file.

With this fix, git log honors .mailmap specification,
irrespective of name/email combination used for commit and
generate unique entries in AUTHORS file.

* .mailmap
  Handle all full name/email combination to ensure following
  command return unique records.
   $ git log --format="%aN <%aE>"

Change-Id: I44f1db1a991fd312ab37455b44985281ed1d392f
Remove deprecated auth-related db code

* Remove user_*, auth_token_* and project_* db api
  functions (except project_get_networks)
* Remove User, Project, AuthToken, UserProjectRoleAssociation,
  UserRoleAssociation, and UserProjectAssociation db models
* Add two migrations:
  * 109 removes the project_id fkey from dns_domains
  * 110 drops tables that correspond to the deleted models
* Related to bp remove-deprecated-auth

Change-Id: Iaacae0e5c0050e94b92e16ab5d8129eadb56c5a7
Merge "Adds diagnostics command for the libvirt driver."
Merge "Imports base64 to fix xen file injection"
Merge "Don't block instance delete on missing block device volume"
Merge "Fix .mailmap to generate unique AUTHORS list."
Merge "Adds bootlocking to the xenserver suspend and resume"
Display key_name only if keypairs extension is used

Fixes bug 1024986

Change-Id: Ie37880f63b7595ae3dd2f3b23c6c3097dac2f57c