tsaitgaist has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-remsim/+/15469 )
Change subject: remsim-apitool.py: pass IDs as integer ...................................................................... remsim-apitool.py: pass IDs as integer currently the bankId, clientId, and slotNr are passed as strings. this is not the format expected by the server, which returns 400 "Bad Request". the issue was that the python tool did not parse the arguments as integer. Change-Id: I8baab1b516067f47a7d230213e44d8f85e6d9919 --- M contrib/remsim-apitool.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified lynxis lazus: Looks good to me, approved diff --git a/contrib/remsim-apitool.py b/contrib/remsim-apitool.py index 7662ae4..50f0e72 100755 --- a/contrib/remsim-apitool.py +++ b/contrib/remsim-apitool.py @@ -69,7 +69,7 @@ group.add_argument("-c", "--show-clients", help="show clients (GET /clients)",nargs='?',const="all",default=None) group.add_argument("-b", "--show-banks", help="show banks (GET /banks)",nargs='?',const="all",default=None) group.add_argument("-s", "--show-slotmaps", help="show slotmaps (GET /slotmaps)",nargs='?',const="all",default=None) - group.add_argument("-m", "--create-slotmap", help="create new slotmap (POST /slotmaps)",nargs=4,metavar=('bank_id', 'bank_slot','client_id','client_slot')) + group.add_argument("-m", "--create-slotmap", help="create new slotmap (POST /slotmaps)", type=int, nargs=4,metavar=('bank_id', 'bank_slot','client_id','client_slot')) group.add_argument("-d", "--delete-slotmap", help="delete slotmapping (DELETE /slotmaps/<id>)", type=int, nargs=2, metavar=('bank_id','bank_slot')) group.add_argument("-a", "--show-all", help="show all (default if no argument given)", action="store_true") -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/15469 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I8baab1b516067f47a7d230213e44d8f85e6d9919 Gerrit-Change-Number: 15469 Gerrit-PatchSet: 2 Gerrit-Owner: tsaitgaist <kre...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lyn...@fe80.eu> Gerrit-Reviewer: tsaitgaist <kre...@sysmocom.de> Gerrit-MessageType: merged