|
19 | 19 | ) |
20 | 20 | from ai.backend.common.dto.manager.v2.app_config.response import ( |
21 | 21 | AppConfigNode, |
22 | | - BulkCreateMyAppConfigFragmentsPayload, |
23 | | - BulkUpdateMyAppConfigFragmentsPayload, |
24 | 22 | GetUserAppConfigPayload, |
| 23 | + MyBulkCreateAppConfigFragmentsPayload, |
| 24 | + MyBulkUpdateAppConfigFragmentsPayload, |
25 | 25 | SearchAppConfigsPayload, |
26 | 26 | ) |
27 | 27 | from ai.backend.common.dto.manager.v2.app_config.types import AppConfigOrderField, OrderDirection |
28 | 28 | from ai.backend.common.dto.manager.v2.app_config_fragment.request import ( |
29 | | - BulkCreateMyAppConfigFragmentsInput, |
30 | | - BulkUpdateMyAppConfigFragmentsInput, |
| 29 | + MyBulkCreateAppConfigFragmentsInput, |
| 30 | + MyBulkUpdateAppConfigFragmentsInput, |
31 | 31 | ) |
32 | 32 | from ai.backend.common.dto.manager.v2.app_config_fragment.response import ( |
33 | 33 | AppConfigFragmentBulkError, |
|
52 | 52 | from ai.backend.manager.services.app_config_fragment.actions.admin_search_app_configs import ( |
53 | 53 | AdminSearchAppConfigsAction, |
54 | 54 | ) |
55 | | -from ai.backend.manager.services.app_config_fragment.actions.bulk_create_my import ( |
56 | | - BulkCreateMyAppConfigFragmentsAction, |
57 | | -) |
58 | | -from ai.backend.manager.services.app_config_fragment.actions.bulk_update_my import ( |
59 | | - BulkUpdateMyAppConfigFragmentsAction, |
60 | | -) |
61 | 55 | from ai.backend.manager.services.app_config_fragment.actions.get_user_app_config import ( |
62 | 56 | GetUserAppConfigAction, |
63 | 57 | ) |
| 58 | +from ai.backend.manager.services.app_config_fragment.actions.my_bulk_create import ( |
| 59 | + MyBulkCreateAppConfigFragmentsAction, |
| 60 | +) |
| 61 | +from ai.backend.manager.services.app_config_fragment.actions.my_bulk_update import ( |
| 62 | + MyBulkUpdateAppConfigFragmentsAction, |
| 63 | +) |
64 | 64 | from ai.backend.manager.services.app_config_fragment.actions.search_user_app_configs import ( |
65 | 65 | SearchUserAppConfigsAction, |
66 | 66 | ) |
@@ -154,33 +154,33 @@ async def admin_search_app_configs( |
154 | 154 | # reasons travel back through the per-item `failed` list. |
155 | 155 |
|
156 | 156 | async def my_bulk_create( |
157 | | - self, input: BulkCreateMyAppConfigFragmentsInput |
158 | | - ) -> BulkCreateMyAppConfigFragmentsPayload: |
| 157 | + self, input: MyBulkCreateAppConfigFragmentsInput |
| 158 | + ) -> MyBulkCreateAppConfigFragmentsPayload: |
159 | 159 | items = [ |
160 | 160 | MyAppConfigFragmentBulkItem(name=item.name, extra_config=dict(item.extra_config)) |
161 | 161 | for item in input.items |
162 | 162 | ] |
163 | | - wrapper = await self._processors.app_config_fragment.bulk_create_my.wait_for_complete( |
164 | | - BulkCreateMyAppConfigFragmentsAction(entity_ids=[], items=items) |
| 163 | + wrapper = await self._processors.app_config_fragment.my_bulk_create.wait_for_complete( |
| 164 | + MyBulkCreateAppConfigFragmentsAction(entity_ids=[], items=items) |
165 | 165 | ) |
166 | 166 | result = wrapper.result |
167 | | - return BulkCreateMyAppConfigFragmentsPayload( |
| 167 | + return MyBulkCreateAppConfigFragmentsPayload( |
168 | 168 | created=[self._data_to_dto(item) for item in result.created], |
169 | 169 | failed=[self._bulk_error_to_dto(err) for err in result.failed], |
170 | 170 | ) |
171 | 171 |
|
172 | 172 | async def my_bulk_update( |
173 | | - self, input: BulkUpdateMyAppConfigFragmentsInput |
174 | | - ) -> BulkUpdateMyAppConfigFragmentsPayload: |
| 173 | + self, input: MyBulkUpdateAppConfigFragmentsInput |
| 174 | + ) -> MyBulkUpdateAppConfigFragmentsPayload: |
175 | 175 | items = [ |
176 | 176 | MyAppConfigFragmentBulkItem(name=item.name, extra_config=dict(item.extra_config)) |
177 | 177 | for item in input.items |
178 | 178 | ] |
179 | | - wrapper = await self._processors.app_config_fragment.bulk_update_my.wait_for_complete( |
180 | | - BulkUpdateMyAppConfigFragmentsAction(entity_ids=[], items=items) |
| 179 | + wrapper = await self._processors.app_config_fragment.my_bulk_update.wait_for_complete( |
| 180 | + MyBulkUpdateAppConfigFragmentsAction(entity_ids=[], items=items) |
181 | 181 | ) |
182 | 182 | result = wrapper.result |
183 | | - return BulkUpdateMyAppConfigFragmentsPayload( |
| 183 | + return MyBulkUpdateAppConfigFragmentsPayload( |
184 | 184 | updated=[self._data_to_dto(item) for item in result.updated], |
185 | 185 | failed=[self._bulk_error_to_dto(err) for err in result.failed], |
186 | 186 | ) |
|
0 commit comments