Use default value for printer type, allow printer_type field from cloud

This commit is contained in:
ChrisTerBeke 2019-05-14 20:56:28 +02:00
parent ef707e4bad
commit 70c679859a
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263
3 changed files with 10 additions and 5 deletions

View file

@ -15,9 +15,12 @@ class CloudClusterResponse(BaseCloudModel):
# \param is_online: Whether this cluster is currently connected to the cloud.
# \param status: The status of the cluster authentication (active or inactive).
# \param host_version: The firmware version of the cluster host. This is where the Stardust client is running on.
# \param host_internal_ip: The internal IP address of the host printer.
# \param friendly_name: The human readable name of the host printer.
# \param printer_type: The machine type of the host printer.
def __init__(self, cluster_id: str, host_guid: str, host_name: str, is_online: bool, status: str,
host_internal_ip: Optional[str] = None, host_version: Optional[str] = None,
friendly_name: Optional[str] = None, **kwargs) -> None:
friendly_name: Optional[str] = None, printer_type: Optional[str] = "Ultimaker 3", **kwargs) -> None:
self.cluster_id = cluster_id
self.host_guid = host_guid
self.host_name = host_name
@ -26,6 +29,7 @@ class CloudClusterResponse(BaseCloudModel):
self.host_version = host_version
self.host_internal_ip = host_internal_ip
self.friendly_name = friendly_name
self.printer_type = printer_type
super().__init__(**kwargs)
# Validates the model, raising an exception if the model is invalid.