Skip to content

Commit

Permalink
ovirt_cluster: Fix cluster cpu arch comparision
Browse files Browse the repository at this point in the history
  • Loading branch information
machacekondra committed Jan 4, 2018
1 parent dcc1355 commit 831a3a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ansible/modules/cloud/ovirt/ovirt_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,13 @@ def _update_check_external_network_providers(self, entity):
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
Expand Down

0 comments on commit 831a3a1

Please sign in to comment.