diff --git a/releasenotes/notes/norm_role_assignments-a13f41768e62d40c.yaml b/releasenotes/notes/norm_role_assignments-a13f41768e62d40c.yaml new file mode 100644 index 000000000..39ee2765d --- /dev/null +++ b/releasenotes/notes/norm_role_assignments-a13f41768e62d40c.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Role assignments were being returned as plain dicts instead of Munch objects. + This has been corrected. diff --git a/shade/_utils.py b/shade/_utils.py index b5811d8fb..7424862e9 100644 --- a/shade/_utils.py +++ b/shade/_utils.py @@ -14,6 +14,7 @@ import contextlib import inspect +import munch import netifaces import re import six @@ -437,7 +438,7 @@ def normalize_role_assignments(assignments): """ new_assignments = [] for assignment in assignments: - new_val = {'id': assignment['role']['id']} + new_val = munch.Munch({'id': assignment['role']['id']}) for scope in ('project', 'domain'): if scope in assignment['scope']: new_val[scope] = assignment['scope'][scope]['id']