Skip to content

Commit 98482e1

Browse files
committed
Implement all APIs
1 parent c5724ba commit 98482e1

21 files changed

+829
-30
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
ceph-web
44

5+
.idea
6+
57
# Compiled Object files, Static and Dynamic libs (Shared Objects)
68
*.o
79
*.a

.idea/libraries/GOPATH__ceph_web_.xml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apitest/auth_list.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"status": "OK",
3+
"output": {
4+
"auth_dump": [
5+
{
6+
"caps": {
7+
"mds": "allow",
8+
"mon": "allow profile mds",
9+
"osd": "allow *"
10+
},
11+
"key": "AQAsXZJVMdM2CRAAQH9oe9Uki6znzsYjjlT6oQ==",
12+
"entity": "mds.0"
13+
},
14+
{
15+
"caps": {
16+
"mon": "allow profile osd",
17+
"osd": "allow *"
18+
},
19+
"key": "AQAoXZJVYx9eLxAAHUgf/YkhHdBA+kAU9QTgPw==",
20+
"entity": "osd.0"
21+
},
22+
{
23+
"auid": 0,
24+
"caps": {
25+
"mds": "allow",
26+
"mon": "allow *",
27+
"osd": "allow *"
28+
},
29+
"key": "AQAnXZJVlzhnDRAAZqLtOOzmyt2z0Vp5VHjWnQ==",
30+
"entity": "client.admin"
31+
},
32+
{
33+
"caps": {
34+
"mon": "allow rw",
35+
"osd": "allow rwx"
36+
},
37+
"key": "AQAsXZJVIoJBEhAAGdmjeFheNkJilh0SajpuAw==",
38+
"entity": "client.radosgw.gateway"
39+
}
40+
]
41+
}
42+
}

apitest/health.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"status": "OK",
3+
"output": {
4+
"detail": [],
5+
"timechecks": {
6+
"round_status": "finished",
7+
"epoch": 2,
8+
"round": 0
9+
},
10+
"health": {
11+
"health_services": [
12+
{
13+
"mons": [
14+
{
15+
"last_updated": "2015-06-30 11:28:03.343213",
16+
"name": "sahara",
17+
"avail_percent": 79,
18+
"kb_total": 122940436,
19+
"kb_avail": 97603580,
20+
"health": "HEALTH_OK",
21+
"kb_used": 19068800,
22+
"store_stats": {
23+
"bytes_total": 3853457,
24+
"bytes_log": 3852202,
25+
"last_updated": "0.000000",
26+
"bytes_misc": 1255,
27+
"bytes_sst": 0
28+
}
29+
}
30+
]
31+
}
32+
]
33+
},
34+
"overall_status": "HEALTH_OK",
35+
"summary": []
36+
}
37+
}

apitest/mds_compat_show.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"status": "OK",
3+
"output": {
4+
"compat": {},
5+
"ro_compat": {},
6+
"incompat": {
7+
"feature_8": "no anchor table",
8+
"feature_2": "client writeable ranges",
9+
"feature_3": "default file layouts on dirs",
10+
"feature_1": "base v0.20",
11+
"feature_6": "dirfrag is stored in omap",
12+
"feature_4": "dir inode in separate object",
13+
"feature_5": "mds uses versioned encoding"
14+
}
15+
}
16+
}

apitest/mds_stat.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"status": "OK",
3+
"output": {
4+
"mdsmap_first_committed": 1,
5+
"mdsmap": {
6+
"session_autoclose": 300,
7+
"up": {
8+
"mds_0": 4106
9+
},
10+
"last_failure_osd_epoch": 0,
11+
"in": [
12+
0
13+
],
14+
"last_failure": 0,
15+
"max_file_size": 1099511627776,
16+
"tableserver": 0,
17+
"metadata_pool": 2,
18+
"failed": [],
19+
"epoch": 4,
20+
"flags": 0,
21+
"max_mds": 1,
22+
"compat": {
23+
"compat": {},
24+
"ro_compat": {},
25+
"incompat": {
26+
"feature_8": "no anchor table",
27+
"feature_2": "client writeable ranges",
28+
"feature_3": "default file layouts on dirs",
29+
"feature_1": "base v0.20",
30+
"feature_6": "dirfrag is stored in omap",
31+
"feature_4": "dir inode in separate object",
32+
"feature_5": "mds uses versioned encoding"
33+
}
34+
},
35+
"data_pools": [
36+
1
37+
],
38+
"info": {
39+
"gid_4106": {
40+
"standby_for_rank": -1,
41+
"export_targets": [],
42+
"name": "0",
43+
"incarnation": 1,
44+
"state_seq": 2,
45+
"state": "up:active",
46+
"gid": 4106,
47+
"rank": 0,
48+
"standby_for_name": "",
49+
"addr": "172.16.0.206:6804/410"
50+
}
51+
},
52+
"fs_name": "cephfs",
53+
"created": "2015-06-30 09:11:07.993442",
54+
"enabled": true,
55+
"modified": "2015-06-30 09:11:10.364130",
56+
"session_timeout": 60,
57+
"stopped": [],
58+
"root": 0
59+
},
60+
"mdsmap_last_committed": 4
61+
}
62+
}

