mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Mirrored the changes made to the models in Commons
This commit is contained in:
parent
1012eb7553
commit
403010aa90
6 changed files with 124 additions and 15 deletions
|
@ -4,7 +4,8 @@ from typing import List, Union, Dict, Optional, Any
|
|||
|
||||
from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
|
||||
from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
|
||||
from .CloudClusterPrinterConfiguration import CloudClusterPrinterConfiguration
|
||||
from .CloudClusterBuildPlate import CloudClusterBuildPlate
|
||||
from .CloudClusterPrintCoreConfiguration import CloudClusterPrintCoreConfiguration
|
||||
from .BaseCloudModel import BaseCloudModel
|
||||
|
||||
|
||||
|
@ -22,12 +23,19 @@ class CloudClusterPrinterStatus(BaseCloudModel):
|
|||
# \param uuid: The unique ID of the printer, also known as GUID.
|
||||
# \param configuration: The active print core configurations of this printer.
|
||||
# \param reserved_by: A printer can be claimed by a specific print job.
|
||||
# \param maintenance_required: Indicates if maintenance is necessary
|
||||
# \param firmware_update_status: Whether the printer's firmware is up-to-date, value is one of: "up_to_date",
|
||||
# "pending_update", "update_available", "update_in_progress", "update_failed", "update_impossible"
|
||||
# \param latest_available_firmware: The version of the latest firmware that is available
|
||||
# \param build_plate: The build plate that is on the printer
|
||||
def __init__(self, enabled: bool, firmware_version: str, friendly_name: str, ip_address: str, machine_variant: str,
|
||||
status: str, unique_name: str, uuid: str,
|
||||
configuration: List[Union[Dict[str, Any], CloudClusterPrinterConfiguration]],
|
||||
reserved_by: Optional[str] = None, **kwargs) -> None:
|
||||
configuration: List[Union[Dict[str, Any], CloudClusterPrintCoreConfiguration]],
|
||||
reserved_by: Optional[str] = None, maintenance_required: Optional[bool] = None,
|
||||
firmware_update_status: Optional[str] = None, latest_available_firmware: Optional[str] = None,
|
||||
build_plate: Optional[str] = None, **kwargs) -> None:
|
||||
|
||||
self.configuration = self.parseModels(CloudClusterPrinterConfiguration, configuration)
|
||||
self.configuration = self.parseModels(CloudClusterPrintCoreConfiguration, configuration)
|
||||
self.enabled = enabled
|
||||
self.firmware_version = firmware_version
|
||||
self.friendly_name = friendly_name
|
||||
|
@ -37,6 +45,10 @@ class CloudClusterPrinterStatus(BaseCloudModel):
|
|||
self.unique_name = unique_name
|
||||
self.uuid = uuid
|
||||
self.reserved_by = reserved_by
|
||||
self.maintenance_required = maintenance_required
|
||||
self.firmware_update_status = firmware_update_status
|
||||
self.latest_available_firmware = latest_available_firmware
|
||||
self.build_plate = self.parseModel(CloudClusterBuildPlate, build_plate)
|
||||
super().__init__(**kwargs)
|
||||
|
||||
## Creates a new output model.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue