Skip to content

tentacle: mgr/dashboard: introduce traddr for backward compatibility - #68566

Merged
batrick merged 2 commits into
ceph:tentaclefrom
Hezko:wip-76143-tentacle
Jul 14, 2026
Merged

batrick merged 2 commits into
ceph:tentaclefrom
Hezko:wip-76143-tentacle

Conversation

@Hezko

@Hezko Hezko commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings April 23, 2026 09:29
@Hezko
Hezko requested a review from a team as a code owner April 23, 2026 09:29
@Hezko Hezko added this to the tentacle milestone Apr 23, 2026
@Hezko
Hezko requested review from cloudbehl and pecastro April 23, 2026 09:29
@Hezko Hezko self-assigned this Apr 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backport to reintroduce traddr as a deprecated fallback for NVMeoF gateway address selection while keeping server_address as the preferred parameter.

Changes:

  • Add resolve_nvmeof_server_address() helper (and tests) to normalize/validate server_address vs deprecated traddr.
  • Update NVMeoF REST controllers and OpenAPI spec to accept server_address with deprecated traddr fallback.
  • Update NVMeoFClient constructor to use server_address for gateway selection.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py Adds tests for server address resolution and host update formatting.
src/pybind/mgr/dashboard/services/nvmeof_client.py Renames client ctor arg from traddr → server_address for gateway selection.
src/pybind/mgr/dashboard/services/nvmeof_cli.py Introduces resolve_nvmeof_server_address() helper with validation and error codes.
src/pybind/mgr/dashboard/openapi.yaml Documents new server_address query/body fields and marks traddr as deprecated in descriptions.
src/pybind/mgr/dashboard/controllers/nvmeof.py Wires server_address/traddr into most NVMeoF endpoints and updates endpoint docs.

Comment thread src/pybind/mgr/dashboard/openapi.yaml Resolved
@Hezko
Hezko force-pushed the wip-76143-tentacle branch from 2b0d4ac to b998e97 Compare April 26, 2026 23:34

@nizamial09 nizamial09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me but I'll let @afreen23 also to have a look.

Also, in the conflict resolution messages, along with the file change, please also put a short message on what you did to resolve the conflict, for eg.

Conflicts:
	src/pybind/mgr/dashboard/controllers/nvmeof.py
- i did something to fix some error here...
 
#	src/pybind/mgr/dashboard/openapi.yaml
#	src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py

You can see the section for clarity.

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Apr 27, 2026
@Hezko
Hezko force-pushed the wip-76143-tentacle branch from b998e97 to 5430e4a Compare April 27, 2026 09:55
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@batrick

batrick commented Apr 28, 2026

Copy link
Copy Markdown
Member

jenkins test make check

@batrick

batrick commented Apr 28, 2026

Copy link
Copy Markdown
Member

This PR has been identified as desirable for v20.2.2. Please make sure this PR passes CI tests, references backport tracker tickets properly, change milestone to v20.2.2, and finally has the "needs-qa" label when ready for testing.

@Hezko
Hezko force-pushed the wip-76143-tentacle branch 2 times, most recently from 6414176 to e233083 Compare May 9, 2026 18:55
@Hezko

Hezko commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@afreen23

Copy link
Copy Markdown
Contributor

Tests (1 failure / ±0)
projectroot.qa.run_tox_qa

@afreen23

Copy link
Copy Markdown
Contributor

Make check failure fixed by #68846

@afreen23

Copy link
Copy Markdown
Contributor

jenkins test windows

@afreen23

Copy link
Copy Markdown
Contributor

jenkins test make check

@Hezko
Hezko force-pushed the wip-76143-tentacle branch from e233083 to 3391ff9 Compare May 12, 2026 18:56
@batrick batrick added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-fail Release engineering: failed backport verification audit. labels May 13, 2026
@batrick
batrick force-pushed the wip-76143-tentacle branch from 3391ff9 to 975f093 Compare May 13, 2026 01:21
@batrick

batrick commented May 13, 2026

Copy link
Copy Markdown
Member

(trivial rebase)

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@Hezko
Hezko force-pushed the wip-76143-tentacle branch from 975f093 to 70a47e7 Compare May 13, 2026 19:26
@yuriw

yuriw commented May 14, 2026

Copy link
Copy Markdown
Contributor

github-actions[bot]

This comment was marked as outdated.

Tomer Haskalovitch added 2 commits June 15, 2026 11:55
… listener related commands

Signed-off-by: Tomer Haskalovitch <[email protected]>

update openapi.yaml

(cherry picked from commit ccdcbe9)
… for backward compatibilty

Signed-off-by: Tomer Haskalovitch <[email protected]>
(cherry picked from commit e6fb9af)

Conflicts:
    src/pybind/mgr/dashboard/controllers/nvmeof.py
	src/pybind/mgr/dashboard/openapi.yaml
	src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py
- conflicts since ceph#67964 was not merged yet
@github-actions

Copy link
Copy Markdown

⚠️ Audit Override Removed

New commits were pushed to this PR, so the previous releng-audit-override has been removed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Backport Parity Review - Multiple PRs Detected

This backport appears to pull commits from multiple main PRs including: PR #66822, PR #68393.

This must be made explicit in the backport PR description. Furthermore, each backport tracker ticket associated with these main PRs must be linked to this PR.


Automated Backport Parity Review - Backport Deviation Alert

A conflict or unapproved deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

Deviation in Backport 3bbc82e (cherry-pick of ccdcbe9)

Affected File(s)

Range Diff

Click to expand
--- Original (ccdcbe93)
+++ Backport (3bbc82e1)
@@ -3,3 +3,5 @@
 Signed-off-by: Tomer Haskalovitch <[email protected]>
 
 update openapi.yaml
+
+(cherry picked from commit ccdcbe93be3f11e9387e9e3d2f661731dcef3272)

================================================================================
RANGE DIFF
================================================================================