apitest/mds_stat.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
bat 192.168.99.100:5000/api/v0.1/mds/stat

apitest/mds_status.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

apitest/osd_blacklist_ls.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"status": "listed 0 entries",
3+
"output": []
4+
}

apitest/osd_crush_dump.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"status": "OK",
3+
"output": {
4+
"rules": [
5+
{
6+
"min_size": 1,
7+
"rule_name": "replicated_ruleset",
8+
"steps": [
9+
{
10+
"item_name": "default",
11+
"item": -1,
12+
"op": "take"
13+
},
14+
{
15+
"num": 0,
16+
"type": "osd",
17+
"op": "choose_firstn"
18+
},
19+
{
20+
"op": "emit"
21+
}
22+
],
23+
"ruleset": 0,
24+
"type": 1,
25+
"rule_id": 0,
26+
"max_size": 10
27+
}
28+
],
29+
"tunables": {
30+
"profile": "unknown",
31+
"has_v3_rules": 0,
32+
"has_v4_buckets": 0,
33+
"choose_total_tries": 50,
34+
"require_feature_tunables3": 0,
35+
"legacy_tunables": 0,
36+
"chooseleaf_descend_once": 1,
37+
"allowed_bucket_algs": 22,
38+
"choose_local_fallback_tries": 0,
39+
"has_v2_rules": 0,
40+
"straw_calc_version": 1,
41+
"require_feature_tunables2": 1,
42+
"optimal_tunables": 0,
43+
"choose_local_tries": 0,
44+
"chooseleaf_vary_r": 0,
45+
"require_feature_tunables": 1
46+
},
47+
"buckets": [
48+
{
49+
"hash": "rjenkins1",
50+
"name": "default",
51+
"weight": 65536,
52+
"type_id": 10,
53+
"alg": "straw",
54+
"type_name": "root",
55+
"items": [
56+
{
57+
"id": -2,
58+
"weight": 65536,
59+
"pos": 0
60+
}
61+
],
62+
"id": -1
63+
},
64+
{
65+
"hash": "rjenkins1",
66+
"name": "sahara",
67+
"weight": 65536,
68+
"type_id": 1,
69+
"alg": "straw",
70+
"type_name": "host",
71+
"items": [
72+
{
73+
"id": 0,
74+
"weight": 65536,
75+
"pos": 0
76+
}
77+
],
78+
"id": -2
79+
}
80+
],
81+
"types": [
82+
{
83+
"name": "osd",
84+
"type_id": 0
85+
},
86+
{
87+
"name": "host",
88+
"type_id": 1
89+
},
90+
{
91+
"name": "chassis",
92+
"type_id": 2
93+
},
94+
{
95+
"name": "rack",
96+
"type_id": 3
97+
},
98+
{
99+
"name": "row",
100+
"type_id": 4
101+
},
102+
{
103+
"name": "pdu",
104+
"type_id": 5
105+
},
106+
{
107+
"name": "pod",
108+
"type_id": 6
109+
},
110+
{
111+
"name": "room",
112+
"type_id": 7
113+
},
114+
{
115+
"name": "datacenter",
116+
"type_id": 8
117+
},
118+
{
119+
"name": "region",
120+
"type_id": 9
121+
},
122+
{
123+
"name": "root",
124+
"type_id": 10
125+
}
126+
],
127+
"devices": [
128+
{
129+
"id": 0,
130+
"name": "osd.0"
131+
}
132+
]
133+
}
134+
}

0 commit comments

Comments
 (0)