Skip to content

Commit 5fa6bda

Browse files
committed
vm.clone: avoid foo_clone_for_tests_clone_for_tests_clone_for_tests
Signed-off-by: Yann Dirson <[email protected]>
1 parent 0287280 commit 5fa6bda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/vm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,9 @@ def destroy_vtpm(self):
478478
return self.host.xe('vtpm-destroy', {'uuid': vtpm_uuid}, force=True)
479479

480480
def clone(self):
481-
name = self.name() + '_clone_for_tests'
481+
name = self.name()
482+
if not name.endswith('_clone_for_tests'):
483+
name += '_clone_for_tests'
482484
logging.info("Clone VM")
483485
uuid = self.host.xe('vm-clone', {'uuid': self.uuid, 'new-name-label': name})
484486
return VM(uuid, self.host)

0 commit comments

Comments
 (0)