Fix type is overwritten when UPDATE cell without type specified

If you not specified the 'cell-type' in UPDATE request,
  the value will be overwritten by the default value, 'child'.
That's not correct, you need to reserve the existing cell-type.

The issue is also involved in the new V3-api.

Fixes bug: 1224461

Change-Id: I5c5043b9e5e0c33995422094284c3f19aac78593
Ensure image property not set to None in build_request_spec()

This is in preparation for having scheduler.util.build_request_spec()
construct the request_spec in the live migration code. Specifically, this
change is needed to avoid reintroducing bug #1199811.

Change-Id: I0cc6b6ec7be7a0afbe184b208f2e16fd5cd4452c
Related-Bug: #1224014
Make LiveMigrateTask use build_request_spec()

Some filters like TrustedFilter makes use of extra_specs. Currently,
when live-migration uses the scheduler to select a host, it constructs
a request_spec that has no extra_specs in it.

By making use of the existing helper method build_request_spec(), the
request to the scheduler will include extra_specs.

Change-Id: I5bc6c6418653c256a42da7b0a343086ec9863da1
Closes-Bug: #1224014
Resource limits check sometimes enforced for forced scheduling

Resource limit checks on a compute manager are based on the
contents of filter_properites['limits'].   This in turn is
populated by the scheduler after the host has been selected by
scheduler.utils.populate_filter_properties.   The limits value
is taken from the host_state, which is maintained as a local data
in the host manager. The host_state limits values are populated
by the various filters, for example the ram filter sets
limits['memory_mb'] based on its configuration.

In the case of scheduling to a forced host the filters are
bypassed, so the contents of the host_state['limits'] value
depends on whether the scheduler has already placed a non-forced
instance onto that host (and thus run the filters to populate the
limits).   If it has then the compute manager will impose the
limits, if it hasn't then the limits will be empty and there will
be no check.

As forcing bypasses the filters and is a privileged operation the
limits should always be cleared in the filter_properties in this
case to avoid the limit check on the compute manager.

Fixed bug: 1231963

Change-Id: Ic7ff5d1fc652a8bdf6a0cf8e6ef063d9f2e7ab16
VMware: Handle cases when there are no hosts in cluster

When there are no hosts defined in a cluster the host value will be an empty
string. For example:

    obj_context: (RetrieveResult){
       objects[] =
          (ObjectContent){
             obj =
                (obj){
                   value = "domain-c185"
                   _type = "ClusterComputeResource"
                }
             propSet[] =
                (DynamicProperty){
                   name = "host"
                   val = ""
                },
          },
     }

This causes an data access exception.

The code will now raise an NoValidHost exception.

Fixes bug: 1197041

Change-Id: I75b1f069e0b27eebd63c280e36533354c04e246a
Make rbd.libvirt_info parent class compatible

Rbd.libvirt_info function definition misses hypervisor_version argument added in change:
https://review.openstack.org/32379

Closes-Bug: #1233188
Change-Id: Ib68d743e783af0f6d82d2ba180869ee642e86050
Fix the wrong params of attach/detach interface for compute driver

The reason of attach_interface failed is current code passing VIF object
to attach_interface, but it expected NetworkInfo object. And as the
comment of attach/detach_interface, they should only accept one
interface to instance. So correct the interface signature only accept
an VIF object. And correct the fake driver behavior, make the test running
correctly.

Change-Id: Id0d28c39fb543853bd710fcb3c3b611306b4fb8f
Close-bug: #1233504
Fixes several misc typos in scheduler code

Change-Id: Id7d86e3be34b650a63679ba086abcb13dfac2eb8
Closes-bug: #1234902
Merge "VMware: Handle cases when there are no hosts in cluster"
Merge "Fix type is overwritten when UPDATE cell without type specified"
Merge "Ensure image property not set to None in build_request_spec()"
Merge "Make LiveMigrateTask use build_request_spec()"
Merge "Resource limits check sometimes enforced for forced scheduling"
Merge "Make rbd.libvirt_info parent class compatible"
Merge "Fixes several misc typos in scheduler code"
Merge "Fix the wrong params of attach/detach interface for compute driver"
Fix races in cells extension tests

A global was used for a cell list and tests would update this global and
fail depending on order run, etc.

Fixes bug 1235399

Change-Id: Ib06cfc89076e87ac3cfedd796687059862f20406