From 2e13515bad426ad78ab1e3b423df9b89214d4866 Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Fri, 13 Oct 2023 13:53:23 +0530 Subject: [PATCH] mgr/dashboard: add port and zone endpoints to import realm token form in rgw multisite Signed-off-by: Aashish Sharma (cherry picked from commit 84ec19442b2db4f4e389810efbc01674d9824408) --- src/pybind/mgr/dashboard/controllers/rgw.py | 4 +- .../rgw-multisite-import.component.html | 122 +++++++++++++++++- .../rgw-multisite-import.component.ts | 115 +++++++++++++++-- .../src/app/shared/api/rgw-realm.service.ts | 16 +-- src/pybind/mgr/dashboard/openapi.yaml | 6 +- .../mgr/dashboard/services/ceph_service.py | 5 +- src/pybind/mgr/rgw/module.py | 13 +- 7 files changed, 249 insertions(+), 32 deletions(-) diff --git a/src/pybind/mgr/dashboard/controllers/rgw.py b/src/pybind/mgr/dashboard/controllers/rgw.py index 65c809ebec0..9ccf4b36b2b 100644 --- a/src/pybind/mgr/dashboard/controllers/rgw.py +++ b/src/pybind/mgr/dashboard/controllers/rgw.py @@ -812,10 +812,10 @@ class RgwRealm(RESTController): @UpdatePermission @allow_empty_body # pylint: disable=W0613 - def import_realm_token(self, realm_token, zone_name, daemon_name=None): + def import_realm_token(self, realm_token, zone_name, port, placement_spec): try: multisite_instance = RgwMultisite() - result = CephService.import_realm_token(realm_token, zone_name) + result = CephService.import_realm_token(realm_token, zone_name, port, placement_spec) multisite_instance.update_period() return result except NoRgwDaemonsException as e: diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.html index bf11e04029a..a001e4b00c7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-import/rgw-multisite-import.component.html @@ -13,9 +13,9 @@
  • This feature allows you to configure a connection between your primary and secondary Ceph clusters for data replication. By importing a token, you establish a link between the clusters, enabling data synchronization.
  • To obtain the token, generate it from your secondary Ceph cluster. This token includes encoded information about the secondary cluster's endpoint, access key, and secret key.
  • The secondary zone represents the destination cluster where your data will be replicated.
  • -
  • Please create an RGW service using the secondary zone (created after submitting this form) to start the replication between zones.
  • + Zone Details
    + + Service Details +
    +
    +
    + + + If set to true, the orchestrator will not start nor stop any daemon associated with this service. + Placement and all other properties will be ignored. +
    +
    +
    + + +
    + +
    + +
    +
    + + +
    + +
    + + This field is required. +
    +
    + + +
    + +
    + + +
    +
    + + +
    + +
    + + The value must be at least 1. + The entered value needs to be a number. +
    +
    + + + + +
    + +
    + + The entered value needs to be a number. + The value must be at least 1. + The value cannot exceed 65535. +
    +
    +