Skip to content
Snippets Groups Projects
Commit dda9a413 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Load Generator:

- Fixed L2NM service generation
parent bfb1bd27
No related branches found
No related tags found
1 merge request!142Release TeraFlowSDN 2.1
......@@ -255,10 +255,16 @@ class RequestGenerator:
circuit_id = '{:03d}'.format(vlan_id + 100)
src_device_name = self._device_data[src_device_uuid]['name']
src_router_id = ROUTER_ID.get(src_device_name, '10.0.0.{:d}'.format(int(src_device_name.replace('R', ''))))
src_endpoint_name = self._device_endpoint_data[src_device_uuid][src_endpoint_uuid]['name']
src_router_id = ROUTER_ID.get(src_device_name)
src_router_num = int(src_device_name.replace('R', ''))
if src_router_id is None: src_router_id = '10.0.0.{:d}'.format(src_router_num)
dst_device_name = self._device_data[dst_device_uuid]['name']
dst_router_id = ROUTER_ID.get(dst_device_name, '10.0.0.{:d}'.format(int(dst_device_name.replace('R', ''))))
dst_endpoint_name = self._device_endpoint_data[dst_device_uuid][dst_endpoint_uuid]['name']
dst_router_num = int(dst_device_name.replace('R', ''))
dst_router_id = ROUTER_ID.get(dst_device_name)
if dst_router_id is None: dst_router_id = '10.0.0.{:d}'.format(dst_router_num)
config_rules = [
json_config_rule_set('/settings', {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment