  def GetBootDisk(self) -> 'GoogleComputeDisk':
    """Get the virtual machine boot disk.

    Returns:
      GoogleComputeDisk: Disk object.

    Raises:
      ResourceNotFoundError: If no boot disk could be found.
      InvalidNameError: If the boot disk Source could not be found.
    """

    for disk in self.GetValue('disks'):
      if disk['boot']:
        if 'source' not in disk:
          raise errors.InvalidNameError(
              'Boot disk has no source attribute: {0:s}'.format(
                  self.name),
              __name__)
        disk_name = disk['source'].split('/')[-1]
        return GoogleCloudCompute(self.project_id).GetDisk(disk_name=disk_name)
    raise errors.ResourceNotFoundError(
        'Boot disk not found for instance {0:s}'.format(self.name), __name__)
Get the virtual machine boot disk.

Returns:
GoogleComputeDisk: Disk object.

Raises:
ResourceNotFoundError: If no boot disk could be found.
InvalidNameError: If the boot disk Source could not be found.
libcloudforensics/providers/gcp/internal/compute.py