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.
pull/4420/head
Ricardo Carrillo Cruz 2017-03-06 19:15:00 +01:00 committed by GitHub
parent 433829769e
commit 43aef4e868
1 changed files with 4 additions and 1 deletions

View File

@ -146,7 +146,10 @@ def main():
try: try:
cloud = shade.operator_cloud(**module.params) 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: if module.check_mode:
module.exit_json(changed=_system_state_change(state, description, group)) module.exit_json(changed=_system_state_change(state, description, group))