예제 #1
0
 def _run(self, client: OpenrCtrl.Client, nodes: Any, json: bool) -> None:
     keyDumpParams = self.buildKvStoreKeyDumpParams(Consts.PREFIX_DB_MARKER)
     resp = client.getKvStoreKeyValsFiltered(keyDumpParams)
     if json:
         utils.print_prefixes_json(resp, nodes, self.iter_publication)
     else:
         utils.print_prefixes_table(resp, nodes, self.iter_publication)
예제 #2
0
파일: decision.py 프로젝트: wlm328cs/openr
 def _run(
     self,
     client: OpenrCtrl.Client,
     nodes: set,
     json: bool,
     prefix: str,
     client_type: str,
 ) -> None:
     prefix_dbs = client.getDecisionPrefixDbs()
     if json:
         utils.print_prefixes_json(prefix_dbs, nodes, prefix, client_type,
                                   self.iter_dbs)
     else:
         utils.print_prefixes_table(prefix_dbs, nodes, prefix, client_type,
                                    self.iter_dbs)
예제 #3
0
파일: kvstore.py 프로젝트: wlm328cs/openr
 def print_prefix(
     self,
     resp: Dict[str, openr_types.Publication],
     nodes: set,
     json: bool,
     prefix: str,
     client_type: str,
 ):
     all_kv = openr_types.Publication()
     all_kv.keyVals = {}
     for _, val in resp.items():
         all_kv.keyVals.update(val.keyVals)
     if json:
         utils.print_prefixes_json(all_kv, nodes, prefix, client_type,
                                   self.iter_publication)
     else:
         utils.print_prefixes_table(all_kv, nodes, prefix, client_type,
                                    self.iter_publication)
예제 #4
0
 def run(self, nodes, json):
     prefix_dbs = self.client.get_prefix_dbs()
     if json:
         utils.print_prefixes_json(prefix_dbs, nodes, self.iter_dbs)
     else:
         utils.print_prefixes_table(prefix_dbs, nodes, self.iter_dbs)
예제 #5
0
 def run(self, nodes, json):
     resp = self.client.dump_all_with_prefix(Consts.PREFIX_DB_MARKER)
     if json:
         utils.print_prefixes_json(resp, nodes, self.iter_publication)
     else:
         utils.print_prefixes_table(resp, nodes, self.iter_publication)