Simplify method deserialize_list of network_client
Small cleanup of the deserialize_list method in the network_client
module to make it more readable and efficient.
Change-Id: Ibc13c4865b4e9f5d937f13690558f50498132dda
Co-Authored-By: Cyril Roelandt <cyril.roelandt@enovance.com>
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index 5106225..4c4887e 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -262,9 +262,8 @@
# expecting response in form
# {'resources': [ res1, res2] } => when pagination disabled
# {'resources': [..], 'resources_links': {}} => if pagination enabled
- pagination_suffix = "_links"
for k in res.keys():
- if k[-len(pagination_suffix):] == pagination_suffix:
+ if k.endswith("_links"):
continue
return res[k]