- data = papi_resp.reply[0]['api_reply']
-
- bd_data = list() if bd_id == Constants.BITWISE_NON_ZERO else dict()
- for bridge_domain in data:
- if bd_id == Constants.BITWISE_NON_ZERO:
- bd_data.append(bridge_domain[cmd_reply])
- else:
- if bridge_domain[cmd_reply]['bd_id'] == bd_id:
- return bridge_domain[cmd_reply]
-
- return bd_data
+ if bd_id == Constants.BITWISE_NON_ZERO:
+ return details
+ for bridge_domain in details:
+ if bridge_domain['bd_id'] == bd_id:
+ return bridge_domain