Skip to content

Commit

Permalink
triple quote docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh committed Nov 30, 2023
1 parent c445ecf commit e340fd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/aleph/vm/controllers/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@

class AlephVmControllerInterface(ABC):
vm_id: int
"id in the VMPool, attributed at execution"
"""id in the VMPool, attributed at execution"""
vm_hash: ItemHash
"identifier for the VM definition, linked to an Aleph Message"
"""identifier for the VM definition, linked to an Aleph Message"""
resources: Any
"local resource for the machine"
"""local resource for the machine"""
enable_console: bool
enable_networking: bool
"enable networking for this VM"
"""enable networking for this VM"""
hardware_resources: MachineResources
support_snapshot: bool
"Does this controller support snapshotting"
"""Does this controller support snapshotting"""
guest_api_process: Optional[Process] = None
tap_interface: Optional[TapInterface] = None
"Network interface used for this VM"
"""Network interface used for this VM"""

def get_ip(self) -> Optional[str]:
if self.tap_interface:
Expand Down Expand Up @@ -81,7 +81,7 @@ async def teardown(self) -> Coroutine:
raise NotImplementedError()

async def create_snapshot(self) -> CompressedDiskVolumeSnapshot:
"Must be implement if self.support_snapshot is True"
"""Must be implement if self.support_snapshot is True"""
raise NotImplementedError()

async def get_log_queue(self) -> asyncio.Queue:
Expand Down
4 changes: 2 additions & 2 deletions src/aleph/vm/controllers/qemu/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def download_all(self):
return

async def make_writable_volume(self, parent_image_path, volume: PersistentVolume | RootfsVolume):
"Create a new qcow2 image file based on the passed one, that we give to the VM to write onto"
"""Create a new qcow2 image file based on the passed one, that we give to the VM to write onto"""
qemu_img_path = shutil.which("qemu-img")
volume_name = volume.name if isinstance(volume, PersistentVolume) else "rootfs"

Expand Down Expand Up @@ -261,7 +261,7 @@ async def wait_for_init(self) -> None:
raise

async def configure(self):
"Nothing to configure, we do the configuration via cloud init"
"""Nothing to configure, we do the configuration via cloud init"""
pass

async def start_guest_api(self):
Expand Down

0 comments on commit e340fd1

Please sign in to comment.