]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: add validations to zone access/secret key in zone creation/edit form
authorAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Wed, 26 Jul 2023 06:00:32 +0000 (11:30 +0530)
committerAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Wed, 16 Aug 2023 14:24:27 +0000 (19:54 +0530)
Fixes: https://tracker.ceph.com/issues/62124
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
(cherry picked from commit f85d83125d27df4b6be24caa2cd7fa0655e56ec6)

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.ts
src/pybind/mgr/dashboard/openapi.yaml

index 19d957646a7c8668a9f6cfd75be59db636c44bfd..70d31a2bbccfaecbd536d2ac9a1589d23fe34b2d 100644 (file)
@@ -112,8 +112,8 @@ export class RgwMultisiteZoneFormComponent implements OnInit {
           Validators.required
         ]
       }),
-      access_key: new FormControl(null),
-      secret_key: new FormControl(null),
+      access_key: new FormControl(null, Validators.required),
+      secret_key: new FormControl(null, Validators.required),
       placementTarget: new FormControl(null),
       placementDataPool: new FormControl(''),
       placementIndexPool: new FormControl(null),
index 3348ccd4352c1c639506aeb28b7a6d0cb63ce34f..52f02df53a43663d6923a3c149c70a6646dac883 100644 (file)
@@ -8553,7 +8553,12 @@ paths:
       tags:
       - RgwRealm
     get:
-      parameters: []
+      parameters:
+      - in: path
+        name: realm_name
+        required: true
+        schema:
+          type: string
       responses:
         '200':
           content:
@@ -8573,30 +8578,32 @@ paths:
       - jwt: []
       tags:
       - RgwRealm
-  /api/rgw/realm/import_realm_token:
-    post:
-      parameters: []
+    put:
+      parameters:
+      - in: path
+        name: realm_name
+        required: true
+        schema:
+          type: string
       requestBody:
         content:
           application/json:
             schema:
               properties:
-                daemon_name:
-                  type: string
-                realm_token:
+                default:
+                  default: ''
                   type: string
-                zone_name:
+                new_realm_name:
                   type: string
               required:
-              - realm_token
-              - zone_name
+              - new_realm_name
               type: object
       responses:
-        '201':
+        '200':
           content:
             application/vnd.ceph.api.v1.0+json:
               type: object
-          description: Resource created.
+          description: Resource updated.
         '202':
           content:
             application/vnd.ceph.api.v1.0+json:
@@ -8615,14 +8622,9 @@ paths:
       - jwt: []
       tags:
       - RgwRealm
-  /api/rgw/realm/{realm_name}:
-    delete:
-      parameters:
-      - in: path
-        name: realm_name
-        required: true
-        schema:
-          type: string
+  /api/rgw/roles:
+    get:
+      parameters: []
       responses:
         '200':
           content:
@@ -8640,35 +8642,32 @@ paths:
             trace.
       security:
       - jwt: []
+      summary: List RGW roles
       tags:
-      - RgwRealm
-    put:
-      parameters:
-      - in: path
-        name: realm_name
-        required: true
-        schema:
-          type: string
+      - RGW
+    post:
+      parameters: []
       requestBody:
         content:
           application/json:
             schema:
               properties:
-                default:
+                role_assume_policy_doc:
                   default: ''
                   type: string
-                new_realm_name:
+                role_name:
+                  default: ''
+                  type: string
+                role_path:
+                  default: ''
                   type: string
-              required:
-              - default
-              - new_realm_name
               type: object
       responses:
-        '200':
+        '201':
           content:
             application/vnd.ceph.api.v1.0+json:
               type: object
-          description: Resource updated.
+          description: Resource created.
         '202':
           content:
             application/vnd.ceph.api.v1.0+json:
@@ -8685,8 +8684,9 @@ paths:
             trace.
       security:
       - jwt: []
+      summary: Create Ceph User
       tags:
-      - RgwRealm
+      - RGW
   /api/rgw/site:
     get:
       parameters: