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

OFC'22 test:

- updated WIM service settings
parent 17129bae
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!27New Descriptor Loader Framework and OFC'22 code migrations
......@@ -12,18 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Dict, Optional
def compose_service_endpoint_id(endpoint_id):
device_uuid = endpoint_id['device_id']['device_uuid']['uuid']
endpoint_uuid = endpoint_id['endpoint_uuid']['uuid']
return ':'.join([device_uuid, endpoint_uuid])
def wim_mapping(site_id, ce_endpoint_id, pe_device_id, priority=None, redundant=[]):
def wim_mapping(site_id, ce_endpoint_id, pe_device_id : Optional[Dict] = None, priority=None, redundant=[]):
ce_endpoint_id = ce_endpoint_id['endpoint_id']
ce_device_uuid = ce_endpoint_id['device_id']['device_uuid']['uuid']
ce_endpoint_uuid = ce_endpoint_id['endpoint_uuid']['uuid']
pe_device_uuid = pe_device_id['device_uuid']['uuid']
service_endpoint_id = '{:s}:{:s}:{:s}'.format(site_id, ce_device_uuid, ce_endpoint_uuid)
bearer = '{:s}:{:s}'.format(ce_device_uuid, pe_device_uuid)
if pe_device_id is None:
bearer = '{:s}:{:s}'.format(ce_device_uuid, ce_endpoint_uuid)
else:
pe_device_uuid = pe_device_id['device_uuid']['uuid']
bearer = '{:s}:{:s}'.format(ce_device_uuid, pe_device_uuid)
_mapping = {
'service_endpoint_id': service_endpoint_id,
'datacenter_id': site_id, 'device_id': ce_device_uuid, 'device_interface_id': ce_endpoint_uuid,
......
......@@ -19,15 +19,17 @@ from compute.tests.mock_osm.Tools import compose_service_endpoint_id, connection
# ----- WIM Service Settings -------------------------------------------------------------------------------------------
DEV_R1_ID = json_device_id('R1-EMU')
DEV_R1_ENDPOINT_ID = compose_service_endpoint_id(json_endpoint_id(DEV_R1_ID, '13/1/2'))
DEV_R1_ENDPOINT_ID = json_endpoint_id(DEV_R1_ID, '13/1/2')
WIM_SEP_R1_ID = compose_service_endpoint_id(DEV_R1_ENDPOINT_ID)
WIM_SEP_R1_SITE_ID = '1'
DEV_R3_ID = json_device_id('R3-EMU')
DEV_R3_ENDPOINT_ID = compose_service_endpoint_id(json_endpoint_id(DEV_R3_ID, '13/1/2'))
DEV_R3_ENDPOINT_ID = json_endpoint_id(DEV_R3_ID, '13/1/2')
WIM_SEP_R3_ID = compose_service_endpoint_id(DEV_R3_ENDPOINT_ID)
WIM_SEP_R3_SITE_ID = '2'
WIM_SEP_DC1, WIM_MAP_DC1 = wim_mapping(WIM_SEP_R1_SITE_ID, DEV_DC1GW_EPS[0], DEV_CS1GW1_ID)
WIM_SEP_DC2, WIM_MAP_DC2 = wim_mapping(WIM_SEP_R3_SITE_ID, DEV_DC2GW_EPS[0], DEV_CS2GW1_ID)
WIM_SEP_DC1, WIM_MAP_DC1 = wim_mapping(WIM_SEP_R1_SITE_ID, DEV_R1_ENDPOINT_ID)
WIM_SEP_DC2, WIM_MAP_DC2 = wim_mapping(WIM_SEP_R3_SITE_ID, DEV_R3_ENDPOINT_ID)
WIM_MAPPING = [WIM_MAP_DC1, WIM_MAP_DC2]
WIM_SRV_VLAN_ID = 300
......
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