def _check_instance_is_active(self):
    if (self.instance.power_state not in (power_state.RUNNING, power_state.PAUSED)):
        raise exception.InstanceInvalidState(instance_uuid=self.instance.uuid, attr='power_state', state=self.instance.power_state, method='live migrate')
def _check_instance_is_active(self):
    if (self.instance.power_state not in (power_state.RUNNING, power_state.PAUSED)):
        raise exception.InstanceInvalidState(instance_uuid=self.instance.uuid, attr='power_state', state=self.instance.power_state, method='live migrate')