Skip to content

Commit 17b2100

Browse files
authored
Merge pull request ceph#55228 from rhcs-dashboard/fix-64081-main
mgr/dashboard: Export rgw multisite status via the API Reviewed-by: Avan Thakkar <[email protected]> Reviewed-by: Nizamudeen A <[email protected]>
2 parents 8f02b07 + b63e086 commit 17b2100

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
@@ -9549,6 +9549,28 @@ paths:
95499549
- jwt: []
95509550
tags:
95519551
- RgwDaemon
9552+
/api/rgw/multisite/sync_status:
9553+
get:
9554+
parameters: []
9555+
responses:
9556+
'200':
9557+
content:
9558+
application/vnd.ceph.api.v1.0+json:
9559+
type: object
9560+
description: OK
9561+
'400':
9562+
description: Operation exception. Please check the response body for details.
9563+
'401':
9564+
description: Unauthenticated access. Please login first.
9565+
'403':
9566+
description: Unauthorized access. Please check your permissions.
9567+
'500':
9568+
description: Unexpected error. Please check the response body for the stack
9569+
trace.
9570+
security:
9571+
- jwt: []
9572+
tags:
9573+
- RgwMultisite
95529574
/api/rgw/realm:
95539575
get:
95549576
parameters: []
@@ -13198,6 +13220,8 @@ tags:
1319813220
name: RgwDaemon
1319913221
- description: Rgw Mirroring Perf Counters Management API
1320013222
name: RgwMirrorPerfCounter
13223+
- description: RGW Multisite Management API
13224+
name: RgwMultisite
1320113225
- description: Rgw Perf Counters Management API
1320213226
name: RgwPerfCounter
1320313227
- description: '*No description available*'

0 commit comments

Comments
 (0)