From: Tomer Haskalovitch Date: Wed, 17 Sep 2025 10:50:23 +0000 (+0300) Subject: mgr/dashboard: add nsid param to ns list command X-Git-Tag: testing/wip-rishabh-testing-20251003.155758-debug~20^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=551ff3dbd44c33c556134b319b5e0c97c7518547;p=ceph-ci.git mgr/dashboard: add nsid param to ns list command Signed-off-by: Tomer Haskalovitch --- diff --git a/src/pybind/mgr/dashboard/controllers/nvmeof.py b/src/pybind/mgr/dashboard/controllers/nvmeof.py index 06537c18946..40a7ad19e63 100644 --- a/src/pybind/mgr/dashboard/controllers/nvmeof.py +++ b/src/pybind/mgr/dashboard/controllers/nvmeof.py @@ -379,14 +379,17 @@ else: "List all NVMeoF namespaces in a subsystem", parameters={ "nqn": Param(str, "NVMeoF subsystem NQN"), + "nsid": Param(str, "NVMeoF Namespace ID to filter by", True, None), "gw_group": Param(str, "NVMeoF gateway group", True, None), }, ) @convert_to_model(model.NamespaceList) @handle_nvmeof_error - def list(self, nqn: str, gw_group: Optional[str] = None, traddr: Optional[str] = None): + def list(self, nqn: str, nsid: Optional[str] = None, + gw_group: Optional[str] = None, traddr: Optional[str] = None): return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.list_namespaces( - NVMeoFClient.pb2.list_namespaces_req(subsystem=nqn) + NVMeoFClient.pb2.list_namespaces_req(subsystem=nqn, + nsid=int(nsid) if nsid else None) ) @pick("namespaces", first=True) diff --git a/src/pybind/mgr/dashboard/openapi.yaml b/src/pybind/mgr/dashboard/openapi.yaml index f30651586dc..c724db5bd56 100755 --- a/src/pybind/mgr/dashboard/openapi.yaml +++ b/src/pybind/mgr/dashboard/openapi.yaml @@ -9301,6 +9301,12 @@ paths: required: true schema: type: string + - allowEmptyValue: true + description: NVMeoF Namespace ID to filter by + in: query + name: nsid + schema: + type: string - allowEmptyValue: true description: NVMeoF gateway group in: query