Should finish allocating network before VM reaches ACTIVE

This patch can fix issues like tempest caused by async
network allocation. Nova uses NetworkInfoAsyncWrapper
to allocate network in an async manner, and this allows
one to start querying for network info before you know
you will need it. Nova will invoke refresh_cache method
to update instance_cache_info after excuting the
allocate_for_instance method as well.

However, nova rest api will query instance_cache_info
directly, thus maybe get the empty network info before
instance_cache_info table has been updated asynchronously.
Thus will cause VM can exist without a known address
accidentally, the caller is difficult to distinguish
this situation, unless waiting for some internal process
or it will not have an address. So should finish
allocating network before the VM reaches ACTIVE status.
For more detail can refer the bug description.

BTW, almost all create server related unit tests have
coverred this case.

Closes-Bug: #1210483
Change-Id: Iab542df1be7d5c9661d717ec596d2a37b975169a
Increase volume created checking retries to 60

In some cases 30 retries with 1 sec interval is not enough for
volume to be created.
Increased max tries to 60

Fixes bug 1213953

Change-Id: I6bcd395a4bac940387384cc85691d7219cf90e63
Fixes misuse of assertTrue in test scripts

Misuse of assertTrue in places where assertEqual or assertIn should be used.

If assertTrue is used, the test will always pass
if the first argument's boolean cast is True. The second argument
passed to assertTrue() will be regarded as the error message
when the assertion fails.

Fixes bug #1223620

Change-Id: I46b51bf944ba22247901172650ea6867dd525aa7
Edits for nova.conf.sample

- replace "quotaing" with "quota checking"
- add space so shouldalways becomes "should always"

Modifies docstrings that we use to generate docs for config option
descriptions.

Change-Id: Ieca85ee997b9f85e9748387ee031714ad1b73f6b
Add instance_flavor_id to the notification message

Through Ceilometer,We can see the notification message just has
instance_type_id, for example,
    "instance_type" :"m1.nano"
    "instance_type_id": "6",
There is some confusion ,flavorid "42" should be added to the message.

bug 1217429

Change-Id: Id71e9480d243e7fc343bf9f7ea1faf2d87f01541
xenapi: Fix rescue

commit 4389f2292a0177c8eedc0a398ceb3c5535a9ef82 appears to have broken
rescue on xenapi. The xenapi driver requires the actual image id to be
in the "image_meta" parameter to the rescue driver.

bug 1227350

Change-Id: Ifce27ab26eb5f998850faeefe5f21a4705439821
Add missing get_available_nodes() refresh arg

In commit 3d96f85 (review I22c8d70e3e70f2d2421915da66c2618688e0db2b)
we added a refresh=False kwarg to get_available_nodes() but forgot to
add the arg to the baremetal and vmware drivers.

Use the kwarg in tests to catch this case.

Change-Id: Ib7998aafefdeac47bfad53614927c0346f193adf
Fix use of bare list/dict types in instance_group object

The instance_group object was merged before we had helpers for
dict and list objects of strings. This makes that object use those
for schema safety.

Change-Id: I1f68e43a83f140f7b29b17c0961b267e64e48390
Closes-bug: 1221383
Add new-world Quota object

Adds a Quota object that can track reservations.  This allows us to be
more OOP-like.  No code uses this yet but a follow-up patch will fix a
bug where compute is querying the DB.

Related to blueprint unified-object-model

Change-Id: I9f435691f12c7c268f754bb23a6330a7a2c419e4
Fix quota direct DB access in compute

This fixes the quota direct DB access in compute by using the new Quota
object.

Related to blueprint unified-object-model

Change-Id: Ib6ed6cc3b3f3f49cca1e89c0fb6e501201febd24
Closes-Bug: 1226759
Merge "Increase volume created checking retries to 60"
Merge "Fix use of bare list/dict types in instance_group object"
Merge "Add new-world Quota object"
Merge "Fix quota direct DB access in compute"
Merge "Add instance_flavor_id to the notification message"
Merge "Add missing get_available_nodes() refresh arg"
Merge "Fixes misuse of assertTrue in test scripts"
Merge "Should finish allocating network before VM reaches ACTIVE"
Merge "xenapi: Fix rescue"
Merge "Edits for nova.conf.sample"