1:  ccdcbe93be3 ! 1:  3bbc82e18ce mgr/dashboard: replace traddr with server_address and only keep it in listener related commands
    @@ Commit message
     
         update openapi.yaml
     
    +    (cherry picked from commit ccdcbe93be3f11e9387e9e3d2f661731dcef3272)
    +
      ## src/pybind/mgr/dashboard/controllers/nvmeof.py ##
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @EndpointDoc("Get information about the NVMeoF gateway")
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  )
      
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "serial_number": Param(int, "Subsystem serial number", True, None),
    -                 "dhchap_key": Param(int, "Subsystem DH-HMAC-CHAP key", True, None),
    +                 "serial_number": Param(str, "Subsystem serial number", True, None),
    +                 "dhchap_key": Param(str, "Subsystem DH-HMAC-CHAP key", True, None),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    --                "traddr": Param(str, "NVMeoF gateway address", True, None),
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
    -             },
    -         )
    -         @convert_to_model(model.SubsystemStatus)
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
    +                 "network_mask": Param([str],
    +                                       "Network mask to automatically create listeners",
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def create(self, nqn: str, enable_ha: Optional[bool] = True,
                         max_namespaces: Optional[int] = None, no_group_append: Optional[bool] = False,
                         serial_number: Optional[str] = None, dhchap_key: Optional[str] = None,
    --                   gw_group: Optional[str] = None, traddr: Optional[str] = None):
    --            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
    -+                   gw_group: Optional[str] = None, server_address: Optional[str] = None):
    -+            return NVMeoFClient(
    -+                gw_group=gw_group,
    -+                server_address=server_address
    -+            ).stub.create_subsystem(
    +-                   gw_group: Optional[str] = None, traddr: Optional[str] = None,
    +-                   network_mask: Optional[List[str]] = None,
    ++                   gw_group: Optional[str] = None, server_address: Optional[str] = None,
    ++                   traddr: Optional[str] = None, network_mask: Optional[List[str]] = None,
    +                    port: Optional[int] = None, secure_listeners: Optional[bool] = False):
    +             return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
                      NVMeoFClient.pb2.create_subsystem_req(
    -                     subsystem_nqn=nqn, serial_number=serial_number,
    -                     max_namespaces=max_namespaces, enable_ha=enable_ha,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "force": Param(bool, "Force delete", True, False),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +                server_address=server_address
     +            ).stub.change_subsystem_key(
                      NVMeoFClient.pb2.change_subsystem_key_req(
    -                     subsystem_nqn=nqn, dhchap_key=dhchap_key
    -                 )
    +                     subsystem_nqn=nqn,
    +                     dhchap_key=dhchap_key
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  parameters={
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  )
      
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "trsvcid": Param(int, "NVMeoF transport service port", True, 4420),
    +                 "trsvcid": Param(int, "NVMeoF transport service port", True, None),
                      "adrfam": Param(int, "NVMeoF address family (0 - IPv4, 1 - IPv6)", True, 0),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
    -             },
    -         )
    -         @convert_to_model(model.RequestStatus)
    +                 "secure": Param(bool, "Use a secure channel", True, False),
    +                 "verify_host_name": Param(bool,
    +                                           "Fail if the host name doesn't match the "
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             traddr: str,
    -             trsvcid: int = 4420,
    +             trsvcid: Optional[int] = None,
                  adrfam: int = 0,  # IPv4,
    --            gw_group: Optional[str] = None
    -+            gw_group: Optional[str] = None,
    -+            server_address: Optional[str] = None
    +             gw_group: Optional[str] = None,
    ++            server_address: Optional[str] = None,
    +             secure: Optional[bool] = False,
    +             verify_host_name: Optional[bool] = False,
              ):
     -            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_listener(
     +            client = NVMeoFClient(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          nqn=nqn,
                          host_name=host_name,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "trsvcid": Param(int, "NVMeoF transport service port", True, 4420),
    +                 "trsvcid": Param(int, "NVMeoF transport service port"),
                      "adrfam": Param(int, "NVMeoF address family (0 - IPv4, 1 - IPv6)", True, 0),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             trsvcid: int = 4420,
    +             trsvcid: int,
                  adrfam: int = 0,  # IPv4
                  force: bool = False,
     -            gw_group: Optional[str] = None
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          subsystem_nqn=nqn, nsid=int(nsid))
                  )
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             "Create a new NVMeoF namespace.",
    -             parameters={
    -                 "nqn": Param(str, "NVMeoF subsystem NQN"),
    --                "rbd_pool": Param(str, "RBD pool name"),
    +                 "rados_namespace": Param(str, "RADOS namespace name", True, None),
    +                 "rbd_pool": Param(str, "RBD pool name"),
                      "rbd_image_name": Param(str, "RBD image name"),
     +                "rbd_pool": Param(str, "RBD pool name"),
     +                "nsid": Param(str, "Create RBD image", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          bool,
                          "Force create namespace even it image is used by other namespace"
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "no_auto_visible": Param(
    -                     bool,
    -                     "Namespace will be visible only for the allowed hosts"
    --                )
    -+                ),
    +                                 "Key ID(s) to use for encryption pass phrases, "
    +                                 "separated by commas",
    +                                 True, None),
     +                "disable_auto_resize": Param(str, "Disable auto resize", True, None),
     +                "read_only": Param(str, "Read only namespace", True, None),
     +                "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             disable_auto_resize: Optional[bool] = False,
    -             read_only: Optional[bool] = False,
    -             gw_group: Optional[str] = None,
    --            traddr: Optional[str] = None,
    +             encryption_format: Optional[List[str]] = None,
    +             encryption_algorithm: Optional[str] = None,
    +             key_id: Optional[List[str]] = None,
     +            server_address: Optional[str] = None,
              ):
    --            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_add(
    -+            return NVMeoFClient(
    -+                gw_group=gw_group,
    -+                server_address=server_address
    -+            ).stub.namespace_add(
    -                 NVMeoFClient.pb2.namespace_add_req(
    -                     subsystem_nqn=nqn,
    -                     nsid=int(nsid) if nsid else None,
    +             encryption_format = encryption_format or []
    +             key_id = key_id or []
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "load_balancing_group": Param(int, "Load balancing group"),
                      "disable_auto_resize": Param(str, "Disable auto resize", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          bool,
                          "Force create namespace even it image is used by other namespace"
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "no_auto_visible": Param(
    -                     bool,
    -                     "Namespace will be visible only for the allowed hosts"
    --                )
    -+                ),
    +                                 "Key ID(s) to use for encryption pass phrases, "
    +                                 "separated by commas",
    +                                 True, None),
     +                "gw_group": Param(str, "NVMeoF gateway group", True, None),
     +                "server_address": Param(str, "Target gateway address", True, None),
                  },
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             disable_auto_resize: Optional[bool] = False,
    -             read_only: Optional[bool] = False,
    -             gw_group: Optional[str] = None,
    --            traddr: Optional[str] = None,
    +             encryption_format: Optional[List[str]] = None,
    +             encryption_algorithm: Optional[str] = None,
    +             key_id: Optional[List[str]] = None,
    ++
     +            server_address: Optional[str] = None,
              ):
                  if size and rbd_image_size:
                      raise DashboardException(
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 size_b = convert_to_bytes(size, default_unit='MB')
    -             if rbd_image_size:
    -                 rbd_image_size_b = convert_to_bytes(rbd_image_size, default_unit='MB')
    --            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_add(
    -+            return NVMeoFClient(
    -+                gw_group=gw_group,
    +             enc_alg = encryption_algorithm.strip().lower() if encryption_algorithm else None
    +             return NVMeoFClient(
    +                 gw_group=gw_group,
    +-                traddr=traddr
     +                server_address=server_address
    -+            ).stub.namespace_add(
    +             ).stub.namespace_add(
                      NVMeoFClient.pb2.namespace_add_req(
                          subsystem_nqn=nqn,
    -                     nsid=int(nsid) if nsid else None,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          "Set QOS limits even if they were changed by RBD"
                      ),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  },
              )
              @convert_to_model(model.RequestStatus)
    -         @handle_nvmeof_error
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def create(
                  self, nqn: str, host_nqn: str, dhchap_key: Optional[str] = None,
    +             dhchap_controller_key: Optional[str] = None,
     -            psk: Optional[str] = None, gw_group: Optional[str] = None, traddr: Optional[str] = None
    -+            psk: Optional[str] = None, gw_group: Optional[str] = None,
    ++            psk: Optional[str] = None, gw_group: Optional[str] = None, traddr: Optional[str] = None,
     +            server_address: Optional[str] = None
              ):
     -            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.add_host(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +                server_address=server_address
     +            ).stub.add_host(
                      NVMeoFClient.pb2.add_host_req(subsystem_nqn=nqn, host_nqn=host_nqn,
    -                                               dhchap_key=dhchap_key, psk=psk)
    -             )
    +                                               dhchap_key=dhchap_key,
    +                                               dhchap_ctrlr_key=dhchap_controller_key,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "host_nqn": Param(str, 'NVMeoF host NQN. Use "*" to disallow any host.'),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            ).stub.change_host_key(
                      NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
                                                           host_nqn=host_nqn,
    -                                                      dhchap_key=dhchap_key)
    +                                                      dhchap_key=dhchap_key,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "host_nqn": Param(str, 'NVMeoF host NQN.'),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            ).stub.change_host_key(
                      NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
                                                           host_nqn=host_nqn,
    -                                                      dhchap_key=None)
    +                                                      dhchap_key=None,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  parameters={
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
    -         @convert_to_model(model.ConnectionList)
    +         @convert_to_model(model.ConnectionList, finalize=_update_connections)
              @handle_nvmeof_error
              def list(self, nqn: Optional[str] = None,
     -                 gw_group: Optional[str] = None, traddr: Optional[str] = None):
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              schema:
                type: string
            responses:
    -@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 serial_number:
    -                   description: Subsystem serial number
    -                   type: integer
    --                traddr:
    -+                server_address:
    -                   description: NVMeoF gateway address
    -                   type: string
    -               required:
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              schema:
                type: string
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              schema:
                type: string
            responses:
    -@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 host_name:
    -                   description: NVMeoF hostname
    -                   type: string
    -+                server_address:
    -+                  description: NVMeoF gateway address
    -+                  type: string
    -                 traddr:
    -                   description: NVMeoF transport address
    -                   type: string
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              name: gw_group
              schema:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
                      nsid:
     +                  description: Create RBD image
                        type: string
    -                 rbd_image_name:
    -                   description: RBD image name
    +                 rados_namespace:
    +                   description: RADOS namespace name
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
                        default: false
                        description: Read only namespace
    @@ src/pybind/mgr/dashboard/services/nvmeof_client.py: else:
                  try:
                      if not gw_group:
     @@ src/pybind/mgr/dashboard/services/nvmeof_client.py: else:
    - 
    +             self.daemon_name = ''
                  # While creating listener need to direct request to the gateway
                  # address where listener is supposed to be added.
     -            if traddr:

Deviation in Backport 9552492 (cherry-pick of e6fb9af)

Affected File(s)

Range Diff

Click to expand
--- Original (e6fb9af2)
+++ Backport (95524925)
@@ -1,3 +1,10 @@
 mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty
 
 Signed-off-by: Tomer Haskalovitch <[email protected]>
+(cherry picked from commit e6fb9af22631264d49eb974705a425e0e6405a88)
+
+Conflicts:
+    src/pybind/mgr/dashboard/controllers/nvmeof.py
+	src/pybind/mgr/dashboard/openapi.yaml
+	src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py
+- conflicts since https://github.com/ceph/ceph/pull/67964 was not merged yet

================================================================================
RANGE DIFF
================================================================================

1:  e6fb9af2263 ! 1:  95524925fa3 mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty
    @@ Commit message
         mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty
     
         Signed-off-by: Tomer Haskalovitch <[email protected]>
    +    (cherry picked from commit e6fb9af22631264d49eb974705a425e0e6405a88)
    +
    +    Conflicts:
    +        src/pybind/mgr/dashboard/controllers/nvmeof.py
    +            src/pybind/mgr/dashboard/openapi.yaml
    +            src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py
    +    - conflicts since https://github.com/ceph/ceph/pull/67964 was not merged yet
     
      ## src/pybind/mgr/dashboard/controllers/nvmeof.py ##
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: from ..exceptions import DashboardException
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: from .. import mgr
    + from ..exceptions import DashboardException
      from ..model import nvmeof as model
      from ..security import Scope
    - from ..services.nvmeof_cli import NvmeofCLICommand, convert_to_bytes, \
    --    escape_address_if_ipv6, format_host_updates
    -+    escape_address_if_ipv6, format_host_updates, \
    -+    resolve_nvmeof_server_address
    - from ..services.nvmeof_client import get_gateway_locations
    +-from ..services.nvmeof_cli import NvmeofCLICommand, convert_to_bytes
    ++from ..services.nvmeof_cli import NvmeofCLICommand, convert_to_bytes, resolve_nvmeof_server_address
      from ..services.orchestrator import OrchClient
      from ..tools import str_to_bool
    + from . import APIDoc, APIRouter, BaseController, CreatePermission, \
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @NvmeofCLICommand(
                  "nvmeof gateway info", model.GatewayInfo, alias="nvmeof gw info"
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +         @ReadPermission
    +         @Endpoint('PUT', '/log_level')
              @NvmeofCLICommand(
    -             "nvmeof gateway set_log_level", model.RequestStatus, alias="nvmeof gw set_log_level",
    -             success_message_template="Set gateway log level to {log_level}: Successful")
    +-            "nvmeof gateway set_log_level", model.RequestStatus, alias="nvmeof gw set_log_level")
     -        @EndpointDoc("Set NVMeoF gateway log levels")
    ++            "nvmeof gateway set_log_level", model.RequestStatus, alias="nvmeof gw set_log_level",
    ++        )
     +        @EndpointDoc(
     +            "Set NVMeoF gateway log levels",
     +            parameters={
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @handle_nvmeof_error
              def set_log_level(self, log_level: str, gw_group: Optional[str] = None,
     -                          server_address: Optional[str] = None):
    +-            log_level = log_level.lower()
     +                          server_address: Optional[str] = None,
     +                          traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             log_level = log_level.strip().lower()
    ++            log_level = log_level.strip().lower()
                  gw_log_level = NVMeoFClient(gw_group=gw_group,
                                              server_address=server_address).stub.set_gateway_log_level(
    +                 NVMeoFClient.pb2.set_gateway_log_level_req(log_level=log_level)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @Endpoint('GET', '/stats')
              @NvmeofCLICommand(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  gw_listener_info = NVMeoFClient(
                      gw_group=gw_group,
                      server_address=server_address
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "enabled": Param(bool, "Enable IO statistics collection"),
    -                 "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.RequestStatus)
    -         @handle_nvmeof_error
    -         def set_io_stats_mode(self, enabled: bool, gw_group: Optional[str] = None,
    --                              server_address: Optional[str] = None):
    -+                              server_address: Optional[str] = None,
    -+                              traddr: Optional[str] = None):
    -+            server_address = resolve_nvmeof_server_address(
    -+                server_address=server_address,
    -+                traddr=traddr
    -+            )
    -             io_stats = NVMeoFClient(gw_group=gw_group,
    -                                     server_address=server_address).stub.set_gateway_io_stats_mode(
    -                 NVMeoFClient.pb2.set_gateway_io_stats_mode_req(enabled=enabled)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @ReadPermission
              @Endpoint('GET', '/log_level')
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             model.RequestStatus,
    -             success_message_template="Set SPDK log levels and nvmf log flags: Successful"
    -         )
    + 
    +         @ReadPermission
    +         @Endpoint('PUT', '/log_level')
    +-        @NvmeofCLICommand("nvmeof spdk_log_level set", model.RequestStatus)
     -        @EndpointDoc("Set NVMeoF gateway spdk log levels")
    ++        @NvmeofCLICommand(
    ++            "nvmeof spdk_log_level set",
    ++            model.RequestStatus,
    ++        )
     +        @EndpointDoc(
     +            "Set NVMeoF gateway spdk log levels",
     +            parameters={
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                                     extra_log_flags: Optional[List[str]] = None,
                                     gw_group: Optional[str] = None,
     -                               server_address: Optional[str] = None):
    +-            log_level = log_level.upper() if log_level else None
    +-            print_level = print_level.upper() if print_level else None
     +                               server_address: Optional[str] = None,
     +                               traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             log_level = log_level.strip().upper() if log_level else None
    -             print_level = print_level.strip().upper() if print_level else None
    ++            log_level = log_level.strip().upper() if log_level else None
    ++            print_level = print_level.strip().upper() if print_level else None
                  spdk_log_level = NVMeoFClient(
    +                 gw_group=gw_group,
    +                 server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +         @ReadPermission
              @Endpoint('PUT', '/log_level/disable')
    -         @NvmeofCLICommand("nvmeof spdk_log_level disable", model.RequestStatus,
    -                           success_message_template="Disable SPDK log flags: Successful")
    +         @NvmeofCLICommand("nvmeof spdk_log_level disable", model.RequestStatus)
     -        @EndpointDoc("Disable NVMeoF gateway spdk log")
     +        @EndpointDoc(
     +            "Disable NVMeoF gateway spdk log",
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "secure_listeners": Param(bool,
    -                                           "Make all the auto-listeners for this subsystem secure",
    -                                           True, False),
    +                 "dhchap_key": Param(str, "Subsystem DH-HMAC-CHAP key", True, None),
    +                 "gw_group": Param(str, "NVMeoF gateway group", True, None),
    +                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    +-                "traddr": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
    -             },
    -         )
    -         @convert_to_model(model.SubsystemStatus)
    +                 "network_mask": Param([str],
    +                                       "Network mask to automatically create listeners",
    +                                       True, None),
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                    serial_number: Optional[str] = None, dhchap_key: Optional[str] = None,
                         gw_group: Optional[str] = None, server_address: Optional[str] = None,
    -                    network_mask: Optional[List[str]] = None,
    --                   port: Optional[int] = None, secure_listeners: Optional[bool] = False):
    -+                   port: Optional[int] = None, secure_listeners: Optional[bool] = False,
    -+                   traddr: Optional[str] = None):
    +                    traddr: Optional[str] = None, network_mask: Optional[List[str]] = None,
    +                    port: Optional[int] = None, secure_listeners: Optional[bool] = False):
    +-            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             return NVMeoFClient(
    -                 gw_group=gw_group,
    -                 server_address=server_address
    ++            return NVMeoFClient(
    ++                gw_group=gw_group,
    ++                server_address=server_address
    ++            ).stub.create_subsystem(
    +                 NVMeoFClient.pb2.create_subsystem_req(
    +                     subsystem_nqn=nqn, serial_number=serial_number,
    +                     max_namespaces=max_namespaces, enable_ha=enable_ha,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "force": Param(bool, "Force delete", True, False),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "network_mask": Param(str, "Network mask to add"),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    +-                "traddr": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
              @convert_to_model(model.RequestStatus)
              @handle_nvmeof_error
              def add_network(self, nqn: str, network_mask: str, gw_group: Optional[str] = None,
    --                        server_address: Optional[str] = None):
     +                        server_address: Optional[str] = None,
    -+                        traddr: 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
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.add_subsystem_network(
    +                 NVMeoFClient.pb2.add_subsystem_network_req(
    +                     subsystem_nqn=nqn, network_mask=network_mask
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "network_mask": Param(str, "Network mask to remove"),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    +-                "traddr": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
              @convert_to_model(model.RequestStatus)
              @handle_nvmeof_error
              def del_network(self, nqn: str, network_mask: str, gw_group: Optional[str] = None,
    --                        server_address: Optional[str] = None):
     +                        server_address: Optional[str] = None,
    -+                        traddr: 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
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.del_subsystem_network(
    +                 NVMeoFClient.pb2.del_subsystem_network_req(
    +                     subsystem_nqn=nqn, network_mask=network_mask
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "address": Param(str, "KMIP server endpoint address", True, None),
                      "port": Param(int, "KMIP server endpoint port", True, 5696),
                      "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),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
    -         @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def add_kmip_server_endpoint(self, nqn: str, server_name: str,
                                           address: Optional[str] = None,
                                           port: Optional[int] = 5696, gw_group: Optional[str] = None,
    --                                     server_address: Optional[str] = None):
     +                                     server_address: Optional[str] = None,
    -+                                     traddr: Optional[str] = None):
    +                                      traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  ep = NVMeoFClient.pb2.kmip_server_endpoint(address=address, port=port)
                  return NVMeoFClient(
                      gw_group=gw_group,
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.add_kmip_server_endpoints(
    +                 NVMeoFClient.pb2.add_kmip_server_endpoints_req(
    +                     subsystem_nqn=nqn, server_name=server_name,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "address": Param(str, "KMIP server endpoint address", True, None),
                      "port": Param(int, "KMIP server endpoint port", True, 5696),
                      "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),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
    -         @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def del_kmip_server_endpoint(self, nqn: str, server_name: str,
                                           address: Optional[str] = None,
                                           port: Optional[int] = 5696, gw_group: Optional[str] = None,
    --                                     server_address: Optional[str] = None):
     +                                     server_address: Optional[str] = None,
    -+                                     traddr: Optional[str] = None):
    +                                      traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  ep = NVMeoFClient.pb2.kmip_server_endpoint(address=address, port=port)
                  return NVMeoFClient(
                      gw_group=gw_group,
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.del_kmip_server_endpoints(
    +                 NVMeoFClient.pb2.del_kmip_server_endpoints_req(
    +                     subsystem_nqn=nqn, server_name=server_name,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "server_name": Param(str, "Only show endpoints for this KMIP server name",
                                           True, None),
                      "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),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
              @convert_to_model(model.SubsystemListKMIPEndpoints)
              @handle_nvmeof_error
              def list_eps(self, nqn: Optional[str] = None, server_name: Optional[str] = None,
    --                     gw_group: Optional[str] = None, server_address: Optional[str] = None):
    +-                     gw_group: Optional[str] = None, traddr: Optional[str] = None):
     +                     gw_group: Optional[str] = None, server_address: Optional[str] = None,
     +                     traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            )
                  return NVMeoFClient(
                      gw_group=gw_group,
    -                 server_address=server_address
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.list_kmip_server_endpoints(
    +                 NVMeoFClient.pb2.list_kmip_server_endpoints_req(subsystem_nqn=nqn,
    +                                                                 server_name=server_name)
                  )
      
              @NvmeofCLICommand("nvmeof get_subsystems", model.GetSubsystems)
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                                 True, None),
    +             parameters={
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
    +                 "rados_namespace": Param(str, "RADOS namespace name", True, None),
    +-                "rbd_pool": Param(str, "RBD pool name"),
    +                 "rbd_image_name": Param(str, "RBD image name"),
    +                 "rbd_pool": Param(str, "RBD pool name"),
    +                 "nsid": Param(str, "Create RBD image", True, None),
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "read_only": Param(str, "Read only namespace", True, None),
                      "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),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             location: Optional[str] = None,
    -             gw_group: Optional[str] = None,
    -             server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None,
    +             no_auto_visible: Optional[bool] = False,
    +             disable_auto_resize: Optional[bool] = False,
    +             read_only: Optional[bool] = False,
    +-            gw_group: Optional[str] = None,
    +-            traddr: Optional[str] = None,
                  rados_namespace: Optional[str] = None,
                  encryption_format: Optional[List[str]] = None,
                  encryption_algorithm: Optional[str] = None,
                  key_id: Optional[List[str]] = None,
    ++            gw_group: Optional[str] = None,
    +             server_address: Optional[str] = None,
    ++            traddr: Optional[str] = None,
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  encryption_format = encryption_format or []
                  key_id = key_id or []
                  if len(encryption_format) != len(key_id):
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                     key_id=k.strip()
    +                 ) for f, k in zip(encryption_format, key_id)]
    +             enc_alg = encryption_algorithm.strip().lower() if encryption_algorithm else None
    ++            server_address = resolve_nvmeof_server_address(
    ++                server_address=server_address,
    ++                traddr=traddr
    ++            )
    +             return NVMeoFClient(
    +                 gw_group=gw_group,
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.namespace_add(
    +                 NVMeoFClient.pb2.namespace_add_req(
    +                     subsystem_nqn=nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                                      True, None),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             location: Optional[str] = None,
    -             gw_group: Optional[str] = None,
    -             server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None,
    +             no_auto_visible: Optional[bool] = False,
    +             disable_auto_resize: Optional[bool] = False,
    +             read_only: Optional[bool] = False,
    +-            gw_group: Optional[str] = None,
    +-            traddr: Optional[str] = None,
                  rados_namespace: Optional[str] = None,
                  encryption_format: Optional[List[str]] = None,
                  encryption_algorithm: Optional[str] = None,
                  key_id: Optional[List[str]] = None,
    + 
    ++            gw_group: Optional[str] = None,
    +             server_address: Optional[str] = None,
    ++            traddr: Optional[str] = None,
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "location": Param(str, "Namespace location"),
    +                 "trash_image": Param(bool, "Trash RBD image after removing namespace"),
                      "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),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceList)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             location: Optional[str] = None,
    +             trash_image: Optional[bool] = None,
                  gw_group: Optional[str] = None,
                  server_address: Optional[str] = None,
     +            traddr: Optional[str] = None,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "nqn": Param(str, "NVMeoF subsystem NQN"),
    +                                       True, False),
                      "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),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @convert_to_model(model.HostsInfo, finalize=_update_hosts)
              @handle_nvmeof_error
              def list(
    -             self, nqn: str,
    +             self, nqn: str, clear_alerts: Optional[bool] = None,
     -            gw_group: Optional[str] = None, server_address: Optional[str] = None
     +            gw_group: Optional[str] = None, server_address: Optional[str] = None,
     +            traddr: Optional[str] = None
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             self, nqn: str, host_nqn: str, dhchap_key: Optional[str] = None,
    -             dhchap_controller_key: Optional[str] = None,
    -             psk: Optional[str] = None, gw_group: Optional[str] = None,
    --            server_address: Optional[str] = None
    -+            server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None
    +             psk: Optional[str] = None, gw_group: Optional[str] = None, traddr: Optional[str] = None,
    +             server_address: Optional[str] = None
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "host_nqn": Param(str, 'NVMeoF host NQN'),
                      "dhchap_controller_key": Param(str, 'Host DH-HMAC-CHAP controller key'),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @handle_nvmeof_error
              def change_controller_key(
                  self, nqn: str, host_nqn: str, dhchap_controller_key: str,
    --            gw_group: Optional[str] = None, server_address: Optional[str] = None
    +-            gw_group: Optional[str] = None, traddr: Optional[str] = None
     +            gw_group: Optional[str] = None, server_address: Optional[str] = None,
     +            traddr: Optional[str] = None
              ):
    +-            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.change_host_key(
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             return NVMeoFClient(
    -                 gw_group=gw_group,
    -                 server_address=server_address
    ++            return NVMeoFClient(
    ++                gw_group=gw_group,
    ++                server_address=server_address
    ++            ).stub.change_host_key(
    +                 NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
    +                                                      host_nqn=host_nqn,
    +                                                      dhchap_key="-",
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "host_nqn": Param(str, 'NVMeoF host NQN.'),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "host_nqn": Param(str, 'NVMeoF host NQN.'),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @handle_nvmeof_error
              def del_controller_key(
                  self, nqn: str, host_nqn: str, gw_group: Optional[str] = None,
    --            server_address: Optional[str] = None
     +            server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None
    +             traddr: Optional[str] = None
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            )
                  return NVMeoFClient(
                      gw_group=gw_group,
    -                 server_address=server_address
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.change_host_key(
    +                 NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
    +                                                      host_nqn=host_nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  if not nqn:
                      nqn = '*'
                  return NVMeoFClient(
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "host_nqn": Param(str, "NVMeoF host 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.ConnectionIOStatistics)
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             nqn: str,
    -             host_nqn: str,
    -             gw_group: Optional[str] = None,
    --            server_address: 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
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "host_nqn": Param(str, "NVMeoF host 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.ConnectionIOStatistics)
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             nqn: str,
    -             host_nqn: str,
    -             gw_group: Optional[str] = None,
    --            server_address: 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
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                               'subsystem_nqn': (str, 'Subsystem NQN'),
                               "allow_all": Param(bool, 'Allow all hosts. Default is True.'),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  response = None
      
                  if allow_all:
    +                 return NVMeoFClient(gw_group=gw_group,
    +-                                    traddr=server_address).stub.add_host(
    ++                                    server_address=server_address).stub.add_host(
    +                     NVMeoFClient.pb2.add_host_req(
    +                         subsystem_nqn=subsystem_nqn,
    +                         host_nqn="*",
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 key = h.get("dhchap_key")
    + 
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.add_host(
    ++                                        server_address=server_address).stub.add_host(
    +                     NVMeoFClient.pb2.add_host_req(
    +                         subsystem_nqn=subsystem_nqn,
    +                         host_nqn=nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                           parameters={
                               "subsystem_nqn": Param(str, "NVMeoF subsystem NQN"),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  response = None
                  to_delete_nqns = host_nqn.split(',')
      
    +             for del_nqn in to_delete_nqns:
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.remove_host(
    ++                                        server_address=server_address).stub.remove_host(
    +                     NVMeoFClient.pb2.remove_host_req(subsystem_nqn=subsystem_nqn, host_nqn=del_nqn)
    +                 )
    +                 if response.status != 0:
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                          ),
    -                          "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),
    -                      })
    -         @empty_response
    -         @handle_nvmeof_error
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                                     gw_group: str,
    -                                     host_nqn: str = "",
    -                                     force: Optional[bool] = None,
    --                                    server_address: Optional[str] = None):
    -+                                    server_address: Optional[str] = None,
    -+                                    traddr: Optional[str] = None):
    -+            server_address = resolve_nvmeof_server_address(
    -+                server_address=server_address,
    -+                traddr=traddr
    -+            )
    -             response = None
    -             all_host_nqns = host_nqn.split(',')
    -             force = str_to_bool(force) if force else None
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                          "host_nqn": Param(str, 'Comma separated list of NVMeoF host 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),
    -                      })
    -         @empty_response
    -         @handle_nvmeof_error
    + 
    +             for nqn in all_host_nqns:
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.namespace_add_host(
    ++                                        server_address=server_address).stub.namespace_add_host(
    +                     NVMeoFClient.pb2.namespace_add_host_req(subsystem_nqn=subsystem_nqn,
    +                                                             nsid=int(nsid),
    +                                                             host_nqn=nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                                        subsystem_nqn: str,
    -                                        host_nqn: str,
    -                                        gw_group: str,
    --                                       server_address: Optional[str] = None):
    -+                                       server_address: Optional[str] = None,
    -+                                       traddr: Optional[str] = None):
    -+            server_address = resolve_nvmeof_server_address(
    -+                server_address=server_address,
    -+                traddr=traddr
    -+            )
    -             response = None
    -             to_delete_nqns = host_nqn.split(',')
      
    +             for del_nqn in to_delete_nqns:
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.namespace_delete_host(
    ++                                        server_address=server_address).stub.namespace_delete_host(
    +                     NVMeoFClient.pb2.namespace_delete_host_req(
    +                         subsystem_nqn=subsystem_nqn,
    +                         nsid=int(nsid),
     
      ## src/pybind/mgr/dashboard/openapi.yaml ##
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
            responses:
              '200':
                content:
    -@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    -                   type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    -+                  type: string
    -               required:
    -               - enabled
    -               type: object
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
        /api/nvmeof/gateway/listener_info/{nqn}:
          get:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              '200':
                content:
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    +                 serial_number:
    +                   description: Subsystem serial number
    +                   type: string
    +-                traddr:
    ++                server_address:
                        description: NVMeoF gateway address
                        type: string
     +                traddr:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              '202':
                content:
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    required:
                    - dhchap_controller_key
    -               type: object
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    required:
                    - dhchap_key
    -               type: object
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    type: object
            responses:
    -         '200':
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    type: object
            responses:
    -         '200':
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              name: server_address
              schema:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
            responses:
              '200':
                content:
    +@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    +                   default: false
    +                   description: Use a secure channel
    +                   type: boolean
    ++                server_address:
    ++                  description: NVMeoF gateway address
    ++                  type: string
    +                 traddr:
    +                   description: NVMeoF transport address
    +                   type: string
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              name: server_address
              schema:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
                    type: object
     
      ## src/pybind/mgr/dashboard/services/nvmeof_cli.py ##
    -@@ src/pybind/mgr/dashboard/services/nvmeof_cli.py: from mgr_module import CLICheckNonemptyFileInput, HandleCommandResult
    +@@ src/pybind/mgr/dashboard/services/nvmeof_cli.py: from mgr_module import CLICheckNonemptyFileInput, HandleCommandResult, HandlerFu
      from prettytable import PrettyTable
      
      from ..cli import DBCLICommand
    @@ src/pybind/mgr/dashboard/services/nvmeof_cli.py: def convert_from_bytes(num_in_b
          def format_output(self, data, model):
     
      ## src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py ##
    -@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: from mgr_module import HandleCommandResult
    +@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: import pytest
    + from mgr_module import CLICommandBase, HandleCommandResult
      
    - from ..cli import DBCLICommand
      from ..controllers import EndpointDoc
     +from ..exceptions import DashboardException
      from ..model.nvmeof import CliFieldTransformer, CliFlags, CliHeader
      from ..services.nvmeof_cli import AnnotatedDataTextOutputFormatter, \
    -     NvmeofCLICommand, convert_from_bytes, convert_to_bytes, \
    --    format_host_updates
    -+    format_host_updates, resolve_nvmeof_server_address
    +-    NvmeofCLICommand, convert_from_bytes, convert_to_bytes
    ++    NvmeofCLICommand, convert_from_bytes, convert_to_bytes, \
    ++    resolve_nvmeof_server_address
      from ..tests import CLICommandTestMixin
      
      
    -@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: class TestFormatHostUpdates:
    -             template_item="H {host_nqn} {nqn}",
    -         )
    -         assert out == "H h1 nqn.test\nW nqn.test"
    +@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: class TestConvertToBytes:
    +         with pytest.raises(ValueError):
    +             assert convert_to_bytes('5') == 5368709120
    +         assert convert_to_bytes('5', default_unit='GB') == 5368709120
     +
     +
     +class TestResolveNvmeofServerAddress:

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


Commit Parity Visualizer

BACKPORT PR #68566 SOURCE PR SOURCE STATUS
3bbc82e mgr/dashboard: replace traddr with server_address and only keep it in listener related commands PR #66822 ccdcbe9 mgr/dashboard: replace traddr with server_address and only keep it in listener related commands
9552492 mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty PR #68393 e6fb9af mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty

🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

CI Run Log: View Workflow Details

@yuriw

yuriw commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri10-testing-20260622.213727-tentacle.

@lee-j-sanders

Copy link
Copy Markdown
Member

@Hezko

Hezko commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

1 similar comment
@Hezko

Hezko commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #68566 SOURCE PR SOURCE STATUS
3bbc82e mgr/dashboard: replace traddr with server_address and only keep it in listener related commands PR #66822 ccdcbe9 mgr/dashboard: replace traddr with server_address and only keep it in listener related commands
9552492 mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty PR #68393 e6fb9af mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport 3bbc82e (cherry-pick of ccdcbe9)

Affected File(s)

Range Diff

Click to expand
--- Original (ccdcbe93)
+++ Backport (3bbc82e1)
@@ -3,3 +3,5 @@
 Signed-off-by: Tomer Haskalovitch <[email protected]>
 
 update openapi.yaml
+
+(cherry picked from commit ccdcbe93be3f11e9387e9e3d2f661731dcef3272)

================================================================================
RANGE DIFF
================================================================================

1:  ccdcbe93be3 ! 1:  3bbc82e18ce mgr/dashboard: replace traddr with server_address and only keep it in listener related commands
    @@ Commit message
     
         update openapi.yaml
     
    +    (cherry picked from commit ccdcbe93be3f11e9387e9e3d2f661731dcef3272)
    +
      ## src/pybind/mgr/dashboard/controllers/nvmeof.py ##
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @EndpointDoc("Get information about the NVMeoF gateway")
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  )
      
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "serial_number": Param(int, "Subsystem serial number", True, None),
    -                 "dhchap_key": Param(int, "Subsystem DH-HMAC-CHAP key", True, None),
    +                 "serial_number": Param(str, "Subsystem serial number", True, None),
    +                 "dhchap_key": Param(str, "Subsystem DH-HMAC-CHAP key", True, None),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    --                "traddr": Param(str, "NVMeoF gateway address", True, None),
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
    -             },
    -         )
    -         @convert_to_model(model.SubsystemStatus)
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
    +                 "network_mask": Param([str],
    +                                       "Network mask to automatically create listeners",
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def create(self, nqn: str, enable_ha: Optional[bool] = True,
                         max_namespaces: Optional[int] = None, no_group_append: Optional[bool] = False,
                         serial_number: Optional[str] = None, dhchap_key: Optional[str] = None,
    --                   gw_group: Optional[str] = None, traddr: Optional[str] = None):
    --            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
    -+                   gw_group: Optional[str] = None, server_address: Optional[str] = None):
    -+            return NVMeoFClient(
    -+                gw_group=gw_group,
    -+                server_address=server_address
    -+            ).stub.create_subsystem(
    +-                   gw_group: Optional[str] = None, traddr: Optional[str] = None,
    +-                   network_mask: Optional[List[str]] = None,
    ++                   gw_group: Optional[str] = None, server_address: Optional[str] = None,
    ++                   traddr: Optional[str] = None, network_mask: Optional[List[str]] = None,
    +                    port: Optional[int] = None, secure_listeners: Optional[bool] = False):
    +             return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
                      NVMeoFClient.pb2.create_subsystem_req(
    -                     subsystem_nqn=nqn, serial_number=serial_number,
    -                     max_namespaces=max_namespaces, enable_ha=enable_ha,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "force": Param(bool, "Force delete", True, False),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +                server_address=server_address
     +            ).stub.change_subsystem_key(
                      NVMeoFClient.pb2.change_subsystem_key_req(
    -                     subsystem_nqn=nqn, dhchap_key=dhchap_key
    -                 )
    +                     subsystem_nqn=nqn,
    +                     dhchap_key=dhchap_key
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  parameters={
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  )
      
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "trsvcid": Param(int, "NVMeoF transport service port", True, 4420),
    +                 "trsvcid": Param(int, "NVMeoF transport service port", True, None),
                      "adrfam": Param(int, "NVMeoF address family (0 - IPv4, 1 - IPv6)", True, 0),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
    -             },
    -         )
    -         @convert_to_model(model.RequestStatus)
    +                 "secure": Param(bool, "Use a secure channel", True, False),
    +                 "verify_host_name": Param(bool,
    +                                           "Fail if the host name doesn't match the "
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             traddr: str,
    -             trsvcid: int = 4420,
    +             trsvcid: Optional[int] = None,
                  adrfam: int = 0,  # IPv4,
    --            gw_group: Optional[str] = None
    -+            gw_group: Optional[str] = None,
    -+            server_address: Optional[str] = None
    +             gw_group: Optional[str] = None,
    ++            server_address: Optional[str] = None,
    +             secure: Optional[bool] = False,
    +             verify_host_name: Optional[bool] = False,
              ):
     -            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_listener(
     +            client = NVMeoFClient(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          nqn=nqn,
                          host_name=host_name,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "trsvcid": Param(int, "NVMeoF transport service port", True, 4420),
    +                 "trsvcid": Param(int, "NVMeoF transport service port"),
                      "adrfam": Param(int, "NVMeoF address family (0 - IPv4, 1 - IPv6)", True, 0),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             trsvcid: int = 4420,
    +             trsvcid: int,
                  adrfam: int = 0,  # IPv4
                  force: bool = False,
     -            gw_group: Optional[str] = None
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          subsystem_nqn=nqn, nsid=int(nsid))
                  )
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             "Create a new NVMeoF namespace.",
    -             parameters={
    -                 "nqn": Param(str, "NVMeoF subsystem NQN"),
    --                "rbd_pool": Param(str, "RBD pool name"),
    +                 "rados_namespace": Param(str, "RADOS namespace name", True, None),
    +                 "rbd_pool": Param(str, "RBD pool name"),
                      "rbd_image_name": Param(str, "RBD image name"),
     +                "rbd_pool": Param(str, "RBD pool name"),
     +                "nsid": Param(str, "Create RBD image", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          bool,
                          "Force create namespace even it image is used by other namespace"
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "no_auto_visible": Param(
    -                     bool,
    -                     "Namespace will be visible only for the allowed hosts"
    --                )
    -+                ),
    +                                 "Key ID(s) to use for encryption pass phrases, "
    +                                 "separated by commas",
    +                                 True, None),
     +                "disable_auto_resize": Param(str, "Disable auto resize", True, None),
     +                "read_only": Param(str, "Read only namespace", True, None),
     +                "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             disable_auto_resize: Optional[bool] = False,
    -             read_only: Optional[bool] = False,
    -             gw_group: Optional[str] = None,
    --            traddr: Optional[str] = None,
    +             encryption_format: Optional[List[str]] = None,
    +             encryption_algorithm: Optional[str] = None,
    +             key_id: Optional[List[str]] = None,
     +            server_address: Optional[str] = None,
              ):
    --            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_add(
    -+            return NVMeoFClient(
    -+                gw_group=gw_group,
    -+                server_address=server_address
    -+            ).stub.namespace_add(
    -                 NVMeoFClient.pb2.namespace_add_req(
    -                     subsystem_nqn=nqn,
    -                     nsid=int(nsid) if nsid else None,
    +             encryption_format = encryption_format or []
    +             key_id = key_id or []
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "load_balancing_group": Param(int, "Load balancing group"),
                      "disable_auto_resize": Param(str, "Disable auto resize", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          bool,
                          "Force create namespace even it image is used by other namespace"
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "no_auto_visible": Param(
    -                     bool,
    -                     "Namespace will be visible only for the allowed hosts"
    --                )
    -+                ),
    +                                 "Key ID(s) to use for encryption pass phrases, "
    +                                 "separated by commas",
    +                                 True, None),
     +                "gw_group": Param(str, "NVMeoF gateway group", True, None),
     +                "server_address": Param(str, "Target gateway address", True, None),
                  },
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             disable_auto_resize: Optional[bool] = False,
    -             read_only: Optional[bool] = False,
    -             gw_group: Optional[str] = None,
    --            traddr: Optional[str] = None,
    +             encryption_format: Optional[List[str]] = None,
    +             encryption_algorithm: Optional[str] = None,
    +             key_id: Optional[List[str]] = None,
    ++
     +            server_address: Optional[str] = None,
              ):
                  if size and rbd_image_size:
                      raise DashboardException(
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 size_b = convert_to_bytes(size, default_unit='MB')
    -             if rbd_image_size:
    -                 rbd_image_size_b = convert_to_bytes(rbd_image_size, default_unit='MB')
    --            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.namespace_add(
    -+            return NVMeoFClient(
    -+                gw_group=gw_group,
    +             enc_alg = encryption_algorithm.strip().lower() if encryption_algorithm else None
    +             return NVMeoFClient(
    +                 gw_group=gw_group,
    +-                traddr=traddr
     +                server_address=server_address
    -+            ).stub.namespace_add(
    +             ).stub.namespace_add(
                      NVMeoFClient.pb2.namespace_add_req(
                          subsystem_nqn=nqn,
    -                     nsid=int(nsid) if nsid else None,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                          "Set QOS limits even if they were changed by RBD"
                      ),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  },
              )
              @convert_to_model(model.RequestStatus)
    -         @handle_nvmeof_error
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def create(
                  self, nqn: str, host_nqn: str, dhchap_key: Optional[str] = None,
    +             dhchap_controller_key: Optional[str] = None,
     -            psk: Optional[str] = None, gw_group: Optional[str] = None, traddr: Optional[str] = None
    -+            psk: Optional[str] = None, gw_group: Optional[str] = None,
    ++            psk: Optional[str] = None, gw_group: Optional[str] = None, traddr: Optional[str] = None,
     +            server_address: Optional[str] = None
              ):
     -            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.add_host(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +                server_address=server_address
     +            ).stub.add_host(
                      NVMeoFClient.pb2.add_host_req(subsystem_nqn=nqn, host_nqn=host_nqn,
    -                                               dhchap_key=dhchap_key, psk=psk)
    -             )
    +                                               dhchap_key=dhchap_key,
    +                                               dhchap_ctrlr_key=dhchap_controller_key,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "host_nqn": Param(str, 'NVMeoF host NQN. Use "*" to disallow any host.'),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            ).stub.change_host_key(
                      NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
                                                           host_nqn=host_nqn,
    -                                                      dhchap_key=dhchap_key)
    +                                                      dhchap_key=dhchap_key,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "host_nqn": Param(str, 'NVMeoF host NQN.'),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            ).stub.change_host_key(
                      NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
                                                           host_nqn=host_nqn,
    -                                                      dhchap_key=None)
    +                                                      dhchap_key=None,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  parameters={
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +                "server_address": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
    -         @convert_to_model(model.ConnectionList)
    +         @convert_to_model(model.ConnectionList, finalize=_update_connections)
              @handle_nvmeof_error
              def list(self, nqn: Optional[str] = None,
     -                 gw_group: Optional[str] = None, traddr: Optional[str] = None):
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              schema:
                type: string
            responses:
    -@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 serial_number:
    -                   description: Subsystem serial number
    -                   type: integer
    --                traddr:
    -+                server_address:
    -                   description: NVMeoF gateway address
    -                   type: string
    -               required:
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              schema:
                type: string
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              schema:
                type: string
            responses:
    -@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 host_name:
    -                   description: NVMeoF hostname
    -                   type: string
    -+                server_address:
    -+                  description: NVMeoF gateway address
    -+                  type: string
    -                 traddr:
    -                   description: NVMeoF transport address
    -                   type: string
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              name: gw_group
              schema:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
                      nsid:
     +                  description: Create RBD image
                        type: string
    -                 rbd_image_name:
    -                   description: RBD image name
    +                 rados_namespace:
    +                   description: RADOS namespace name
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
                        default: false
                        description: Read only namespace
    @@ src/pybind/mgr/dashboard/services/nvmeof_client.py: else:
                  try:
                      if not gw_group:
     @@ src/pybind/mgr/dashboard/services/nvmeof_client.py: else:
    - 
    +             self.daemon_name = ''
                  # While creating listener need to direct request to the gateway
                  # address where listener is supposed to be added.
     -            if traddr:

Deviation in Backport 9552492 (cherry-pick of e6fb9af)

Affected File(s)

Range Diff

Click to expand
--- Original (e6fb9af2)
+++ Backport (95524925)
@@ -1,3 +1,10 @@
 mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty
 
 Signed-off-by: Tomer Haskalovitch <[email protected]>
+(cherry picked from commit e6fb9af22631264d49eb974705a425e0e6405a88)
+
+Conflicts:
+    src/pybind/mgr/dashboard/controllers/nvmeof.py
+	src/pybind/mgr/dashboard/openapi.yaml
+	src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py
+- conflicts since https://github.com/ceph/ceph/pull/67964 was not merged yet

================================================================================
RANGE DIFF
================================================================================

1:  e6fb9af2263 ! 1:  95524925fa3 mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty
    @@ Commit message
         mgr/dashboard: introduce traddr together with existing server_address for backward compatibilty
     
         Signed-off-by: Tomer Haskalovitch <[email protected]>
    +    (cherry picked from commit e6fb9af22631264d49eb974705a425e0e6405a88)
    +
    +    Conflicts:
    +        src/pybind/mgr/dashboard/controllers/nvmeof.py
    +            src/pybind/mgr/dashboard/openapi.yaml
    +            src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py
    +    - conflicts since https://github.com/ceph/ceph/pull/67964 was not merged yet
     
      ## src/pybind/mgr/dashboard/controllers/nvmeof.py ##
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: from ..exceptions import DashboardException
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: from .. import mgr
    + from ..exceptions import DashboardException
      from ..model import nvmeof as model
      from ..security import Scope
    - from ..services.nvmeof_cli import NvmeofCLICommand, convert_to_bytes, \
    --    escape_address_if_ipv6, format_host_updates
    -+    escape_address_if_ipv6, format_host_updates, \
    -+    resolve_nvmeof_server_address
    - from ..services.nvmeof_client import get_gateway_locations
    +-from ..services.nvmeof_cli import NvmeofCLICommand, convert_to_bytes
    ++from ..services.nvmeof_cli import NvmeofCLICommand, convert_to_bytes, resolve_nvmeof_server_address
      from ..services.orchestrator import OrchClient
      from ..tools import str_to_bool
    + from . import APIDoc, APIRouter, BaseController, CreatePermission, \
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @NvmeofCLICommand(
                  "nvmeof gateway info", model.GatewayInfo, alias="nvmeof gw info"
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +         @ReadPermission
    +         @Endpoint('PUT', '/log_level')
              @NvmeofCLICommand(
    -             "nvmeof gateway set_log_level", model.RequestStatus, alias="nvmeof gw set_log_level",
    -             success_message_template="Set gateway log level to {log_level}: Successful")
    +-            "nvmeof gateway set_log_level", model.RequestStatus, alias="nvmeof gw set_log_level")
     -        @EndpointDoc("Set NVMeoF gateway log levels")
    ++            "nvmeof gateway set_log_level", model.RequestStatus, alias="nvmeof gw set_log_level",
    ++        )
     +        @EndpointDoc(
     +            "Set NVMeoF gateway log levels",
     +            parameters={
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @handle_nvmeof_error
              def set_log_level(self, log_level: str, gw_group: Optional[str] = None,
     -                          server_address: Optional[str] = None):
    +-            log_level = log_level.lower()
     +                          server_address: Optional[str] = None,
     +                          traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             log_level = log_level.strip().lower()
    ++            log_level = log_level.strip().lower()
                  gw_log_level = NVMeoFClient(gw_group=gw_group,
                                              server_address=server_address).stub.set_gateway_log_level(
    +                 NVMeoFClient.pb2.set_gateway_log_level_req(log_level=log_level)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @Endpoint('GET', '/stats')
              @NvmeofCLICommand(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  gw_listener_info = NVMeoFClient(
                      gw_group=gw_group,
                      server_address=server_address
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "enabled": Param(bool, "Enable IO statistics collection"),
    -                 "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.RequestStatus)
    -         @handle_nvmeof_error
    -         def set_io_stats_mode(self, enabled: bool, gw_group: Optional[str] = None,
    --                              server_address: Optional[str] = None):
    -+                              server_address: Optional[str] = None,
    -+                              traddr: Optional[str] = None):
    -+            server_address = resolve_nvmeof_server_address(
    -+                server_address=server_address,
    -+                traddr=traddr
    -+            )
    -             io_stats = NVMeoFClient(gw_group=gw_group,
    -                                     server_address=server_address).stub.set_gateway_io_stats_mode(
    -                 NVMeoFClient.pb2.set_gateway_io_stats_mode_req(enabled=enabled)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @ReadPermission
              @Endpoint('GET', '/log_level')
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             model.RequestStatus,
    -             success_message_template="Set SPDK log levels and nvmf log flags: Successful"
    -         )
    + 
    +         @ReadPermission
    +         @Endpoint('PUT', '/log_level')
    +-        @NvmeofCLICommand("nvmeof spdk_log_level set", model.RequestStatus)
     -        @EndpointDoc("Set NVMeoF gateway spdk log levels")
    ++        @NvmeofCLICommand(
    ++            "nvmeof spdk_log_level set",
    ++            model.RequestStatus,
    ++        )
     +        @EndpointDoc(
     +            "Set NVMeoF gateway spdk log levels",
     +            parameters={
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                                     extra_log_flags: Optional[List[str]] = None,
                                     gw_group: Optional[str] = None,
     -                               server_address: Optional[str] = None):
    +-            log_level = log_level.upper() if log_level else None
    +-            print_level = print_level.upper() if print_level else None
     +                               server_address: Optional[str] = None,
     +                               traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             log_level = log_level.strip().upper() if log_level else None
    -             print_level = print_level.strip().upper() if print_level else None
    ++            log_level = log_level.strip().upper() if log_level else None
    ++            print_level = print_level.strip().upper() if print_level else None
                  spdk_log_level = NVMeoFClient(
    +                 gw_group=gw_group,
    +                 server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +         @ReadPermission
              @Endpoint('PUT', '/log_level/disable')
    -         @NvmeofCLICommand("nvmeof spdk_log_level disable", model.RequestStatus,
    -                           success_message_template="Disable SPDK log flags: Successful")
    +         @NvmeofCLICommand("nvmeof spdk_log_level disable", model.RequestStatus)
     -        @EndpointDoc("Disable NVMeoF gateway spdk log")
     +        @EndpointDoc(
     +            "Disable NVMeoF gateway spdk log",
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "secure_listeners": Param(bool,
    -                                           "Make all the auto-listeners for this subsystem secure",
    -                                           True, False),
    +                 "dhchap_key": Param(str, "Subsystem DH-HMAC-CHAP key", True, None),
    +                 "gw_group": Param(str, "NVMeoF gateway group", True, None),
    +                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    +-                "traddr": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
    -             },
    -         )
    -         @convert_to_model(model.SubsystemStatus)
    +                 "network_mask": Param([str],
    +                                       "Network mask to automatically create listeners",
    +                                       True, None),
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                    serial_number: Optional[str] = None, dhchap_key: Optional[str] = None,
                         gw_group: Optional[str] = None, server_address: Optional[str] = None,
    -                    network_mask: Optional[List[str]] = None,
    --                   port: Optional[int] = None, secure_listeners: Optional[bool] = False):
    -+                   port: Optional[int] = None, secure_listeners: Optional[bool] = False,
    -+                   traddr: Optional[str] = None):
    +                    traddr: Optional[str] = None, network_mask: Optional[List[str]] = None,
    +                    port: Optional[int] = None, secure_listeners: Optional[bool] = False):
    +-            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.create_subsystem(
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             return NVMeoFClient(
    -                 gw_group=gw_group,
    -                 server_address=server_address
    ++            return NVMeoFClient(
    ++                gw_group=gw_group,
    ++                server_address=server_address
    ++            ).stub.create_subsystem(
    +                 NVMeoFClient.pb2.create_subsystem_req(
    +                     subsystem_nqn=nqn, serial_number=serial_number,
    +                     max_namespaces=max_namespaces, enable_ha=enable_ha,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "force": Param(bool, "Force delete", True, False),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "network_mask": Param(str, "Network mask to add"),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    +-                "traddr": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
              @convert_to_model(model.RequestStatus)
              @handle_nvmeof_error
              def add_network(self, nqn: str, network_mask: str, gw_group: Optional[str] = None,
    --                        server_address: Optional[str] = None):
     +                        server_address: Optional[str] = None,
    -+                        traddr: 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
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.add_subsystem_network(
    +                 NVMeoFClient.pb2.add_subsystem_network_req(
    +                     subsystem_nqn=nqn, network_mask=network_mask
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "network_mask": Param(str, "Network mask to remove"),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    +-                "traddr": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
              @convert_to_model(model.RequestStatus)
              @handle_nvmeof_error
              def del_network(self, nqn: str, network_mask: str, gw_group: Optional[str] = None,
    --                        server_address: Optional[str] = None):
     +                        server_address: Optional[str] = None,
    -+                        traddr: 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
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.del_subsystem_network(
    +                 NVMeoFClient.pb2.del_subsystem_network_req(
    +                     subsystem_nqn=nqn, network_mask=network_mask
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "address": Param(str, "KMIP server endpoint address", True, None),
                      "port": Param(int, "KMIP server endpoint port", True, 5696),
                      "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),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
    -         @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def add_kmip_server_endpoint(self, nqn: str, server_name: str,
                                           address: Optional[str] = None,
                                           port: Optional[int] = 5696, gw_group: Optional[str] = None,
    --                                     server_address: Optional[str] = None):
     +                                     server_address: Optional[str] = None,
    -+                                     traddr: Optional[str] = None):
    +                                      traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  ep = NVMeoFClient.pb2.kmip_server_endpoint(address=address, port=port)
                  return NVMeoFClient(
                      gw_group=gw_group,
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.add_kmip_server_endpoints(
    +                 NVMeoFClient.pb2.add_kmip_server_endpoints_req(
    +                     subsystem_nqn=nqn, server_name=server_name,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "address": Param(str, "KMIP server endpoint address", True, None),
                      "port": Param(int, "KMIP server endpoint port", True, 5696),
                      "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),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
    -         @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              def del_kmip_server_endpoint(self, nqn: str, server_name: str,
                                           address: Optional[str] = None,
                                           port: Optional[int] = 5696, gw_group: Optional[str] = None,
    --                                     server_address: Optional[str] = None):
     +                                     server_address: Optional[str] = None,
    -+                                     traddr: Optional[str] = None):
    +                                      traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  ep = NVMeoFClient.pb2.kmip_server_endpoint(address=address, port=port)
                  return NVMeoFClient(
                      gw_group=gw_group,
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.del_kmip_server_endpoints(
    +                 NVMeoFClient.pb2.del_kmip_server_endpoints_req(
    +                     subsystem_nqn=nqn, server_name=server_name,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "server_name": Param(str, "Only show endpoints for this KMIP server name",
                                           True, None),
                      "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),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
    +                 "traddr": Param(str, "NVMeoF gateway address", True, None),
                  },
              )
              @convert_to_model(model.SubsystemListKMIPEndpoints)
              @handle_nvmeof_error
              def list_eps(self, nqn: Optional[str] = None, server_name: Optional[str] = None,
    --                     gw_group: Optional[str] = None, server_address: Optional[str] = None):
    +-                     gw_group: Optional[str] = None, traddr: Optional[str] = None):
     +                     gw_group: Optional[str] = None, server_address: Optional[str] = None,
     +                     traddr: Optional[str] = None):
     +            server_address = resolve_nvmeof_server_address(
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            )
                  return NVMeoFClient(
                      gw_group=gw_group,
    -                 server_address=server_address
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.list_kmip_server_endpoints(
    +                 NVMeoFClient.pb2.list_kmip_server_endpoints_req(subsystem_nqn=nqn,
    +                                                                 server_name=server_name)
                  )
      
              @NvmeofCLICommand("nvmeof get_subsystems", model.GetSubsystems)
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                                 True, None),
    +             parameters={
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
    +                 "rados_namespace": Param(str, "RADOS namespace name", True, None),
    +-                "rbd_pool": Param(str, "RBD pool name"),
    +                 "rbd_image_name": Param(str, "RBD image name"),
    +                 "rbd_pool": Param(str, "RBD pool name"),
    +                 "nsid": Param(str, "Create RBD image", True, None),
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "read_only": Param(str, "Read only namespace", True, None),
                      "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),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             location: Optional[str] = None,
    -             gw_group: Optional[str] = None,
    -             server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None,
    +             no_auto_visible: Optional[bool] = False,
    +             disable_auto_resize: Optional[bool] = False,
    +             read_only: Optional[bool] = False,
    +-            gw_group: Optional[str] = None,
    +-            traddr: Optional[str] = None,
                  rados_namespace: Optional[str] = None,
                  encryption_format: Optional[List[str]] = None,
                  encryption_algorithm: Optional[str] = None,
                  key_id: Optional[List[str]] = None,
    ++            gw_group: Optional[str] = None,
    +             server_address: Optional[str] = None,
    ++            traddr: Optional[str] = None,
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  encryption_format = encryption_format or []
                  key_id = key_id or []
                  if len(encryption_format) != len(key_id):
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                     key_id=k.strip()
    +                 ) for f, k in zip(encryption_format, key_id)]
    +             enc_alg = encryption_algorithm.strip().lower() if encryption_algorithm else None
    ++            server_address = resolve_nvmeof_server_address(
    ++                server_address=server_address,
    ++                traddr=traddr
    ++            )
    +             return NVMeoFClient(
    +                 gw_group=gw_group,
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.namespace_add(
    +                 NVMeoFClient.pb2.namespace_add_req(
    +                     subsystem_nqn=nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                                      True, None),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceCreation)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             location: Optional[str] = None,
    -             gw_group: Optional[str] = None,
    -             server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None,
    +             no_auto_visible: Optional[bool] = False,
    +             disable_auto_resize: Optional[bool] = False,
    +             read_only: Optional[bool] = False,
    +-            gw_group: Optional[str] = None,
    +-            traddr: Optional[str] = None,
                  rados_namespace: Optional[str] = None,
                  encryption_format: Optional[List[str]] = None,
                  encryption_algorithm: Optional[str] = None,
                  key_id: Optional[List[str]] = None,
    + 
    ++            gw_group: Optional[str] = None,
    +             server_address: Optional[str] = None,
    ++            traddr: Optional[str] = None,
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "location": Param(str, "Namespace location"),
    +                 "trash_image": Param(bool, "Trash RBD image after removing namespace"),
                      "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),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.NamespaceList)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             location: Optional[str] = None,
    +             trash_image: Optional[bool] = None,
                  gw_group: Optional[str] = None,
                  server_address: Optional[str] = None,
     +            traddr: Optional[str] = None,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "nqn": Param(str, "NVMeoF subsystem NQN"),
    +                                       True, False),
                      "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),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @convert_to_model(model.HostsInfo, finalize=_update_hosts)
              @handle_nvmeof_error
              def list(
    -             self, nqn: str,
    +             self, nqn: str, clear_alerts: Optional[bool] = None,
     -            gw_group: Optional[str] = None, server_address: Optional[str] = None
     +            gw_group: Optional[str] = None, server_address: Optional[str] = None,
     +            traddr: Optional[str] = None
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              )
              @convert_to_model(model.RequestStatus)
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             self, nqn: str, host_nqn: str, dhchap_key: Optional[str] = None,
    -             dhchap_controller_key: Optional[str] = None,
    -             psk: Optional[str] = None, gw_group: Optional[str] = None,
    --            server_address: Optional[str] = None
    -+            server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None
    +             psk: Optional[str] = None, gw_group: Optional[str] = None, traddr: Optional[str] = None,
    +             server_address: Optional[str] = None
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "host_nqn": Param(str, 'NVMeoF host NQN'),
                      "dhchap_controller_key": Param(str, 'Host DH-HMAC-CHAP controller key'),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @handle_nvmeof_error
              def change_controller_key(
                  self, nqn: str, host_nqn: str, dhchap_controller_key: str,
    --            gw_group: Optional[str] = None, server_address: Optional[str] = None
    +-            gw_group: Optional[str] = None, traddr: Optional[str] = None
     +            gw_group: Optional[str] = None, server_address: Optional[str] = None,
     +            traddr: Optional[str] = None
              ):
    +-            return NVMeoFClient(gw_group=gw_group, traddr=traddr).stub.change_host_key(
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
     +                traddr=traddr
     +            )
    -             return NVMeoFClient(
    -                 gw_group=gw_group,
    -                 server_address=server_address
    ++            return NVMeoFClient(
    ++                gw_group=gw_group,
    ++                server_address=server_address
    ++            ).stub.change_host_key(
    +                 NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
    +                                                      host_nqn=host_nqn,
    +                                                      dhchap_key="-",
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "host_nqn": Param(str, 'NVMeoF host NQN.'),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      gw_group=gw_group,
                      server_address=server_address
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "host_nqn": Param(str, 'NVMeoF host NQN.'),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    -                 "server_address": Param(str, "NVMeoF gateway address", True, None),
    ++                "server_address": Param(str, "NVMeoF gateway address", True, None),
     +                "traddr": Param(str, "NVMeoF gateway address (deprecated)", True, None),
                  },
              )
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
              @handle_nvmeof_error
              def del_controller_key(
                  self, nqn: str, host_nqn: str, gw_group: Optional[str] = None,
    --            server_address: Optional[str] = None
     +            server_address: Optional[str] = None,
    -+            traddr: Optional[str] = None
    +             traddr: Optional[str] = None
              ):
     +            server_address = resolve_nvmeof_server_address(
     +                server_address=server_address,
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
     +            )
                  return NVMeoFClient(
                      gw_group=gw_group,
    -                 server_address=server_address
    +-                traddr=traddr
    ++                server_address=server_address
    +             ).stub.change_host_key(
    +                 NVMeoFClient.pb2.change_host_key_req(subsystem_nqn=nqn,
    +                                                      host_nqn=host_nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                      "nqn": Param(str, "NVMeoF subsystem NQN"),
                      "gw_group": Param(str, "NVMeoF gateway group", True, None),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  if not nqn:
                      nqn = '*'
                  return NVMeoFClient(
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "host_nqn": Param(str, "NVMeoF host 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.ConnectionIOStatistics)
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             nqn: str,
    -             host_nqn: str,
    -             gw_group: Optional[str] = None,
    --            server_address: 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
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                 "host_nqn": Param(str, "NVMeoF host 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.ConnectionIOStatistics)
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -             nqn: str,
    -             host_nqn: str,
    -             gw_group: Optional[str] = None,
    --            server_address: 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
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                               'subsystem_nqn': (str, 'Subsystem NQN'),
                               "allow_all": Param(bool, 'Allow all hosts. Default is True.'),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  response = None
      
                  if allow_all:
    +                 return NVMeoFClient(gw_group=gw_group,
    +-                                    traddr=server_address).stub.add_host(
    ++                                    server_address=server_address).stub.add_host(
    +                     NVMeoFClient.pb2.add_host_req(
    +                         subsystem_nqn=subsystem_nqn,
    +                         host_nqn="*",
    +@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    +                 key = h.get("dhchap_key")
    + 
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.add_host(
    ++                                        server_address=server_address).stub.add_host(
    +                     NVMeoFClient.pb2.add_host_req(
    +                         subsystem_nqn=subsystem_nqn,
    +                         host_nqn=nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                           parameters={
                               "subsystem_nqn": Param(str, "NVMeoF subsystem NQN"),
    @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
                  response = None
                  to_delete_nqns = host_nqn.split(',')
      
    +             for del_nqn in to_delete_nqns:
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.remove_host(
    ++                                        server_address=server_address).stub.remove_host(
    +                     NVMeoFClient.pb2.remove_host_req(subsystem_nqn=subsystem_nqn, host_nqn=del_nqn)
    +                 )
    +                 if response.status != 0:
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                          ),
    -                          "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),
    -                      })
    -         @empty_response
    -         @handle_nvmeof_error
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                                     gw_group: str,
    -                                     host_nqn: str = "",
    -                                     force: Optional[bool] = None,
    --                                    server_address: Optional[str] = None):
    -+                                    server_address: Optional[str] = None,
    -+                                    traddr: Optional[str] = None):
    -+            server_address = resolve_nvmeof_server_address(
    -+                server_address=server_address,
    -+                traddr=traddr
    -+            )
    -             response = None
    -             all_host_nqns = host_nqn.split(',')
    -             force = str_to_bool(force) if force else None
    -@@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                          "host_nqn": Param(str, 'Comma separated list of NVMeoF host 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),
    -                      })
    -         @empty_response
    -         @handle_nvmeof_error
    + 
    +             for nqn in all_host_nqns:
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.namespace_add_host(
    ++                                        server_address=server_address).stub.namespace_add_host(
    +                     NVMeoFClient.pb2.namespace_add_host_req(subsystem_nqn=subsystem_nqn,
    +                                                             nsid=int(nsid),
    +                                                             host_nqn=nqn,
     @@ src/pybind/mgr/dashboard/controllers/nvmeof.py: else:
    -                                        subsystem_nqn: str,
    -                                        host_nqn: str,
    -                                        gw_group: str,
    --                                       server_address: Optional[str] = None):
    -+                                       server_address: Optional[str] = None,
    -+                                       traddr: Optional[str] = None):
    -+            server_address = resolve_nvmeof_server_address(
    -+                server_address=server_address,
    -+                traddr=traddr
    -+            )
    -             response = None
    -             to_delete_nqns = host_nqn.split(',')
      
    +             for del_nqn in to_delete_nqns:
    +                 response = NVMeoFClient(gw_group=gw_group,
    +-                                        traddr=server_address).stub.namespace_delete_host(
    ++                                        server_address=server_address).stub.namespace_delete_host(
    +                     NVMeoFClient.pb2.namespace_delete_host_req(
    +                         subsystem_nqn=subsystem_nqn,
    +                         nsid=int(nsid),
     
      ## src/pybind/mgr/dashboard/openapi.yaml ##
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
            responses:
              '200':
                content:
    -@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    -                   type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    -+                  type: string
    -               required:
    -               - enabled
    -               type: object
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
        /api/nvmeof/gateway/listener_info/{nqn}:
          get:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              '200':
                content:
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    +                 serial_number:
    +                   description: Subsystem serial number
    +                   type: string
    +-                traddr:
    ++                server_address:
                        description: NVMeoF gateway address
                        type: string
     +                traddr:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              '202':
                content:
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    required:
                    - dhchap_controller_key
    -               type: object
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    required:
                    - dhchap_key
    -               type: object
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    type: object
            responses:
    -         '200':
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    -                 server_address:
    -                   description: NVMeoF gateway address
    +                 gw_group:
    +                   description: NVMeoF gateway group
                        type: string
    -+                traddr:
    -+                  description: NVMeoF gateway address (deprecated)
    ++                server_address:
    ++                  description: NVMeoF gateway address
     +                  type: string
    +                 traddr:
    ++                  description: NVMeoF gateway address (deprecated)
    +                   type: string
                    type: object
            responses:
    -         '200':
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              name: server_address
              schema:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
            responses:
              '200':
                content:
    +@@ src/pybind/mgr/dashboard/openapi.yaml: paths:
    +                   default: false
    +                   description: Use a secure channel
    +                   type: boolean
    ++                server_address:
    ++                  description: NVMeoF gateway address
    ++                  type: string
    +                 traddr:
    +                   description: NVMeoF transport address
    +                   type: string
     @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
              name: server_address
              schema:
    @@ src/pybind/mgr/dashboard/openapi.yaml: paths:
                    type: object
     
      ## src/pybind/mgr/dashboard/services/nvmeof_cli.py ##
    -@@ src/pybind/mgr/dashboard/services/nvmeof_cli.py: from mgr_module import CLICheckNonemptyFileInput, HandleCommandResult
    +@@ src/pybind/mgr/dashboard/services/nvmeof_cli.py: from mgr_module import CLICheckNonemptyFileInput, HandleCommandResult, HandlerFu
      from prettytable import PrettyTable
      
      from ..cli import DBCLICommand
    @@ src/pybind/mgr/dashboard/services/nvmeof_cli.py: def convert_from_bytes(num_in_b
          def format_output(self, data, model):
     
      ## src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py ##
    -@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: from mgr_module import HandleCommandResult
    +@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: import pytest
    + from mgr_module import CLICommandBase, HandleCommandResult
      
    - from ..cli import DBCLICommand
      from ..controllers import EndpointDoc
     +from ..exceptions import DashboardException
      from ..model.nvmeof import CliFieldTransformer, CliFlags, CliHeader
      from ..services.nvmeof_cli import AnnotatedDataTextOutputFormatter, \
    -     NvmeofCLICommand, convert_from_bytes, convert_to_bytes, \
    --    format_host_updates
    -+    format_host_updates, resolve_nvmeof_server_address
    +-    NvmeofCLICommand, convert_from_bytes, convert_to_bytes
    ++    NvmeofCLICommand, convert_from_bytes, convert_to_bytes, \
    ++    resolve_nvmeof_server_address
      from ..tests import CLICommandTestMixin
      
      
    -@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: class TestFormatHostUpdates:
    -             template_item="H {host_nqn} {nqn}",
    -         )
    -         assert out == "H h1 nqn.test\nW nqn.test"
    +@@ src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py: class TestConvertToBytes:
    +         with pytest.raises(ValueError):
    +             assert convert_to_bytes('5') == 5368709120
    +         assert convert_to_bytes('5', default_unit='GB') == 5368709120
     +
     +
     +class TestResolveNvmeofServerAddress:

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@afreen23

Copy link
Copy Markdown
Contributor

This is a classic semantic rebase conflict — no text conflict, but a new call site was added on main for a signature the PR changes. Now make check is failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants