'Get model_update dict to use when we select a pool.
The pools implementation uses a volume[\'host\'] suffix of :poolname.
When the volume comes in with this selected pool, we sometimes use
a different pool (e.g. because the type says to use a different pool).
So in the several places that we do this, we need to return a model
update so that the volume will have the actual pool name in the host
suffix after the operation.
Given a volume_host, which should (might) have the pool suffix, and
given the CPG we actually chose to use, return a dict to use for a
model update iff an update is needed.
:param volume_host: The volume\'s host string.
:param cpg: The actual pool (cpg) used, for example from the type.
:returns: dict Model update if we need to update volume host, else None'

def _get_model_update(self, volume_host, cpg, replication=False, provider_location=None):

    model_update = {}
    host = volume_utils.extract_host(volume_host, 'backend')
    host_and_pool = volume_utils.append_host(host, cpg)
    if (volume_host != host_and_pool):
        model_update['host'] = host_and_pool
    if replication:
        model_update['replication_status'] = 'enabled'
    if (replication and provider_location):
        model_update['provider_location'] = provider_location
    if (not model_update):
        model_update = None
    return model_update
