Correct exception handling when create aggregate

when create an aggregate, InvalidAggregateAction might be raised,
this patch translates the InvalidAggregateAction to HTTPBadRequest.
Also, 2 unnecessary logs was removed becuase log is not output in
most BadRequest.

Change-Id: I3dac808d8edab6118e347eb5d78b96f96b9d40ca
Add read_only field attribute

Some fields of an object are created by the database automatically
like 'id' in service object, thus should not be changed in general.

Add a read_only field attribute to specify such situation, which
can only be set once and can't be changed any more.

Change-Id: I25ba81ed7ec0d16782a59851944a14792d4c84ce
Simplify filter_scheduler.populate_retry()

This is the exactly what dict.setdefault() is useful for.

Change-Id: I356af8f87b84fb23383c06080b8fd373054b5949
libvirt: Remove dated docstring

The docstring is out of date, we can update it or remove it.
The libvirt_opts includes all the details, so remove it.

Change-Id: Ia903ff71509b4228faf0580893c4720b5d8b9c61
Move set_admin_password tests from test_compute.py to api/mgr modules

To prepare for converting the set_admin_password compute API flow to use
objects consistently, i.e. no direct database updates, use dot notation
to access instance object attributes, etc, the unit tests need to be
refactored and moved from test_compute.py into test_compute_api.py and
test_compute_mgr.py to properly unit test the compute api and manager
changes, respectively.

As part of the move, the tests are re-written with mock.

Part of blueprint compute-manager-objects-juno

Change-Id: I5815f7dec3105440f1b211d7bac98888fde7a576
Remove duplicate method

Duplicate method(_do_test_create_instance_above_quota)
are found in compute/test_servers.py. Remove it.

Change-Id: I0753992cadc40adce40999bb5ae8ecd503bd53bc
Merge "Add read_only field attribute"
Merge "Simplify filter_scheduler.populate_retry()"
Merge "Remove duplicate method"
Merge "Correct exception handling when create aggregate"
Merge "libvirt: Remove dated docstring"
Merge "Move set_admin_password tests from test_compute.py to api/mgr modules"
Add missing stats info to BaremetalNodeState

BaremetalNodeState lacks stats info needed by some filters during
scheduling. This may result in failures like ComputeCapabilitiesFilter
not returning any hosts.

Change-Id: I63d992371640b2fd33d35eae72201fd41944f8a4
Partial-Bug: #1260265
Fix BaremetalHostManager node detection logic

Change-Id: I0c2e6d985fb29f35b823cdf9a83fead2fa45082a
Partial-Bug: #1260265
Remove traces of now unused host capabilities from scheduler

This is take two of this patch. This time after preparing Baremetal
and Ironic code to work with the HostManager changes introduced in
this patch.

Change-Id: Id5f88c0aa1df9152ddb62904b0544801a8bcfd2a
Closes-Bug: #1260265