@@ -28,185 +28,185 @@ class ErrorCode:
28
28
def __init__ (self ):
29
29
self .list_hosts_without_biz = self .generate_data_api (
30
30
method = "POST" ,
31
- url = "list_hosts_without_biz/ " ,
31
+ url = "/hosts/list_hosts_without_app " ,
32
32
description = _ ("没有业务信息的主机查询" ),
33
33
)
34
34
self .search_business = self .generate_data_api (
35
- method = "POST" , url = "search_business/ " , description = _ ("查询业务" ), cache_time = 900
35
+ method = "POST" , url = "/biz/search/bk_supplier_account " , description = _ ("查询业务" ), cache_time = 900
36
36
)
37
37
self .search_module = self .generate_data_api (
38
38
method = "POST" ,
39
- url = "search_module/ " ,
39
+ url = "/module/search/bk_supplier_account/{bk_biz_id}/{bk_set_id} " ,
40
40
description = _ ("查询模块" ),
41
41
)
42
42
self .create_set = self .generate_data_api (
43
43
method = "POST" ,
44
- url = "create_set/ " ,
44
+ url = "/set/{bk_biz_id} " ,
45
45
description = _ ("创建集群" ),
46
46
)
47
47
self .search_set = self .generate_data_api (
48
48
method = "POST" ,
49
- url = "search_set/ " ,
49
+ url = "/set/search/bk_supplier_account/{bk_biz_id} " ,
50
50
description = _ ("查询集群" ),
51
51
)
52
52
self .create_module = self .generate_data_api (
53
53
method = "POST" ,
54
- url = "create_module /" ,
54
+ url = "/module/{bk_biz_id}/{bk_set_id} /" ,
55
55
description = _ ("创建模块" ),
56
56
)
57
57
self .delete_module = self .generate_data_api (
58
- method = "POST " ,
59
- url = "delete_module/ " ,
58
+ method = "DELETE " ,
59
+ url = "/module/{bk_biz_id}/{bk_set_id}/{bk_module_id} " ,
60
60
description = _ ("删除模块" ),
61
61
)
62
62
self .transfer_host_across_biz = self .generate_data_api (
63
63
method = "POST" ,
64
- url = "transfer_host_across_biz/ " ,
64
+ url = "/hosts/modules/across/biz " ,
65
65
description = _ ("跨业务转移主机" ),
66
66
)
67
67
self .transfer_host_module = self .generate_data_api (
68
68
method = "POST" ,
69
- url = "transfer_host_module /" ,
69
+ url = "/hosts/modules /" ,
70
70
description = _ ("业务内主机转移模块" ),
71
71
)
72
- self .update_business = self .generate_data_api (method = "POST" , url = "update_business/" , description = _ ("修改业务" ))
73
- self .update_host = self .generate_data_api (method = "POST" , url = "update_host/" , description = _ ("修改主机" ))
72
+ self .update_business = self .generate_data_api (
73
+ method = "PUT" , url = "/biz/bk_supplier_account/{bk_biz_id}" , description = _ ("修改业务" )
74
+ )
75
+ self .update_host = self .generate_data_api (method = "PUT" , url = "/hosts/batch" , description = _ ("修改主机" ))
74
76
self .batch_update_host = self .generate_data_api (
75
- method = "POST " , url = "batch_update_host/ " , description = _ ("批量修改主机" )
77
+ method = "PUT " , url = "/hosts/property/batch " , description = _ ("批量修改主机" )
76
78
)
77
79
self .create_biz_custom_field = self .generate_data_api (
78
80
method = "POST" ,
79
- url = "create_biz_custom_field/ " ,
81
+ url = "/create/objectattr/biz/{bk_biz_id} " ,
80
82
description = _ ("创建自定义字段" ),
81
83
)
82
84
self .search_object_attribute = self .generate_data_api (
83
- method = "POST" , url = "search_object_attribute/ " , description = _ ("获取模型属性" ), cache_time = 60
85
+ method = "POST" , url = "/find/objectattr " , description = _ ("获取模型属性" ), cache_time = 60
84
86
)
85
87
self .create_object_attribute = self .generate_data_api (
86
88
method = "POST" ,
87
- url = "create_object_attribute/ " ,
89
+ url = "/create/objectattr " ,
88
90
description = _ ("创建模型属性" ),
89
91
)
90
92
self .transfer_host_to_idlemodule = self .generate_data_api (
91
93
method = "POST" ,
92
- url = "transfer_host_to_idlemodule/ " ,
94
+ url = "/hosts/modules/idle " ,
93
95
description = _ ("主机移动到空闲机模块" ),
94
96
)
95
97
self .transfer_host_to_recyclemodule = self .generate_data_api (
96
98
method = "POST" ,
97
- url = "transfer_host_to_recyclemodule/ " ,
99
+ url = "/hosts/modules/recycle " ,
98
100
description = _ ("主机移动到待回收模块" ),
99
101
)
100
102
self .search_biz_inst_topo = self .generate_data_api (
101
- method = "GET " , url = "search_biz_inst_topo/ " , description = _ ("查询业务实例拓扑" ), cache_time = 60
103
+ method = "POST " , url = "/find/topoinst/biz/{bk_biz_id} " , description = _ ("查询业务实例拓扑" ), cache_time = 60
102
104
)
103
105
self .list_biz_hosts = self .generate_data_api (
104
106
method = "POST" ,
105
- url = "list_biz_hosts/ " ,
107
+ url = "/hosts/app/{bk_biz_id}/list_hosts " ,
106
108
description = _ ("查询业务下的主机" ),
107
109
)
108
110
self .list_biz_hosts_topo = self .generate_data_api (
109
111
method = "POST" ,
110
- url = "list_biz_hosts_topo/ " ,
112
+ url = "/hosts/app/{bk_biz_id}/list_hosts_topo " ,
111
113
description = _ ("查询业务下的主机和拓扑信息" ),
112
114
)
113
115
self .get_biz_internal_module = self .generate_data_api (
114
- method = "GET" , url = "get_biz_internal_module/" , description = _ ("查询业务的空闲机/故障机/待回收模块" ), cache_time = 60 * 60
116
+ method = "GET" ,
117
+ url = "/topo/internal/bk_supplier_account/{bk_biz_id}" ,
118
+ description = _ ("查询业务的空闲机/故障机/待回收模块" ),
119
+ cache_time = 60 * 60 ,
115
120
)
116
121
self .find_host_topo_relation = self .generate_data_api (
117
122
method = "POST" ,
118
- url = "find_host_topo_relation/ " ,
123
+ url = "/host/topo/relation/read " ,
119
124
description = _ ("获取主机与拓扑的关系" ),
120
125
)
121
126
self .search_cloud_area = self .generate_data_api (
122
127
method = "POST" ,
123
- url = "search_cloud_area/ " ,
128
+ url = "/findmany/cloudarea " ,
124
129
cache_time = 60 ,
125
130
description = _ ("查询云区域" ),
126
131
)
127
132
self .list_host_total_mainline_topo = self .generate_data_api (
128
133
method = "POST" ,
129
- url = "list_host_total_mainline_topo/ " ,
134
+ url = "/findmany/hosts/total_mainline_topo/biz/{bk_biz_id} " ,
130
135
description = _ ("查询主机及其对应拓扑" ),
131
136
)
132
137
self .create_service_instance = self .generate_data_api (
133
138
method = "POST" ,
134
- url = "create_service_instance/ " ,
139
+ url = "/create/proc/service_instance " ,
135
140
description = _ ("创建服务实例" ),
136
141
)
137
142
self .list_service_instance = self .generate_data_api (
138
143
method = "POST" ,
139
- url = "list_service_instance/ " ,
144
+ url = "/findmany/proc/service_instance " ,
140
145
description = _ ("查询服务实例详细信息" ),
141
146
)
142
147
self .list_service_instance_by_host = self .generate_data_api (
143
148
method = "POST" ,
144
- url = "list_service_instance_by_host/ " ,
149
+ url = "/findmany/proc/service_instance/with_host " ,
145
150
description = _ ("直接通过bk_host_id查询服务实例详细信息" ),
146
151
)
147
152
self .list_service_instance_detail = self .generate_data_api (
148
153
method = "POST" ,
149
- url = "list_service_instance_detail/ " ,
154
+ url = "/findmany/proc/service_instance/details " ,
150
155
description = _ ("获取服务实例详细信息" ),
151
156
)
152
157
self .add_label_for_service_instance = self .generate_data_api (
153
158
method = "POST" ,
154
- url = "add_label_for_service_instance/ " ,
159
+ url = "/createmany/proc/service_instance/labels " ,
155
160
description = _ ("服务实例添加标签" ),
156
161
)
157
162
self .remove_label_from_service_instance = self .generate_data_api (
158
- method = "POST " ,
159
- url = "remove_label_from_service_instance/ " ,
163
+ method = "DELETE " ,
164
+ url = "/deletemany/proc/service_instance/labels " ,
160
165
description = _ ("从服务实例移除标签" ),
161
166
)
162
167
self .delete_service_instance = self .generate_data_api (
163
- method = "POST " ,
164
- url = "delete_service_instance/ " ,
168
+ method = "DELETE " ,
169
+ url = "/deletemany/proc/service_instance " ,
165
170
description = _ ("删除服务实例" ),
166
171
)
167
172
self .create_process_instance = self .generate_data_api (
168
173
method = "POST" ,
169
- url = "create_process_instance/ " ,
174
+ url = "/create/proc/process_instance " ,
170
175
description = _ ("创建实例进程" ),
171
176
)
172
177
self .delete_process_instance = self .generate_data_api (
173
- method = "POST " ,
174
- url = "delete_process_instance/ " ,
178
+ method = "DELETE " ,
179
+ url = "/delete/proc/process_instance " ,
175
180
description = _ ("删除实例进程" ),
176
181
)
177
182
self .list_process_instance = self .generate_data_api (
178
183
method = "POST" ,
179
- url = "list_process_instance/ " ,
184
+ url = "/findmany/proc/process_instance " ,
180
185
description = _ ("查询实例进程列表" ),
181
186
)
182
187
self .update_process_instance = self .generate_data_api (
183
188
method = "POST" ,
184
- url = "update_process_instance/ " ,
189
+ url = "/update/proc/process_instance " ,
185
190
description = _ ("更新实例进程" ),
186
191
)
187
- self .delete_module = self .generate_data_api (
188
- method = "POST" ,
189
- url = "delete_module/" ,
190
- description = _ ("删除模块" ),
191
- )
192
192
self .find_module_with_relation = self .generate_data_api (
193
- method = "POST " ,
194
- url = "find_module_with_relation/ " ,
193
+ method = "PUT " ,
194
+ url = "/update/proc/process_instance " ,
195
195
description = _ ("根据条件查询业务下的模块" ),
196
196
)
197
197
self .find_module_host_relation = self .generate_data_api (
198
198
method = "POST" ,
199
- url = "find_module_host_relation/ " ,
199
+ url = "/findmany/module/with_relation/biz/{bk_biz_id} " ,
200
200
description = _ ("根据模块ID查询主机和模块的关系" ),
201
201
)
202
202
self .find_host_biz_relations = self .generate_data_api (
203
203
method = "POST" ,
204
- url = "find_host_biz_relations/ " ,
204
+ url = "/hosts/modules/read " ,
205
205
description = _ ("查询主机业务关系信息" ),
206
206
)
207
207
self .find_module_batch = self .generate_data_api (
208
208
method = "POST" ,
209
- url = "find_module_batch/ " ,
209
+ url = "/findmany/module/bk_biz_id/{bk_biz_id} " ,
210
210
description = _ ("批量查询某业务的模块详情" ),
211
211
)
212
212
0 commit comments