|
13 | 13 |
|
14 | 14 |
|
15 | 15 | class UnlockDeviceDetail(BaseModel): |
| 16 | + model_config = ConfigDict(populate_by_name=True) |
| 17 | + |
16 | 18 | device_id: str = Field(validation_alias="deviceId", serialization_alias="deviceId") |
17 | 19 | device_ip: str = Field(validation_alias="deviceIP", serialization_alias="deviceIP") |
18 | 20 |
|
19 | 21 |
|
20 | 22 | class DeviceUnlockPayload(BaseModel): |
| 23 | + model_config = ConfigDict(populate_by_name=True) |
| 24 | + |
21 | 25 | device_type: str = Field(validation_alias="deviceType", serialization_alias="deviceType") |
22 | 26 | devices: List[UnlockDeviceDetail] |
23 | 27 |
|
@@ -274,36 +278,29 @@ class UploadSerialFileResponse(BaseModel): |
274 | 278 | class ConfigurationDeviceInventory(APIEndpoints): |
275 | 279 | @versions(supported_versions=(">=20.9"), raises=False) |
276 | 280 | @post("/system/device/{device_uuid}/unlock") |
277 | | - def unlock(self, device_uuid: UUID, payload: DeviceUnlockPayload) -> DeviceUnlockResponse: |
278 | | - ... |
| 281 | + def unlock(self, device_uuid: UUID, payload: DeviceUnlockPayload) -> DeviceUnlockResponse: ... |
279 | 282 |
|
280 | 283 | @post("/system/device") |
281 | | - def create_device(self, payload: DeviceCreationPayload) -> None: |
282 | | - ... |
| 284 | + def create_device(self, payload: DeviceCreationPayload) -> None: ... |
283 | 285 |
|
284 | 286 | @delete("/system/device/{uuid}") |
285 | | - def delete_device(self, uuid: UUID) -> DeviceDeletionResponse: |
286 | | - ... |
| 287 | + def delete_device(self, uuid: UUID) -> DeviceDeletionResponse: ... |
287 | 288 |
|
288 | 289 | # Covers: |
289 | 290 | # url = "/dataservice/system/device/controllers" |
290 | 291 | # url = "/dataservice/system/device/vedges" |
291 | 292 | @get("/system/device/{device_category}", "data") |
292 | 293 | def get_device_details( |
293 | 294 | self, device_category: DeviceCategory, params: DeviceDetailsQueryParams = DeviceDetailsQueryParams() |
294 | | - ) -> DataSequence[DeviceDetailsResponse]: |
295 | | - ... |
| 295 | + ) -> DataSequence[DeviceDetailsResponse]: ... |
296 | 296 |
|
297 | 297 | @post("/system/device/smartaccount/sync") |
298 | | - def sync_devices_from_smart_account(self, payload: SmartAccountSyncParams) -> ProcessId: |
299 | | - ... |
| 298 | + def sync_devices_from_smart_account(self, payload: SmartAccountSyncParams) -> ProcessId: ... |
300 | 299 |
|
301 | 300 | @post("/system/device/fileupload") |
302 | | - def upload_wan_edge_list(self, payload: SerialFilePayload) -> UploadSerialFileResponse: |
303 | | - ... |
| 301 | + def upload_wan_edge_list(self, payload: SerialFilePayload) -> UploadSerialFileResponse: ... |
304 | 302 |
|
305 | 303 | @get("/system/device/bootstrap/device/{uuid}") |
306 | 304 | def generate_bootstrap_configuration( |
307 | 305 | self, uuid: UUID, params: GenerateBoostrapConfigurationQueryParams = GenerateBoostrapConfigurationQueryParams() |
308 | | - ) -> BoostrapConfiguration: |
309 | | - ... |
| 306 | + ) -> BoostrapConfiguration: ... |
0 commit comments