-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcnc_res_api.yaml
253 lines (247 loc) · 7.77 KB
/
cnc_res_api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
---
# Kafka 'CnC_Res' (default) topic API list that defines response messages format
# for each of the CnC request.
# The request messages for which these results are generated can be found in the
# 'cnc_api.yaml' file.
infrastructure_group_create_response:
description:
Response to corresponding 'infrastructure_group_create'
or 'infrastructure_group_create_to_shard' request(s).
type:
type: string
enum:
- infrastructure_group_create_response
reporter_shard_id:
description:
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
uuid:
description:
The underlying unique identifier of the request, to which
this response is being generated.
type: string
format: uuid
success:
type: boolean
error_message:
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).
type: string
infrastructure_group_delete_response:
description:
Response to corresponding 'infrastructure_group_delete' request.
type:
type: string
enum:
- infrastructure_group_delete_response
reporter_shard_id:
description:
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
uuid:
description:
The underlying unique identifier of the request, to which
this response is being generated.
type: string
format: uuid
success:
type: boolean
error_message:
type: string
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).
infrastructure_group_infras_add_response:
description:
Response to corresponding 'infrastructure_group_infras_add' request.
type:
type: string
enum:
- infrastructure_group_infras_add_response
reporter_shard_id:
description:
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
uuid:
type: string
format: uuid
description:
The underlying unique identifier of the request, to which
this response is being generated.
success:
type: boolean
error_message:
type: string
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).
failed_infras:
description:
Array of infras (MAC address / mac serial, any form is accepted) that
should were not added (failed to) to specified infra group.
Potential cause - infra is a duplicate (already member of specified group),
or it is already a member of some other group and should be removed
from old group first.
type: array
items:
type: string
kafka_partition_key:
description:
CGW can return a special string value - kafka partition key,
that can be used by generating consecutive CnC request,
that will result in direct addressing of the shard that replied
to the original request.
It's an optimization technique to overcome the need of
using relaying mechanism all the time.
NOTE - this kafka key in replies _could_ be used by the callers,
but it's not required. It's optional.
Can be empty.
Can be present even if request failed.
type: string
infrastructure_group_infras_del_response:
description:
Response to corresponding 'infrastructure_group_infras_del' request.
type:
type: string
enum:
- infrastructure_group_infras_del_response
reporter_shard_id:
description:
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
uuid:
type: string
format: uuid
description:
The underlying unique identifier of the request, to which
this response is being generated.
success:
type: boolean
error_message:
type: string
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).
failed_infras:
description:
Array of infras (MAC address / mac serial, any form is accepted) that
should were not removed (failed to) from specified infra group.
Potential cause - infra is not member of specified group.
type: array
items:
type: string
kafka_partition_key:
description:
CGW can return a special string value - kafka partition key,
that can be used by generating consecutive CnC request,
that will result in direct addressing of the shard that replied
to the original request.
It's an optimization technique to overcome the need of
using relaying mechanism all the time.
NOTE - this kafka key in replies _could_ be used by the callers,
but it's not required. It's optional.
Can be empty.
Can be present even if request failed.
type: string
infrastructure_group_infra_message_enqueue_response:
description:
Response to corresponding 'infrastructure_group_infra_message_enqueue' request.
type:
type: string
enum:
- infrastructure_group_infra_message_enqueue_response
reporter_shard_id:
description:
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
uuid:
type: string
format: uuid
description:
The underlying unique identifier of the request, to which
this response is being generated.
success:
type: boolean
error_message:
type: string
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).
kafka_partition_key:
description:
CGW can return a special string value - kafka partition key,
that can be used by generating consecutive CnC request,
that will result in direct addressing of the shard that replied
to the original request.
It's an optimization technique to overcome the need of
using relaying mechanism all the time.
NOTE - this kafka key in replies _could_ be used by the callers,
but it's not required. It's optional.
Can be empty.
Can be present even if request failed.
type: string
infra_request_result:
description:
Result of the underlying 'infrastructure_group_infra_message_enqueue' request execution.
This result is generated whenever underlying infra finishes and responds
to the request with status 'result' message that CGW handles internally.
type:
type: string
enum:
- infra_request_result
reporter_shard_id:
description:
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
uuid:
type: string
format: uuid
description:
The underlying unique identifier of the request, to which
this response is being generated.
success:
type: boolean
error_message:
type: string
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).
rebalance_groups_response:
description:
Response to corresponding 'rebalance_groups' request.
type:
type: string
enum:
- rebalance_groups_response
reporter_shard_id:
type: integer
description:
ID of the shard that handled request and generated this response.
infra_group_id:
type: integer
uuid:
type: string
format: uuid
description:
The underlying unique identifier of the request, to which
this response is being generated.
success:
type: boolean
error_message:
type: string
description:
Error message reporting why the request failed.
Non-empty only if 'success' is false (e.g. request failed).