Do not pass filters to os_group get_group call (#22321)

As default is set to None, the get_group call doesn't find groups
on domain 'None'.
Only pass filters in case we pass domain_id value.
This commit is contained in:
Ricardo Carrillo Cruz 2017-03-06 19:15:00 +01:00 committed by GitHub
parent 433829769e
commit 43aef4e868

View file

@ -146,7 +146,10 @@ def main():
try:
cloud = shade.operator_cloud(**module.params)
group = cloud.get_group(name, filters={'domain_id': domain_id})
if domain_id:
group = cloud.get_group(name, filters={'domain_id': domain_id})
else:
group = cloud.get_group(name)
if module.check_mode:
module.exit_json(changed=_system_state_change(state, description, group))