'Update the resource usage and stats after a change in an
instance'

@utils.synchronized(COMPUTE_RESOURCE_SEMAPHORE)
def update_usage(self, context, instance, nodename):

    if self.disabled(nodename):
        return
    uuid = instance['uuid']
    if (uuid in self.tracked_instances):
        self._update_usage_from_instance(context, instance, nodename)
        self._update(context.elevated(), self.compute_nodes[nodename])
