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

NBI component - IETF L3VPN:

- Added missing data files
- Updated test files
- Corrected config rules to store address of neighbor devices
parent b2bc478e
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!199Resolve "(CTTC) Implement Service Handler for L3 services using ACTN SBI driver"
...@@ -55,7 +55,7 @@ def process_vpn_service( ...@@ -55,7 +55,7 @@ def process_vpn_service(
def update_service_endpoint( def update_service_endpoint(
service_uuid : str, site_id : str, device_uuid : str, endpoint_uuid : str, service_uuid : str, site_id : str, device_uuid : str, endpoint_uuid : str,
vlan_tag : int, ipv4_address : str, ipv4_prefix_length : int, vlan_tag : int, ipv4_address : str, neighbor_ipv4_address : str, ipv4_prefix_length : int,
capacity_gbps : Optional[float] = None, e2e_latency_ms : Optional[float] = None, capacity_gbps : Optional[float] = None, e2e_latency_ms : Optional[float] = None,
availability : Optional[float] = None, mtu : Optional[int] = None, availability : Optional[float] = None, mtu : Optional[int] = None,
static_routing : Optional[Dict[Tuple[str, str], str]] = None, static_routing : Optional[Dict[Tuple[str, str], str]] = None,
...@@ -94,9 +94,10 @@ def update_service_endpoint( ...@@ -94,9 +94,10 @@ def update_service_endpoint(
ENDPOINT_SETTINGS_KEY = '/device[{:s}]/endpoint[{:s}]/vlan[{:d}]/settings' ENDPOINT_SETTINGS_KEY = '/device[{:s}]/endpoint[{:s}]/vlan[{:d}]/settings'
endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device_uuid, endpoint_uuid, vlan_tag) endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device_uuid, endpoint_uuid, vlan_tag)
field_updates = {} field_updates = {}
if vlan_tag is not None: field_updates['vlan_tag' ] = (vlan_tag, True) if vlan_tag is not None: field_updates['vlan_tag' ] = (vlan_tag, True)
if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True) if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True)
if ipv4_prefix_length is not None: field_updates['prefix_length'] = (ipv4_prefix_length, True) if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True)
if ipv4_prefix_length is not None: field_updates['prefix_length' ] = (ipv4_prefix_length, True)
update_config_rule_custom(config_rules, endpoint_settings_key, field_updates) update_config_rule_custom(config_rules, endpoint_settings_key, field_updates)
try: try:
...@@ -131,7 +132,7 @@ def process_site_network_access( ...@@ -131,7 +132,7 @@ def process_site_network_access(
raise NotImplementedError(MSG.format(str(ipv4_allocation['address-allocation-type']))) raise NotImplementedError(MSG.format(str(ipv4_allocation['address-allocation-type'])))
ipv4_allocation_addresses = ipv4_allocation['addresses'] ipv4_allocation_addresses = ipv4_allocation['addresses']
ipv4_provider_address = ipv4_allocation_addresses['provider-address'] ipv4_provider_address = ipv4_allocation_addresses['provider-address']
#ipv4_customer_address = ipv4_allocation_addresses['customer-address'] ipv4_customer_address = ipv4_allocation_addresses['customer-address']
ipv4_prefix_length = ipv4_allocation_addresses['prefix-length' ] ipv4_prefix_length = ipv4_allocation_addresses['prefix-length' ]
vlan_tag = None vlan_tag = None
...@@ -176,7 +177,8 @@ def process_site_network_access( ...@@ -176,7 +177,8 @@ def process_site_network_access(
availability = qos_profile_class['bandwidth']['guaranteed-bw-percent'] availability = qos_profile_class['bandwidth']['guaranteed-bw-percent']
exc = update_service_endpoint( exc = update_service_endpoint(
service_uuid, site_id, device_uuid, endpoint_uuid, vlan_tag, ipv4_provider_address, ipv4_prefix_length, service_uuid, site_id, device_uuid, endpoint_uuid,
vlan_tag, ipv4_customer_address, ipv4_provider_address, ipv4_prefix_length,
capacity_gbps=service_bandwidth_gbps, e2e_latency_ms=max_e2e_latency_ms, availability=availability, capacity_gbps=service_bandwidth_gbps, e2e_latency_ms=max_e2e_latency_ms, availability=availability,
mtu=service_mtu, static_routing=site_static_routing mtu=service_mtu, static_routing=site_static_routing
) )
......
This diff is collapsed.
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
{ {
"lan": "128.32.10.1/24", "lan": "128.32.10.1/24",
"lan-tag": "vlan21", "lan-tag": "vlan21",
"next-hop": "128.32.33.5" "next-hop": "128.32.33.2"
}, },
{ {
"lan": "128.32.20.1/24", "lan": "128.32.20.1/24",
"lan-tag": "vlan21", "lan-tag": "vlan21",
"next-hop": "128.32.33.5" "next-hop": "128.32.33.2"
} }
] ]
} }
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
{ {
"lan": "172.1.101.1/24", "lan": "172.1.101.1/24",
"lan-tag": "vlan21", "lan-tag": "vlan21",
"next-hop": "10.0.10.1" "next-hop": "128.32.33.254"
} }
] ]
} }
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
{ {
"lan": "172.1.101.1/24", "lan": "172.1.101.1/24",
"lan-tag": "vlan101", "lan-tag": "vlan101",
"next-hop": "172.10.33.5" "next-hop": "172.10.33.2"
} }
] ]
} }
...@@ -185,12 +185,12 @@ ...@@ -185,12 +185,12 @@
{ {
"lan": "128.32.10.1/24", "lan": "128.32.10.1/24",
"lan-tag": "vlan101", "lan-tag": "vlan101",
"next-hop": "10.0.30.1" "next-hop": "172.10.33.254"
}, },
{ {
"lan": "128.32.20.1/24", "lan": "128.32.20.1/24",
"lan-tag": "vlan101", "lan-tag": "vlan101",
"next-hop": "10.0.30.1" "next-hop": "172.10.33.254"
} }
] ]
} }
......
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
{ {
"lan": "128.32.10.1/24", "lan": "128.32.10.1/24",
"lan-tag": "vlan31", "lan-tag": "vlan31",
"next-hop": "128.32.33.5" "next-hop": "128.32.33.2"
}, },
{ {
"lan": "128.32.20.1/24", "lan": "128.32.20.1/24",
"lan-tag": "vlan31", "lan-tag": "vlan31",
"next-hop": "128.32.33.5" "next-hop": "128.32.33.2"
} }
] ]
} }
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
{ {
"lan": "172.1.101.1/24", "lan": "172.1.101.1/24",
"lan-tag": "vlan31", "lan-tag": "vlan31",
"next-hop": "10.0.10.1" "next-hop": "128.32.33.254"
} }
] ]
} }
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
{ {
"lan": "172.1.101.1/24", "lan": "172.1.101.1/24",
"lan-tag": "vlan201", "lan-tag": "vlan201",
"next-hop": "172.10.33.1" "next-hop": "172.10.33.2"
} }
] ]
} }
...@@ -185,12 +185,12 @@ ...@@ -185,12 +185,12 @@
{ {
"lan": "128.32.10.1/24", "lan": "128.32.10.1/24",
"lan-tag": "vlan201", "lan-tag": "vlan201",
"next-hop": "10.0.30.1" "next-hop": "172.10.33.254"
}, },
{ {
"lan": "128.32.20.1/24", "lan": "128.32.20.1/24",
"lan-tag": "vlan201", "lan-tag": "vlan201",
"next-hop": "10.0.30.1" "next-hop": "172.10.33.254"
} }
] ]
} }
......
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