NVMeoFClient.pb2.get_thread_stats_req()
)
+ @UpdatePermission
+ @Endpoint('PUT', '/refresh_network')
+ @NvmeofCLICommand(
+ "nvmeof gateway refresh_network", model.GwRefreshNetworkStatus,
+ alias="nvmeof gw refresh_network",
+ success_message_template=("Refreshed configured network masks for subsystem "
+ "{nqn} on this gateway: Successful{added}{removed}"),
+ success_message_map={
+ "added": lambda v, _f: f"\nAdded: {', '.join(v)}" if v else "",
+ "removed": lambda v, _f: f"\nRemoved: {', '.join(v)}" if v else "",
+ }
+ )
+ @EndpointDoc(
+ "Re-evaluate subsystem network masks and update auto-listeners for this gateway",
+ parameters={
+ "nqn": Param(str, "NVMeoF subsystem NQN"),
+ "gw_group": Param(str, "NVMeoF gateway group", True, None),
+ "server_address": Param(str, "NVMeoF gateway address", True, None),
+ "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
+ },
+ )
+ @convert_to_model(model.GwRefreshNetworkStatus)
+ @handle_nvmeof_error
+ def refresh_network(self, nqn: str, gw_group: Optional[str] = None,
+ server_address: Optional[str] = None,
+ traddr: Optional[str] = None):
+ server_address = resolve_nvmeof_server_address(
+ server_address=server_address,
+ traddr=traddr
+ )
+ return NVMeoFClient(
+ gw_group=gw_group,
+ server_address=server_address
+ ).stub.gw_refresh_network(
+ NVMeoFClient.pb2.gw_refresh_network_req(subsystem_nqn=nqn)
+ )
+
@APIRouter("/nvmeof/spdk", Scope.NVME_OF)
@APIDoc("NVMe-oF SPDK Management API", "NVMe-oF SPDK")
class NVMeoFSpdk(RESTController):
summary: Set NVMeoF gateway log levels
tags:
- NVMe-oF Gateway
+ /api/nvmeof/gateway/refresh_network:
+ put:
+ parameters: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ properties:
+ gw_group:
+ description: NVMeoF gateway group
+ type: string
+ nqn:
+ description: NVMeoF subsystem NQN
+ type: string
+ server_address:
+ description: NVMeoF gateway address
+ type: string
+ traddr:
+ description: NVMeoF gateway address (deprecated)
+ type: string
+ required:
+ - nqn
+ type: object
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ type: object
+ application/vnd.ceph.api.v1.0+json:
+ schema:
+ type: object
+ description: Resource updated.
+ '202':
+ content:
+ application/json:
+ schema:
+ type: object
+ application/vnd.ceph.api.v1.0+json:
+ schema:
+ type: object
+ description: Operation is still executing. Please check the task queue.
+ '400':
+ description: Operation exception. Please check the response body for details.
+ '401':
+ description: Unauthenticated access. Please login first.
+ '403':
+ description: Unauthorized access. Please check your permissions.
+ '500':
+ description: Unexpected error. Please check the response body for the stack
+ trace.
+ security:
+ - jwt: []
+ summary: Re-evaluate subsystem network masks and update auto-listeners for this
+ gateway
+ tags:
+ - NVMe-oF Gateway
/api/nvmeof/gateway/stats:
get:
parameters: