Include domain id in name stem
This commit is contained in:
parent
9a5b6a996d
commit
bdfe0e1878
1 changed files with 14 additions and 13 deletions
|
@ -38,7 +38,8 @@ class OverlayDirectory:
|
|||
root_temp_dir.mkdir()
|
||||
|
||||
self.overlay_temp_dir = tempfile.TemporaryDirectory(
|
||||
prefix=name + ("_" if name else ""), dir=root_temp_dir.resolve(),
|
||||
prefix=name + ("_" if name else ""),
|
||||
dir=root_temp_dir.resolve(),
|
||||
)
|
||||
self.temp_dir = Path(self.overlay_temp_dir.name)
|
||||
self.temp_dir_cleaner = None
|
||||
|
@ -142,9 +143,9 @@ class Container(util.LibvirtObject):
|
|||
|
||||
super().__init__(conn)
|
||||
|
||||
if not name:
|
||||
name = str(self.id)
|
||||
self.name = settings.PREFIX + "_dom_" + name
|
||||
self.name = f"{settings.PREFIX}_dom{self.id:02d}"
|
||||
if name:
|
||||
self.name += "_" + name
|
||||
|
||||
self.networks = networks
|
||||
self.mem = mem
|
||||
|
|
Loading…
Reference in a new issue