Skip to content

Commit b63e086

Browse files
author
Aashish Sharma
committed
mgr/dashboard: Export rgw multisite status via the API
Fixes: https://tracker.ceph.com/issues/64081 Signed-off-by: Aashish Sharma <[email protected]>
1 parent 2f867c0 commit b63e086

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

src/pybind/mgr/dashboard/controllers/rgw.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def status(self) -> dict:
8686
class RgwMultisiteStatus(RESTController):
8787
@Endpoint()
8888
@ReadPermission
89+
@EndpointDoc("Get the multisite sync status")
8990
# pylint: disable=R0801
9091
def status(self):
9192
status = {'available': True, 'message': None}
@@ -110,6 +111,10 @@ def migrate(self, daemon_name=None, realm_name=None, zonegroup_name=None, zone_n
110111
secret_key)
111112
return result
112113

114+
115+
@APIRouter('rgw/multisite', Scope.RGW)
116+
@APIDoc("RGW Multisite Management API", "RgwMultisite")
117+
class RgwMultisiteSyncStatus(RESTController):
113118
@RESTController.Collection(method='GET', path='/sync_status')
114119
@allow_empty_body
115120
# pylint: disable=W0102,W0613

src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-multisite.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { RgwDaemonService } from './rgw-daemon.service';
77
providedIn: 'root'
88
})
99
export class RgwMultisiteService {
10-
private url = 'ui-api/rgw/multisite';
10+
private uiUrl = 'ui-api/rgw/multisite';
11+
private url = 'api/rgw/multisite';
1112

1213
constructor(private http: HttpClient, public rgwDaemonService: RgwDaemonService) {}
1314

@@ -22,7 +23,7 @@ export class RgwMultisiteService {
2223
access_key: zone.system_key.access_key,
2324
secret_key: zone.system_key.secret_key
2425
});
25-
return this.http.put(`${this.url}/migrate`, null, { params: params });
26+
return this.http.put(`${this.uiUrl}/migrate`, null, { params: params });
2627
});
2728
}
2829

src/pybind/mgr/dashboard/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9545,6 +9545,28 @@ paths:
95459545
- jwt: []
95469546
tags:
95479547
- RgwDaemon
9548+
/api/rgw/multisite/sync_status:
9549+
get:
9550+
parameters: []
9551+
responses:
9552+
'200':
9553+
content:
9554+
application/vnd.ceph.api.v1.0+json:
9555+
type: object
9556+
description: OK
9557+
'400':
9558+
description: Operation exception. Please check the response body for details.
9559+
'401':
9560+
description: Unauthenticated access. Please login first.
9561+
'403':
9562+
description: Unauthorized access. Please check your permissions.
9563+
'500':
9564+
description: Unexpected error. Please check the response body for the stack
9565+
trace.
9566+
security:
9567+
- jwt: []
9568+
tags:
9569+
- RgwMultisite
95489570
/api/rgw/realm:
95499571
get:
95509572
parameters: []
@@ -13194,6 +13216,8 @@ tags:
1319413216
name: RgwDaemon
1319513217
- description: Rgw Mirroring Perf Counters Management API
1319613218
name: RgwMirrorPerfCounter
13219+
- description: RGW Multisite Management API
13220+
name: RgwMultisite
1319713221
- description: Rgw Perf Counters Management API
1319813222
name: RgwPerfCounter
1319913223
- description: '*No description available*'

0 commit comments

Comments
 (0)