Fix OpenStack keystone domain idempotency (#20637)

Without this patch, the os_keystone_domain module is not idempotent if
the description is empty because the description parameter is None in
ansible, but the keystone client returns an empty unicode string.
Following the example of other OpenStack modules, this patch fixes the
issue by checking whether the module parameter is None before going on
to check its value.
pull/20657/head
Colleen Murphy 8 years ago committed by John R Barker
parent af59781b56
commit 0890559ab5

@ -106,7 +106,8 @@ id:
'''
def _needs_update(module, domain):
if domain.description != module.params['description']:
if module.params['description'] is not None and \
domain.description != module.params['description']:
return True
if domain.enabled != module.params['enabled']:
return True

Loading…
Cancel
Save