From 2376d02f3f86ac3ecc48d8c82521ee81f9b8a0a8 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Thu, 4 Jan 2018 13:01:58 +0100 Subject: [PATCH] ovirt_cluster: Fix cluster cpu arch comparision (#34446) --- lib/ansible/modules/cloud/ovirt/ovirt_cluster.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py b/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py index 8c89955c097..e282c0306aa 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_cluster.py @@ -529,12 +529,13 @@ class ClustersModule(BaseModule): def update_check(self, entity): sched_policy = self._get_sched_policy() migration_policy = getattr(entity.migration, 'policy', None) + cluster_cpu = getattr(entity, 'cpu', dict()) return ( equal(self.param('comment'), entity.comment) and equal(self.param('description'), entity.description) and equal(self.param('switch_type'), str(entity.switch_type)) and - equal(self.param('cpu_arch'), str(entity.cpu.architecture)) and - equal(self.param('cpu_type'), entity.cpu.type) and + equal(self.param('cpu_arch'), str(getattr(cluster_cpu, 'architecture', None))) and + equal(self.param('cpu_type'), getattr(cluster_cpu, 'type', None)) and equal(self.param('ballooning'), entity.ballooning_enabled) and equal(self.param('gluster'), entity.gluster_service) and equal(self.param('virt'), entity.virt_service) and