def action_check_pod_state(self, pods, params):
        """
            Checks that all the pods are in desired state.
        """
        state = params.get("state")
        success = True
        for pod in pods:
            if not self.match_property(
                candidate=pod,
                criterion=dict(
                    name="state",
                    value=state,
                )
            ):
                self.logger.error("Expected pod in state '%s', got '%s' (%r)", state, pod.state, pod)
                success = False
        return success

            Checks that all the pods are in desired state.
        
powerfulseal/policy/action_pods.py