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

Load Generator component:

- Code cleanup
parent 8140e08a
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!101Improved Service Handler selection and PathComp Sub-Service inference
......@@ -39,14 +39,6 @@ ROUTER_ID = {
'R149': '5.5.5.5',
'R155': '5.5.5.1',
'R199': '5.5.5.6',
}
VIRTUAL_CIRCUIT = {
'R149': '5.5.5.5',
'R155': '5.5.5.1',
'R199': '5.5.5.6',
}
class RequestGenerator:
......@@ -269,8 +261,8 @@ class RequestGenerator:
src_device_name = self._device_data[src_device_uuid]['name']
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(re.findall(r'^\D*(\d+)', src_device_name)[0])
src_router_id = ROUTER_ID.get(src_device_name)
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']
......@@ -322,8 +314,8 @@ class RequestGenerator:
src_device_name = self._device_data[src_device_uuid]['name']
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(re.findall(r'^\D*(\d+)', src_device_name)[0])
src_router_id = ROUTER_ID.get(src_device_name)
if src_router_id is None: src_router_id = '10.0.0.{:d}'.format(src_router_num)
src_address_ip = '10.{:d}.{:d}.{:d}'.format(x, y, src_router_num)
......
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