Example #1
0
    def dump_nodes_kvs(self, nodes: set, all_nodes_to_ips: Dict, area: str = None):
        """ get the kvs of a set of nodes """

        kv_dict = {}
        for node in nodes:
            node_ip = all_nodes_to_ips.get(node, node)
            kv = utils.dump_node_kvs(self.cli_opts, node_ip, area)
            if kv is not None:
                kv_dict[node] = kv.keyVals
                print("dumped kv from {}".format(node))
        return kv_dict
Example #2
0
    def dump_nodes_kvs(self, nodes, all_nodes_to_ips):
        """ get the kvs of a set of nodes """

        kv_dict = {}
        for node in nodes:
            node_ip = all_nodes_to_ips.get(node, node)
            kv = utils.dump_node_kvs(node_ip, self.kv_rep_port)
            if kv is not None:
                kv_dict[node] = kv.keyVals
                print("dumped kv from {}".format(node))
        return kv_dict
Example #3
0
    def get_dbs(self):

        # get LSDB from Decision
        decision_adj_dbs = self.client.get_adj_dbs()
        decision_prefix_dbs = self.client.get_prefix_dbs()

        # get LSDB from KvStore
        kvstore_keyvals = utils.dump_node_kvs(self.host,
                                              self.kv_rep_port).keyVals

        return decision_adj_dbs, decision_prefix_dbs, kvstore_keyvals