Skip to content

Commit

Permalink
Merge pull request #276 from fabric-testbed/fp-ns-type
Browse files Browse the repository at this point in the history
Fp ns type
  • Loading branch information
kthare10 authored Jan 23, 2024
2 parents 2a7d36a + 5638d1a commit 4c2ef71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed

- Use L2STS when connecting two facility ports via L2 (Issue [#275](https://github.com/fabric-testbed/fabrictestbed-extensions/issues/275))

## [1.6.2] - 2024-01-23

Expand Down
8 changes: 7 additions & 1 deletion fabrictestbed_extensions/fablib/network_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ def calculate_l2_nstype(interfaces: List[Interface] = None) -> ServiceType:

sites = set([])
includes_facility_port = False
facility_port_interfaces = 0
for interface in interfaces:
sites.add(interface.get_site())
if isinstance(interface.get_component(), FacilityPort):
includes_facility_port = True
facility_port_interfaces += 1
if interface.get_model() == "NIC_Basic":
basic_nic_count += 1

Expand All @@ -146,7 +148,11 @@ def calculate_l2_nstype(interfaces: List[Interface] = None) -> ServiceType:
# #TODO: remove this when STS works on all links.
# rtn_nstype = NetworkService.network_service_map['L2PTP']
elif len(sites) == 2:
if includes_facility_port:
# Use L2STS when connecting two facility ports instead of L2PTP
# L2PTP limitation for Facility Ports:
# basically the layer-2 point-to-point server template applied is not popping
# vlan tags over the MPLS tunnel between two facility ports.
if includes_facility_port and facility_port_interfaces < 2:
# For now WAN FacilityPorts require L2PTP
rtn_nstype = NetworkService.network_service_map["L2PTP"]
elif len(interfaces) >= 2:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "fabrictestbed-extensions"
version = "1.6.2"
version = "1.6.3"
description = "FABRIC Python Client Library and CLI Extensions"
authors = [
{ name = "Paul Ruth", email = "pruth@renci.org" },
Expand Down

0 comments on commit 4c2ef71

Please sign in to comment.