Project

General

Profile

calamari-add-a-rbd-restful-api.txt

calamari add a rbd restful api - ceph zte, 04/06/2016 06:16 AM

Download (2.29 KB)

 
1
CALAMARI ADD A RBD RESTFUL API
2

    
3
SUMMARY
4
At present, Calamari has already introduced some RBD restful APIs 
5
but those APIs are only available in CLI form and therefore are
6
invisible for Cthulhu, which currently accepts Python APIs only.
7
And the ceph have provided the python api for user. So we need to develop the rbd restful api use 
8
the ceph python api for user to use.And just like the pool api. We should add the operation api for 
9
rbd. We can add the rbd restful api do not just through the rest_api but also like below.
10
calamari_rest---->cthulhu--->salt--minion
11

    
12

    
13

    
14
OWNERS
15
BAISEN SONG (ZTE)
16
Name (Affiliation)
17
Name
18

    
19
INTERESTED PARTIES
20
Name (Affiliation)
21
Name (Affiliation)
22
Name
23

    
24
CURRENT STATUS
25
Calamari has the simple rbd restful api but the api depend on cli.
26
The current rbd api was defined in rest-api do not like 
27
other api through the cthulhu. And we can use the ceph rbd python api take 
28
place the cli mode.
29
   
30

    
31

    
32

    
33
DETAILED DESCRIPTION
34
calmari_rest add api.
35
urls add the below api
36
1 /v2/cluster/fsid/rbd(get)   
37
   get: get info of all pools and their containing images.
38
   
39
2  /v2/cluster/fsid/pool_id/rbd(get,post)   
40
   get: get info of a specified pool and its containing images
41
   post: mirror image from a specified pool to another 
42
   
43
3 /v2/cluster/fsid/pool_id/rbd/imagename/clone(get post delete)
44
   get: get info of a specified image clone 
45
   post:clone this image from this pool to another pool
46
   delete:flatten the clone image in this pool  
47
   
48
4 /v2/cluster/fsid/pool_id/rbd/imagename(get,patch,delete,post)           
49
   get:get the image detail info
50
   patch:update the image name and size and so on.
51
   delete: remove this image
52
   post: create a snapshot for this image
53
   
54
5 /v2/cluster/fsid/pool_id/rbd/imagename/snapname(get,patch,delete)     
55
   get:get the detail snap info of this image
56
   patch:update the snap info as protect or not and so on.
57
   delete:remove this snapshot from the image
58

    
59
 
60
views add:
61
   pool_rbd_view_set rbd_view_set  rbd_snap_view_set
62

    
63
cthulhu_add:
64
   rbd_request_factory snap_request_factory
65
  
66
salt add:
67
   rbd_api  
68
  
69
WORK ITEMS
70
Coding tasks
71
Task 1
72
Task 2
73
Task 3
74

    
75
Build / release tasks
76
Task 1
77
Task 2
78
Task 3
79

    
80
Documentation tasks
81
Task 1
82
Task 2
83
Task 3
84

    
85
Deprecation tasks
86
Task 1
87
Task 2
88
Task 3