Fix normalize_role_assignments() return value

This function was returning plain dicts, not Munch objects, so
it was acting differently from all other normalization funtions.

Change-Id: Iaf9325d509f9c2c015f9c3fbd2d4ec6efa974429
This commit is contained in:
David Shrewsbury 2016-01-21 17:31:15 -05:00
parent e39ad09df4
commit d7ffabca74
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
fixes:
- Role assignments were being returned as plain dicts instead of Munch objects.
This has been corrected.

View File

@ -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']