def _get_config_drive_from_partition(self): for disk_path in self._osutils.get_physical_disks(): physical_drive = disk.Disk(disk_path) with physical_drive: partitions = physical_drive.partitions() extracted = self._extract_iso_from_devices(partitions) if extracted: return True return False
def _set_unique_disk_id(phys_disk_path): # A unique disk ID is needed to avoid disk signature collisions # https://blogs.technet.microsoft.com/markrussinovich/2011/11/06/fixing-disk-signature-collisions/ LOG.info("Setting unique id on disk: %s", phys_disk_path) with disk.Disk(phys_disk_path, allow_write=True) as d: d.set_unique_id()