]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add missing ns commands 63988/head
authorTomer Haskalovitch <il033030@Tomers-MBP.lan>
Thu, 22 May 2025 10:35:26 +0000 (13:35 +0300)
committerTomer Haskalovitch <il033030@Tomers-MBP.lan>
Thu, 19 Jun 2025 19:05:24 +0000 (22:05 +0300)
Signed-off-by: Tomer Haskalovitch <il033030@Tomers-MBP.lan>
src/pybind/mgr/dashboard/controllers/nvmeof.py
src/pybind/mgr/dashboard/openapi.yaml
src/pybind/mgr/dashboard/services/proto/gateway.proto

index effb746741eea5059a72d1584da0b33d4c90f2b2..8c8987b769e222e7691bdf5e93000f3419ce2e83 100644 (file)
@@ -410,6 +410,276 @@ else:
                 )
             )
 
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/set_qos')
+        @EndpointDoc(
+            "set QOS for specified NVMeoF namespace",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "rw_ios_per_second": Param(int, "Read/Write IOPS"),
+                "rw_mbytes_per_second": Param(int, "Read/Write MB/s"),
+                "r_mbytes_per_second": Param(int, "Read MB/s"),
+                "w_mbytes_per_second": Param(int, "Write MB/s"),
+                "force": Param(
+                    bool,
+                    "Set QOS limits even if they were changed by RBD"
+                ),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns set_qos", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def set_qos(
+            self,
+            nqn: str,
+            nsid: str,
+            rw_ios_per_second: Optional[int] = None,
+            rw_mbytes_per_second: Optional[int] = None,
+            r_mbytes_per_second: Optional[int] = None,
+            w_mbytes_per_second: Optional[int] = None,
+            force: Optional[bool] = False,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(
+                gw_group=gw_group,
+                traddr=traddr
+            ).stub.namespace_set_qos_limits(
+                NVMeoFClient.pb2.namespace_set_qos_req(
+                    subsystem_nqn=nqn,
+                    nsid=int(nsid),
+                    rw_ios_per_second=rw_ios_per_second,
+                    rw_mbytes_per_second=rw_mbytes_per_second,
+                    r_mbytes_per_second=r_mbytes_per_second,
+                    w_mbytes_per_second=w_mbytes_per_second,
+                    force=force,
+                )
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/change_load_balancing_group')
+        @EndpointDoc(
+            "set the load balancing group for specified NVMeoF namespace",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "load_balancing_group": Param(int, "Load balancing group"),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns change_load_balancing_group", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def change_load_balancing_group(
+            self,
+            nqn: str,
+            nsid: str,
+            load_balancing_group: Optional[int] = None,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(
+                gw_group=gw_group,
+                traddr=traddr
+            ).stub.namespace_change_load_balancing_group(
+                NVMeoFClient.pb2.namespace_change_load_balancing_group_req(
+                    subsystem_nqn=nqn, nsid=int(nsid), anagrpid=load_balancing_group
+                )
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/resize')
+        @EndpointDoc(
+            "resize the specified NVMeoF namespace",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "rbd_image_size": Param(int, "RBD image size"),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns resize", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def resize(
+            self,
+            nqn: str,
+            nsid: str,
+            rbd_image_size: int,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            mib = 1024 * 1024
+            new_size_mib = int((rbd_image_size + mib - 1) / mib)
+
+            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_resize(
+                NVMeoFClient.pb2.namespace_resize_req(
+                    subsystem_nqn=nqn, nsid=int(nsid), new_size=new_size_mib
+                )
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/add_host')
+        @EndpointDoc(
+            "Adds a host to the specified NVMeoF namespace",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "host_nqn": Param(str, 'NVMeoF host NQN. Use "*" to allow any host.'),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns add_host", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def add_host(
+            self,
+            nqn: str,
+            nsid: str,
+            host_nqn: str,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_add_host(
+                NVMeoFClient.pb2.namespace_add_host_req(subsystem_nqn=nqn,
+                                                        nsid=int(nsid),
+                                                        host_nqn=host_nqn)
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/del_host')
+        @EndpointDoc(
+            "Removes a host from the specified NVMeoF namespace",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "host_nqn": Param(str, 'NVMeoF host NQN. Use "*" to allow any host.'),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns del_host", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def del_host(
+            self,
+            nqn: str,
+            nsid: str,
+            host_nqn: str,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_delete_host(
+                NVMeoFClient.pb2.namespace_delete_host_req(
+                    subsystem_nqn=nqn,
+                    nsid=int(nsid),
+                    host_nqn=host_nqn,
+                )
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/change_visibility')
+        @EndpointDoc(
+            "changes the visibility of the specified NVMeoF namespace to all or selected hosts",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "auto_visible": Param(bool, 'True if visible to all hosts'),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns change_visibility", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def change_visibility(
+            self,
+            nqn: str,
+            nsid: str,
+            auto_visible: str,
+            force: Optional[bool] = False,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_change_visibility(
+                NVMeoFClient.pb2.namespace_change_visibility_req(
+                    subsystem_nqn=nqn,
+                    nsid=int(nsid),
+                    auto_visible=str_to_bool(auto_visible),
+                    force=str_to_bool(force),
+                )
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/set_rbd_trash_image')
+        @EndpointDoc(
+            "changes the trash image on delete of the specified NVMeoF \
+                namespace to all or selected hosts",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "rbd_trash_image_on_delete": Param(bool, 'True if active'),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns set_rbd_trash_image", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def set_rbd_trash_image(
+            self,
+            nqn: str,
+            nsid: str,
+            rbd_trash_image_on_delete: str,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(
+                gw_group=gw_group,
+                traddr=traddr,
+            ).stub.namespace_set_rbd_trash_image(
+                NVMeoFClient.pb2.namespace_set_rbd_trash_image_req(
+                    subsystem_nqn=nqn,
+                    nsid=int(nsid),
+                    trash_image=str_to_bool(rbd_trash_image_on_delete),
+                )
+            )
+
+        @ReadPermission
+        @Endpoint('PUT', '{nsid}/refresh_size')
+        @EndpointDoc(
+            "refresh the specified NVMeoF namespace to current RBD image size",
+            parameters={
+                "nqn": Param(str, "NVMeoF subsystem NQN"),
+                "nsid": Param(str, "NVMeoF Namespace ID"),
+                "gw_group": Param(str, "NVMeoF gateway group", True, None),
+                "traddr": Param(str, "NVMeoF gateway address", True, None),
+            },
+        )
+        @NvmeofCLICommand("nvmeof ns refresh_size", model=model.RequestStatus)
+        @convert_to_model(model.RequestStatus)
+        @handle_nvmeof_error
+        def refresh_size(
+            self,
+            nqn: str,
+            nsid: str,
+            gw_group: Optional[str] = None,
+            traddr: Optional[str] = None
+        ):
+            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_resize(
+                NVMeoFClient.pb2.namespace_resize_req(
+                    subsystem_nqn=nqn,
+                    nsid=int(nsid),
+                    new_size=0
+                )
+            )
+
         @EndpointDoc(
             "Update an existing NVMeoF namespace",
             parameters={
index 939b2a5fd20eaa77e9e19f2efd3c2745a0c3f9fe..b193aa45f67fa6f1751b5c15b15e8747ea5daecb 100755 (executable)
@@ -9316,6 +9316,236 @@ paths:
       summary: Update an existing NVMeoF namespace
       tags:
       - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/add_host:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                host_nqn:
+                  description: NVMeoF host NQN. Use "*" to allow any host.
+                  type: string
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              required:
+              - host_nqn
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: Adds a host to the specified NVMeoF namespace
+      tags:
+      - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/change_load_balancing_group:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                load_balancing_group:
+                  description: Load balancing group
+                  type: integer
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: set the load balancing group for specified NVMeoF namespace
+      tags:
+      - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/change_visibility:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                auto_visible:
+                  description: True if visible to all hosts
+                  type: boolean
+                force:
+                  default: false
+                  type: boolean
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              required:
+              - auto_visible
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: changes the visibility of the specified NVMeoF namespace to all or
+        selected hosts
+      tags:
+      - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/del_host:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                host_nqn:
+                  description: NVMeoF host NQN. Use "*" to allow any host.
+                  type: string
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              required:
+              - host_nqn
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: Removes a host from the specified NVMeoF namespace
+      tags:
+      - NVMe-oF Subsystem Namespace
   /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/io_stats:
     get:
       parameters:
@@ -9362,6 +9592,241 @@ paths:
       summary: Get IO stats from specified NVMeoF namespace
       tags:
       - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/refresh_size:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: refresh the specified NVMeoF namespace to current RBD image size
+      tags:
+      - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/resize:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                rbd_image_size:
+                  description: RBD image size
+                  type: integer
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              required:
+              - rbd_image_size
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: resize the specified NVMeoF namespace
+      tags:
+      - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_qos:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                force:
+                  default: false
+                  description: Set QOS limits even if they were changed by RBD
+                  type: boolean
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                r_mbytes_per_second:
+                  description: Read MB/s
+                  type: integer
+                rw_ios_per_second:
+                  description: Read/Write IOPS
+                  type: integer
+                rw_mbytes_per_second:
+                  description: Read/Write MB/s
+                  type: integer
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+                w_mbytes_per_second:
+                  description: Write MB/s
+                  type: integer
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: set QOS for specified NVMeoF namespace
+      tags:
+      - NVMe-oF Subsystem Namespace
+  /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_rbd_trash_image:
+    put:
+      parameters:
+      - description: NVMeoF subsystem NQN
+        in: path
+        name: nqn
+        required: true
+        schema:
+          type: string
+      - description: NVMeoF Namespace ID
+        in: path
+        name: nsid
+        required: true
+        schema:
+          type: string
+      requestBody:
+        content:
+          application/json:
+            schema:
+              properties:
+                gw_group:
+                  description: NVMeoF gateway group
+                  type: string
+                rbd_trash_image_on_delete:
+                  description: True if active
+                  type: boolean
+                traddr:
+                  description: NVMeoF gateway address
+                  type: string
+              required:
+              - rbd_trash_image_on_delete
+              type: object
+      responses:
+        '200':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              type: object
+          description: Resource updated.
+        '202':
+          content:
+            application/vnd.ceph.api.v1.0+json:
+              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: changes the trash image on delete of the specified NVMeoF                 namespace
+        to all or selected hosts
+      tags:
+      - NVMe-oF Subsystem Namespace
   /api/osd:
     get:
       parameters:
index 28a6bbaaa6669ba3ff3cad3e3985204fdce17cac..2ca6f614b7a260dda8244d3e238c8f1e29f0fb86 100644 (file)
 syntax = "proto3";
 
 enum AddressFamily {
-    ipv4 = 0;
-    ipv6 = 1;
+       ipv4 = 0;
+       ipv6 = 1;
 }
 
 enum LogLevel {
-    ERROR = 0;
-    WARNING = 1;
-    NOTICE = 2;
-    INFO = 3;
-    DEBUG = 4;
+       ERROR = 0;
+       WARNING = 1;
+       NOTICE = 2;
+       INFO = 3;
+       DEBUG = 4;
 }
 
 enum GwLogLevel {
-    notset = 0;
-    debug = 10;
-    info = 20;
-    warning = 30;
-    error = 40;
-    critical = 50;
+       notset = 0;
+       debug = 10;
+       info = 20;
+       warning = 30;
+       error = 40;
+       critical = 50;
 }
 
 service Gateway {
@@ -66,6 +66,9 @@ service Gateway {
        // Set namespace's RBD trash image flag
        rpc namespace_set_rbd_trash_image(namespace_set_rbd_trash_image_req) returns (req_status) {}
 
+       // Set namespace's auto resize flag
+       rpc namespace_set_auto_resize(namespace_set_auto_resize_req) returns (req_status) {}
+
        // Deletes a namespace
        rpc namespace_delete(namespace_delete_req) returns (req_status) {}
 
@@ -102,8 +105,8 @@ service Gateway {
        // List subsystems
        rpc list_subsystems(list_subsystems_req) returns(subsystems_info_cli) {}
 
-        // Gets subsystems
-        rpc get_subsystems(get_subsystems_req) returns(subsystems_info) {}
+       // Gets subsystems
+       rpc get_subsystems(get_subsystems_req) returns(subsystems_info) {}
 
        // Set gateway ANA states
        rpc set_ana_state(ana_info) returns(req_status) {}
@@ -111,8 +114,8 @@ service Gateway {
        // Gets spdk nvmf log flags and level
        rpc get_spdk_nvmf_log_flags_and_level(get_spdk_nvmf_log_flags_and_level_req) returns(spdk_nvmf_log_flags_and_level_info) {}
 
-        // Disables spdk nvmf logs
-        rpc disable_spdk_nvmf_logs(disable_spdk_nvmf_logs_req) returns(req_status) {}
+       // Disables spdk nvmf logs
+       rpc disable_spdk_nvmf_logs(disable_spdk_nvmf_logs_req) returns(req_status) {}
 
        // Set spdk nvmf logs
        rpc set_spdk_nvmf_logs(set_spdk_nvmf_logs_req) returns(req_status) {}
@@ -145,6 +148,7 @@ message namespace_add_req {
        optional bool force = 10;
        optional bool no_auto_visible = 11;
        optional bool trash_image = 12;
+       optional bool disable_auto_resize = 13;
 }
 
 message namespace_resize_req {
@@ -168,6 +172,7 @@ message namespace_set_qos_req {
        optional uint64 rw_mbytes_per_second = 5;
        optional uint64 r_mbytes_per_second = 6;
        optional uint64 w_mbytes_per_second = 7;
+       optional bool force = 8;
 }
 
 message namespace_change_load_balancing_group_req {
@@ -175,7 +180,7 @@ message namespace_change_load_balancing_group_req {
        uint32 nsid = 2;
        optional string OBSOLETE_uuid = 3;
        int32 anagrpid = 4;
-        optional bool auto_lb_logic = 5;
+       optional bool auto_lb_logic = 5;
 }
 
 message namespace_change_visibility_req {
@@ -191,6 +196,12 @@ message namespace_set_rbd_trash_image_req {
        bool trash_image = 3;
 }
 
+message namespace_set_auto_resize_req {
+       string subsystem_nqn = 1;
+       uint32 nsid = 2;
+       bool auto_resize = 3;
+}
+
 message namespace_delete_req {
        string subsystem_nqn = 1;
        uint32 nsid = 2;
@@ -202,6 +213,7 @@ message namespace_add_host_req {
        string subsystem_nqn = 1;
        uint32 nsid = 2;
        string host_nqn = 3;
+       optional bool force = 4;
 }
 
 message namespace_delete_host_req {
@@ -217,6 +229,7 @@ message create_subsystem_req {
        bool enable_ha = 4;
        optional bool no_group_append = 5;
        optional string dhchap_key = 6;
+       optional bool key_encrypted = 7;
 }
 
 message delete_subsystem_req {
@@ -240,6 +253,8 @@ message add_host_req {
        string host_nqn = 2;
        optional string psk = 3;
        optional string dhchap_key = 4;
+       optional bool psk_encrypted = 5;
+       optional bool key_encrypted = 6;
 }
 
 message change_host_key_req {
@@ -268,6 +283,7 @@ message create_listener_req {
        optional AddressFamily adrfam = 5;
        optional uint32 trsvcid = 6;
        optional bool secure = 7;
+       optional bool verify_host_name = 8;
 }
 
 message delete_listener_req {
@@ -292,14 +308,17 @@ message get_subsystems_req {
 }
 
 message get_spdk_nvmf_log_flags_and_level_req {
+       optional bool all_log_flags = 1;
 }
 
 message disable_spdk_nvmf_logs_req {
+       repeated string extra_log_flags = 1;
 }
 
 message set_spdk_nvmf_logs_req {
        optional LogLevel log_level = 1;
        optional LogLevel print_level = 2;
+       repeated string extra_log_flags = 3;
 }
 
 message get_gateway_info_req {
@@ -328,10 +347,10 @@ message show_gateway_listeners_info_req {
 // 0Fh ANA Change state 8.20.3.5
 // All others Reserved
 enum ana_state {
-  UNSET         = 0;
-  OPTIMIZED     = 1;
-  NON_OPTIMIZED = 2;
-  INACCESSIBLE  = 3;
+       UNSET         = 0;
+       OPTIMIZED     = 1;
+       NON_OPTIMIZED = 2;
+       INACCESSIBLE  = 3;
 }
 
 message ana_group_state {
@@ -368,43 +387,43 @@ message nsid_status {
 }
 
 message subsystems_info {
-        repeated subsystem subsystems = 1;
+       repeated subsystem subsystems = 1;
 }
 
 message subsystem {
-        string nqn = 1;
-        string subtype = 2;
-        repeated listen_address listen_addresses = 3;
-        repeated host hosts = 4;
-        bool allow_any_host = 5;
-        optional string serial_number = 6;
-        optional string model_number = 7;
-        optional uint32 max_namespaces = 8;
-        optional uint32 min_cntlid = 9;
-        optional uint32 max_cntlid = 10;
-        repeated namespace namespaces = 11;
-        optional bool has_dhchap_key = 12;
+       string nqn = 1;
+       string subtype = 2;
+       repeated listen_address listen_addresses = 3;
+       repeated host hosts = 4;
+       bool allow_any_host = 5;
+       optional string serial_number = 6;
+       optional string model_number = 7;
+       optional uint32 max_namespaces = 8;
+       optional uint32 min_cntlid = 9;
+       optional uint32 max_cntlid = 10;
+       repeated namespace namespaces = 11;
+       optional bool has_dhchap_key = 12;
 }
 
 message listen_address {
-        string trtype = 1;
-        string adrfam = 2;
-        string traddr = 3;
-        string trsvcid = 4;
-        optional string transport = 5;
-        optional bool secure = 6;
+       string trtype = 1;
+       string adrfam = 2;
+       string traddr = 3;
+       string trsvcid = 4;
+       optional string transport = 5;
+       optional bool secure = 6;
 }
 
 message namespace {
-    uint32 nsid = 1;
-    string name = 2;
-    optional string bdev_name = 3;
-    optional string nguid = 4;
-    optional string uuid = 5;
-    optional uint32 anagrpid = 6;
-    optional string nonce = 7;
-    optional bool auto_visible = 8;
-    repeated string hosts = 9;
+       uint32 nsid = 1;
+       string name = 2;
+       optional string bdev_name = 3;
+       optional string nguid = 4;
+       optional string uuid = 5;
+       optional uint32 anagrpid = 6;
+       optional string nonce = 7;
+       optional bool auto_visible = 8;
+       repeated string hosts = 9;
 }
 
 message subsystems_info_cli {
@@ -424,7 +443,8 @@ message subsystem_cli {
        string subtype = 8;
        uint32 max_namespaces = 9;
        optional bool has_dhchap_key = 10;
-        optional bool allow_any_host = 11;
+       optional bool allow_any_host = 11;
+       optional bool created_without_key = 12;
 }
 
 message gateway_info {
@@ -438,12 +458,13 @@ message gateway_info {
        int32 status = 8;
        string error_message = 9;
        optional string spdk_version = 10;
-        uint32 load_balancing_group = 11;
+       uint32 load_balancing_group = 11;
        string hostname = 12;
        optional uint32 max_subsystems = 13;
        optional uint32 max_namespaces = 14;
        optional uint32 max_hosts_per_subsystem = 15;
        optional uint32 max_namespaces_per_subsystem = 16;
+       optional uint32 max_hosts = 17;
 }
 
 message cli_version {
@@ -502,7 +523,7 @@ message connection {
        string nqn = 1;
        string traddr = 2;
        uint32 trsvcid = 3;
-        string trtype = 4;
+       string trtype = 4;
        AddressFamily adrfam = 5;
        bool connected = 6;
        int32 qpairs_count = 7;
@@ -510,6 +531,7 @@ message connection {
        optional bool secure = 9;
        optional bool use_psk = 10;
        optional bool use_dhchap = 11;
+        optional string subsystem = 12;
 }
 
 message connections_info {
@@ -536,6 +558,7 @@ message namespace_cli {
        repeated string hosts = 14;
        optional string ns_subsystem_nqn = 15;
        optional bool trash_image = 16;
+       optional bool disable_auto_resize = 17;
 }
 
 message namespaces_info {
@@ -581,8 +604,8 @@ message namespace_io_stats_info {
 }
 
 message spdk_log_flag_info {
-    string name = 1;
-    bool enabled = 2;
+       string name = 1;
+       bool enabled = 2;
 }
 
 message spdk_nvmf_log_flags_and_level_info {