SpawnSuccessEvent¶
- pydantic model controller.events.SpawnSuccessEvent¶
A lab spawn succeeded.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "SpawnSuccessEvent", "description": "A lab spawn succeeded.", "type": "object", "properties": { "image": { "description": "Docker reference for the lab image", "title": "Lab image", "type": "string" }, "cpu_limit": { "description": "Kubernetes pod limit of CPU equivalents", "title": "Lab CPU limit", "type": "number" }, "memory_limit": { "description": "Kubernetes pod limit of memory in bytes", "title": "Lab memory limit", "type": "integer" }, "username": { "description": "User who spawned a lab", "title": "Username", "type": "string" }, "elapsed": { "description": "How long the spawn took before Kubernetes resources were ready. This does not include the startup time of the lab itself.", "format": "duration", "title": "Duration of spawn", "type": "string" } }, "required": [ "image", "cpu_limit", "memory_limit", "username", "elapsed" ] }
- field cpu_limit: float [Required]¶
Kubernetes pod limit of CPU equivalents
- field elapsed: timedelta [Required]¶
How long the spawn took before Kubernetes resources were ready. This does not include the startup time of the lab itself.
- field image: str [Required]¶
Docker reference for the lab image
- field memory_limit: int [Required]¶
Kubernetes pod limit of memory in bytes
- field username: str [Required]¶
User who spawned a lab
- asdict()¶
Returns this model in dictionary form. This method differs from pydantic’s dict by converting all values to their Avro representation. It also doesn’t provide the exclude, include, by_alias, etc. parameters that dict provides.
- classmethod fake(**data)¶
Creates a fake instance of the model.
- Attributes:
data: Dict[str, Any] represent the user values to use in the instance
- Parameters:
data (
Any
)- Return type:
AvroBaseModel
- serialize(serialization_type='avro')¶
Overrides the base AvroModel’s serialize method to inject this class’s standardization factory method