예제 #1
0
    def validate(cli_opts, json, area):  # noqa: B902
        """
        Check all prefix & adj dbs in Decision against that in KvStore

        If --json is provided, returns database diffs in the following format.
        "neighbor_down" is a list of nodes not in the inspected node's dump that were expected,
        "neighbor_up" is a list of unexpected nodes in inspected node's dump,
        "neighbor_update" is a list of expected nodes whose metadata are unexpected.
            {
                "neighbor_down": [
                    {
                        "new_adj": null,
                        "old_adj": $inconsistent_node
                    }
                ],
                "neighbor_up": [
                    {
                        "new_adj": $inconsistent_node
                        "old_adj": null
                    }
                ],
                "neighbor_update": [
                    {
                        "new_adj": $inconsistent_node
                        "old_adj": $inconsistent_node
                    }
                ]
            }
        """

        return_code = decision.DecisionValidateCmd(cli_opts).run(json, area)
        sys.exit(return_code)
예제 #2
0
파일: decision.py 프로젝트: zyh329/openr
    def validate(cli_opts):  # noqa: B902
        ''' Check all prefix & adj dbs in Decision against that in KvStore '''

        decision.DecisionValidateCmd(cli_opts).run()
예제 #3
0
 def print_decision_validate(self):
     decision.DecisionValidateCmd(self.cli_opts).run()