1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-23 17:34:17 +03:00

Merge remote-tracking branch 'origin/v3.5' into v3.6

This commit is contained in:
Adolfo Gómez García 2023-01-17 12:54:04 +01:00
commit 56cf0049db
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -329,13 +329,17 @@ class XenServer: # pylint: disable=too-many-public-methods
try:
vms = self.VM.get_all()
for vm in vms:
# if self.VM.get_is_a_template(vm): # Sample set_tags, easy..
# self.VM.set_tags(vm, ['template'])
# continue
if self.VM.get_is_control_domain(vm) or self.VM.get_is_a_template(vm):
continue
try:
# if self.VM.get_is_a_template(vm): # Sample set_tags, easy..
# self.VM.set_tags(vm, ['template'])
# continue
if self.VM.get_is_control_domain(vm) or self.VM.get_is_a_template(vm):
continue
yield {'id': vm, 'name': self.VM.get_name_label(vm)}
yield {'id': vm, 'name': self.VM.get_name_label(vm)}
except Exception as e:
logger.warning('VM %s returned error %s', vm, str(e))
continue
except XenAPI.Failure as e:
raise XenFailure(e.details)
except Exception as e: