def run_list(self): key = Consts.STATIC_PREFIX_ALLOC_PARAM_KEY resp = self.client.get_keys([key]) if key not in resp.keyVals: print("Static allocation is not set in KvStore") else: utils.print_allocations_table(resp.keyVals.get(key).value)
def _run(self, client: OpenrCtrl.Client) -> None: key = Consts.STATIC_PREFIX_ALLOC_PARAM_KEY resp = client.getKvStoreKeyVals([key]) if key not in resp.keyVals: print("Static allocation is not set in KvStore") else: utils.print_allocations_table(resp.keyVals.get(key).value)
def print_allocations(self, key: str, keyVals: openr_types.KeyVals, area: str = None) -> None: if key not in keyVals: print("Static allocation is not set in KvStore") else: area_str = ("" if area is None else f'Static prefix allocations in area "{area}"') print(area_str) utils.print_allocations_table(keyVals.get(key).value)