Use params_dict for nested type member.
For e.g. in class IdPermsType:__init__
instead of
if isinstance(_permissions, dict):
obj = PermType(**_permissions)
self.permissions = obj
use
if isinstance(_permissions, dict):
obj = PermType(params_dict=_permissions)
self.permissions = obj
this saves on unicode to string conversion.
Change-Id: I52d644115d757fd9b59a472e2967baf959976d8f
Partial-Bug: 1589014
(cherry picked from commit 4a09a88c162467ee4f53c88ee01b9e5cf0f41b8b)
Reviewed: https:/ /review. opencontrail. org/22905 github. org/Juniper/ contrail- generateDS/ commit/ b47a1ef8312d926 6382c5043d19522 46b6c1419a
Committed: http://
Submitter: Zuul
Branch: R3.1
commit b47a1ef8312d926 6382c5043d19522 46b6c1419a
Author: Hampapur Ajay <email address hidden>
Date: Tue Aug 2 12:13:07 2016 -0700
Use params_dict for nested type member. __init_ _ _permissions, dict): **_permissions) _permissions, dict): params_ dict=_permissio ns)
For e.g. in class IdPermsType:
instead of
if isinstance(
obj = PermType(
self.permissions = obj
use
if isinstance(
obj = PermType(
self.permissions = obj
this saves on unicode to string conversion.
Change-Id: I52d644115d757f d9b59a472e2967b af959976d8f e4f53c88ee01b9e 5cf0f41b8b)
Partial-Bug: 1589014
(cherry picked from commit 4a09a88c162467e