Project

General

Profile

Bug #43165

Updated by Kiefer Chang almost 4 years ago

We are using `/api/orchestrator/<resource>` endpoints to expose information from orchestrator to users. 
 In order to make the API much RESTful, we should try to minimize the use of the endpoints and integrate those orchestrator calls into suitable existing endpoints. 
 See these discussions for more information: 
 * https://github.com/ceph/ceph/pull/31851#discussion_r354493499 
 * https://github.com/ceph/ceph/pull/29127 

 Some thoughts of improvement: 

 *+/api/orchestrator/status+* 

 Keep it or move to */api/summary*. 


 *+/api/orchestrator/inventory+* 

 We use this endpoint to expose devices that belonged to all hosts or one host. 

 <pre> 
 /api/orchestrator/inventory 
 /api/orchestrator/inventory?hostname=node1 
 </pre> 

 Which might be moved to: 

 <pre> 
 /api/host/node1/devices 
 </pre> 

 The difficulties here are: 
 * */host/<hostname>/devices* endpoints is already used for devices reported from Ceph. Which needs further integration. 
 * There is a page *Cluster -> Inventory* that lists all devices on all hosts. To keep that page, we need to 
 ** forkjoin or merge individual calls for each host 
 ** Create a special endpoint to return all inventory devices, which is the reason I choose */api/orchestrator/inventory* before. 

 -*+/api/orchestrator/service+*- (*Moved to /api/services*) *+/api/orchestrator/service+* 

 May just rename to */api/service*. 

 -*+/api/orchestrator/osd+*- (*Removed*) *+/api/orchestrator/osd+* 

 Integrate into */api/osd*. 



Back