forked from p15670423/monkey
Island: Rename `id_` parameter to `machine_id` in IMachineRepository
This commit is contained in:
parent
0adf9d8467
commit
383cfdfefe
|
@ -29,11 +29,11 @@ class IMachineRepository(ABC):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_machine_by_id(self, id_: MachineID) -> Machine:
|
def get_machine_by_id(self, machine_id: MachineID) -> Machine:
|
||||||
"""
|
"""
|
||||||
Get a `Machine` by ID
|
Get a `Machine` by ID
|
||||||
|
|
||||||
:param id: The ID of the `Machine` to be retrieved
|
:param machine_id: The ID of the `Machine` to be retrieved
|
||||||
:return: A `Machine` with a matching `id`
|
:return: A `Machine` with a matching `id`
|
||||||
:raises UnknownRecordError: If a `Machine` with the specified `id` does not exist in the
|
:raises UnknownRecordError: If a `Machine` with the specified `id` does not exist in the
|
||||||
repository
|
repository
|
||||||
|
|
|
@ -57,8 +57,8 @@ class MongoMachineRepository(IMachineRepository):
|
||||||
f"but updated {result.modified_count}"
|
f"but updated {result.modified_count}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_machine_by_id(self, id_: MachineID) -> Machine:
|
def get_machine_by_id(self, machine_id: MachineID) -> Machine:
|
||||||
return self._find_one("id", "machine ID", id_)
|
return self._find_one("id", "machine ID", machine_id)
|
||||||
|
|
||||||
def get_machine_by_hardware_id(self, hardware_id: HardwareID) -> Machine:
|
def get_machine_by_hardware_id(self, hardware_id: HardwareID) -> Machine:
|
||||||
return self._find_one("hardware_id", "hardware ID", hardware_id)
|
return self._find_one("hardware_id", "hardware ID", hardware_id)
|
||||||
|
|
Loading…
Reference in New Issue