Filter out the path variable of field
One RSD resource may contains several fields that also have _path variable. That is useless info to user. So filter them out. Change-Id: Idf453f452603713c8efd64336eee791c656a1d86
This commit is contained in:
parent
52440b40bc
commit
887269f6c8
@ -6,3 +6,4 @@ pbr>=2.0 # Apache-2.0
|
||||
cliff>=2.8.0 # Apache-2.0
|
||||
osc-lib>=1.7.0 # Apache-2.0
|
||||
rsd-lib>=0.0.1 # Apache-2.0
|
||||
six>=1.10.0 # MIT
|
||||
|
@ -36,7 +36,7 @@ def extract_attr(redfish_obj):
|
||||
result = {}
|
||||
try:
|
||||
for key, value in vars(redfish_obj).items():
|
||||
if key == '_path':
|
||||
if key == '_path' and isinstance(value, six.string_types):
|
||||
result['path'] = extract_attr(value)
|
||||
continue
|
||||
# Skip all private attributes
|
||||
|
Loading…
x
Reference in New Issue
Block a user