)
)
+ @APIRouter("/nvmeof/gateway_group/{gw_group}/namespace", Scope.NVME_OF)
+ @APIDoc("NVMe-oF Gateway Management API", "NVMe-oF Gateway")
+ class NVMeoFGatewayGroup(RESTController):
+ @Endpoint('GET')
+ @EndpointDoc(
+ "List all NVMeoF namespaces in a gateway group",
+ parameters={
+ "gw_group": Param(str, "NVMeoF gateway group", True, None),
+ "server_address": Param(str, "NVMeoF gateway address", True, None),
+ },
+ )
+ @convert_to_model(model.NamespaceList)
+ @handle_nvmeof_error
+ def list(self, gw_group: str, server_address: Optional[str] = None):
+ return NVMeoFClient(
+ gw_group=gw_group,
+ server_address=server_address
+ ).stub.list_namespaces(
+ NVMeoFClient.pb2.list_namespaces_req()
+ )
+
@APIRouter("/nvmeof/subsystem/{nqn}/namespace", Scope.NVME_OF)
@APIDoc("NVMe-oF Subsystem Namespace Management API", "NVMe-oF Subsystem Namespace")
class NVMeoFNamespace(RESTController):
}
listNamespaces() {
- this.nvmeofService
- .listNamespaces(this.subsystemNQN, this.group)
- .subscribe((res: NvmeofSubsystemNamespace[]) => {
- this.namespaces = res;
- });
+ this.nvmeofService.listNamespaces(this.group).subscribe((res: NvmeofSubsystemNamespace[]) => {
+ this.namespaces = res;
+ });
}
deleteNamespaceModal() {
describe('test namespace APIs', () => {
const mockNsid = '1';
it('should call listNamespaces', () => {
- service.listNamespaces(mockNQN, mockGroupName).subscribe();
- const req = httpTesting.expectOne(
- `${API_PATH}/subsystem/${mockNQN}/namespace?gw_group=${mockGroupName}`
- );
+ service.listNamespaces(mockGroupName).subscribe();
+ const req = httpTesting.expectOne(`${API_PATH}/gateway_group/${mockGroupName}/namespace`);
expect(req.request.method).toBe('GET');
});
it('should call getNamespace', () => {
}
// Namespaces
- listNamespaces(subsystemNQN: string, group: string) {
- return this.http.get(`${API_PATH}/subsystem/${subsystemNQN}/namespace?gw_group=${group}`);
+ listNamespaces(group: string) {
+ return this.http.get(`${API_PATH}/gateway_group/${group}/namespace`);
}
getNamespace(subsystemNQN: string, nsid: string, group: string) {
summary: Get the version of the NVMeoF gateway
tags:
- NVMe-oF Gateway
+ /api/nvmeof/gateway_group/{gw_group}/namespace:
+ get:
+ parameters:
+ - description: NVMeoF gateway group
+ in: path
+ name: gw_group
+ required: true
+ schema:
+ type: string
+ - allowEmptyValue: true
+ description: NVMeoF gateway address
+ in: query
+ name: server_address
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/vnd.ceph.api.v1.0+json:
+ type: object
+ description: OK
+ '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: List all NVMeoF namespaces in a gateway group
+ tags:
+ - NVMe-oF Gateway
+ /api/nvmeof/gateway_group/{gw_group}/namespace/list:
+ get:
+ parameters:
+ - description: NVMeoF gateway group
+ in: path
+ name: gw_group
+ required: true
+ schema:
+ type: string
+ - allowEmptyValue: true
+ description: NVMeoF gateway address
+ in: query
+ name: server_address
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/vnd.ceph.api.v1.0+json:
+ type: object
+ description: OK
+ '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: List all NVMeoF namespaces in a gateway group
+ tags:
+ - NVMe-oF Gateway
/api/nvmeof/spdk/log_level:
get:
parameters: