ovirt_network: Fix update_check for cluster network role (#53318)
Currently if we didn't specify the "role" in the task which is already available for the network, the update_check will return FALSE. The patch fixes the same and update_check will only return FALSE if there is any additonal role specified for the network that are not currently available for the network.
This commit is contained in:
parent
a7eae0ae94
commit
ff0285c6c4
1 changed files with 8 additions and 8 deletions
|
@ -241,18 +241,18 @@ class ClusterNetworksModule(BaseModule):
|
||||||
return (
|
return (
|
||||||
equal(self._cluster_network.get('required'), entity.required) and
|
equal(self._cluster_network.get('required'), entity.required) and
|
||||||
equal(self._cluster_network.get('display'), entity.display) and
|
equal(self._cluster_network.get('display'), entity.display) and
|
||||||
equal(
|
all(
|
||||||
sorted([
|
x in [
|
||||||
usage
|
|
||||||
for usage in ['display', 'gluster', 'migration']
|
|
||||||
if self._cluster_network.get(usage, False)
|
|
||||||
]),
|
|
||||||
sorted([
|
|
||||||
str(usage)
|
str(usage)
|
||||||
for usage in getattr(entity, 'usages', [])
|
for usage in getattr(entity, 'usages', [])
|
||||||
# VM + MANAGEMENT is part of root network
|
# VM + MANAGEMENT is part of root network
|
||||||
if usage != otypes.NetworkUsage.VM and usage != otypes.NetworkUsage.MANAGEMENT
|
if usage != otypes.NetworkUsage.VM and usage != otypes.NetworkUsage.MANAGEMENT
|
||||||
]),
|
]
|
||||||
|
for x in [
|
||||||
|
usage
|
||||||
|
for usage in ['display', 'gluster', 'migration']
|
||||||
|
if self._cluster_network.get(usage, False)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue