Extend API schema for "create a server" extensions

Some v2.1/v3 APIs(create/update/rebuild server) contains the API
extension feature, it searches extension methods with its method
name and operates them automatically.
It is necessary to change the API schemas also automatically based
on the API extension loading condition, because the API extensions
add API parameters.

This patch adds API schema extensions which are implemented with the
same mechanism (stevedore library) as the API extension for "create
a server" extensions. As a sample of API schema extensions, this
patch adds the schema of keypair extension.

Partially implements blueprint v3-api-schema

Change-Id: I972d648546b1fcb37c6ad5e12a0a49ce810a35f9
Improved error logging in nova-network for allocate_fixed_ip()

When a Nova deployment runs out of fixed IP addresses, allocating
another IP ends with stack trace without clear explanation.
To prevent such behavior this patch introduces few try-except blocks
that writes appropriate error message to the log file and return
better error code via API instead of stack trace.

Change-Id: I8111ae883719ad693113e1d3bfedc8685427c55f
Closes-Bug: #1218572
Add missed discoverable policy rules for flavor-manage v3

Add discoverable policy rule for v3 extension flavor-manage,
Although without this patch, it also works. But that's used to
indicate to user there is option for flavor-manager discoverable.

Change-Id: I23f8bbaccfa104a12e4a4c9eea8bf04107b57d43
Diagnostics: add validation for types

When creating diagnostics the calling application is able to pass
cpu, nic and disk diagnostics. This patch validates that those are of
the correct type.

TrivialFix

Change-Id: Id76c37e2f3ff50b0029bb1fa26348e43aee432f1
Migrate test_glance from mox to mock

A few tests in test_glance.py are still using mox. Update these
remaining tests to use mock, as this is the general direction in
which the project is moving.

Change-Id: I81fc36467b158625f29593c7173542f843244311
Add expire reservations in backport position.

Change-Id: If0e58da50ebe9b50b414737a9bd81d93752506e2
Related-bug: #1348720
Merge "Add missed discoverable policy rules for flavor-manage v3"
Merge "Add expire reservations in backport position."
Merge "Migrate test_glance from mox to mock"
Merge "Diagnostics: add validation for types"
Merge "Improved error logging in nova-network for allocate_fixed_ip()"
Merge "Extend API schema for "create a server" extensions"