def _restart_for_application_change(
        self, node_state, state, configuration
    ):
        volume_state = state.volume
        volume_configuration = configuration.volume

        restart_state = state.restart_policy
        # The volume comparison is too complicated to leave up to `!=` below.
        # Check volumes separately.
        # Restart policies don't implement comparison usefully.  See FLOC-2500
        # XXX This is an optimization to assign both values with a single call
        # to ``set``.  ``set`` is slow.
        comparable_state = state.set(
            volume=None,
            restart_policy=RestartNever(),
        )
        comparable_configuration = configuration.set(
            volume=None,
            restart_policy=RestartNever(),
        )

        return (
            comparable_state != comparable_configuration or

            # Restart policies were briefly supported but they interact poorly
            # with system restarts.  They're disabled now (except for the
            # default policy, "never").  Ignore the Application's configured
            # policy and enforce the "never" policy.  This will change any
            # existing container that was configured with a different policy.
            # See FLOC-2449.
            #
            # Also restart policies don't implement comparison usefully.  See
            # FLOC-2500.
            not isinstance(restart_state, RestartNever) or

            self._restart_for_volume_change(
                node_state, volume_state, volume_configuration
            )
        )
Returns a wsgi application
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/_container.py/ApplicationNodeDeployer._restart_for_application_change--crossover with--dataset/ETHPy150Open openstack/wsme/wsme/root.py/WSRoot.wsgiapp