From 9e163e437a1268d9976f87c0c0b0242f41a9946c Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Wed, 26 Jul 2023 11:30:32 +0530 Subject: [PATCH] mgr/dashboard: add validations to zone access/secret key in zone creation/edit form Fixes: https://tracker.ceph.com/issues/62124 Signed-off-by: Aashish Sharma (cherry picked from commit f85d83125d27df4b6be24caa2cd7fa0655e56ec6) --- .../rgw-multisite-zone-form.component.ts | 4 +- src/pybind/mgr/dashboard/openapi.yaml | 72 +++++++++---------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.ts index 19d957646a7..70d31a2bbcc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.ts @@ -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), diff --git a/src/pybind/mgr/dashboard/openapi.yaml b/src/pybind/mgr/dashboard/openapi.yaml index 3348ccd4352..52f02df53a4 100644 --- a/src/pybind/mgr/dashboard/openapi.yaml +++ b/src/pybind/mgr/dashboard/openapi.yaml @@ -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: -- 2.39.5