Island: Use HardwareId in Machine model
This commit is contained in:
parent
f418571d93
commit
acc158db44
|
@ -4,6 +4,7 @@ from typing import Optional, Sequence
|
||||||
from pydantic import Field, PositiveInt, validator
|
from pydantic import Field, PositiveInt, validator
|
||||||
|
|
||||||
from common import OperatingSystem
|
from common import OperatingSystem
|
||||||
|
from common.types import HardwareID
|
||||||
|
|
||||||
from .base_models import MutableBaseModel
|
from .base_models import MutableBaseModel
|
||||||
from .transforms import make_immutable_sequence
|
from .transforms import make_immutable_sequence
|
||||||
|
@ -13,7 +14,7 @@ MachineID = PositiveInt
|
||||||
|
|
||||||
class Machine(MutableBaseModel):
|
class Machine(MutableBaseModel):
|
||||||
id: MachineID = Field(..., allow_mutation=False)
|
id: MachineID = Field(..., allow_mutation=False)
|
||||||
hardware_id: Optional[PositiveInt]
|
hardware_id: Optional[HardwareID]
|
||||||
network_interfaces: Sequence[IPv4Interface]
|
network_interfaces: Sequence[IPv4Interface]
|
||||||
operating_system: OperatingSystem
|
operating_system: OperatingSystem
|
||||||
operating_system_version: str
|
operating_system_version: str
|
||||||
|
|
Loading…
Reference in New Issue