Loading src/device/service/drivers/ietf_actn/handlers/NetworkTopologyHandler.py +15 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging import logging, re from typing import Dict, List, Optional from common.Constants import DEFAULT_TOPOLOGY_NAME from common.DeviceTypes import DeviceTypeEnum Loading Loading @@ -145,6 +145,20 @@ class NetworkTopologyHandler: 'mtu' : '1500', 'site_location' : site_location, } outer_tag_vlan_range : Optional[str] = ( tp .get('ietf-eth-te-topology:eth-svc', dict()) .get('supported-classification', dict()) .get('vlan-classification', dict()) .get('outer-tag', dict()) .get('vlan-range') ) if outer_tag_vlan_range is not None: RE_NUMBER = re.compile(r'[0-9]+') if RE_NUMBER.match(outer_tag_vlan_range) is not None: endpoint_settings['vlan_tag'] = int(outer_tag_vlan_range) endpoint_data = { 'device_uuid': node_id, 'uuid': tp_id, Loading src/device/service/drivers/nce/handlers/NetworkTopologyHandler.py +15 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging import logging, re from typing import Dict, List, Optional from common.Constants import DEFAULT_TOPOLOGY_NAME from common.DeviceTypes import DeviceTypeEnum Loading Loading @@ -154,6 +154,20 @@ class NetworkTopologyHandler: 'mtu' : '1500', 'site_location' : site_location, } outer_tag_vlan_range : Optional[str] = ( tp .get('ietf-eth-te-topology:eth-svc', dict()) .get('supported-classification', dict()) .get('vlan-classification', dict()) .get('outer-tag', dict()) .get('vlan-range') ) if outer_tag_vlan_range is not None: RE_NUMBER = re.compile(r'[0-9]+') if RE_NUMBER.match(outer_tag_vlan_range) is not None: endpoint_settings['vlan_tag'] = int(outer_tag_vlan_range) endpoint_data = { 'device_uuid': node_id, 'uuid': tp_id, Loading Loading
src/device/service/drivers/ietf_actn/handlers/NetworkTopologyHandler.py +15 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging import logging, re from typing import Dict, List, Optional from common.Constants import DEFAULT_TOPOLOGY_NAME from common.DeviceTypes import DeviceTypeEnum Loading Loading @@ -145,6 +145,20 @@ class NetworkTopologyHandler: 'mtu' : '1500', 'site_location' : site_location, } outer_tag_vlan_range : Optional[str] = ( tp .get('ietf-eth-te-topology:eth-svc', dict()) .get('supported-classification', dict()) .get('vlan-classification', dict()) .get('outer-tag', dict()) .get('vlan-range') ) if outer_tag_vlan_range is not None: RE_NUMBER = re.compile(r'[0-9]+') if RE_NUMBER.match(outer_tag_vlan_range) is not None: endpoint_settings['vlan_tag'] = int(outer_tag_vlan_range) endpoint_data = { 'device_uuid': node_id, 'uuid': tp_id, Loading
src/device/service/drivers/nce/handlers/NetworkTopologyHandler.py +15 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging import logging, re from typing import Dict, List, Optional from common.Constants import DEFAULT_TOPOLOGY_NAME from common.DeviceTypes import DeviceTypeEnum Loading Loading @@ -154,6 +154,20 @@ class NetworkTopologyHandler: 'mtu' : '1500', 'site_location' : site_location, } outer_tag_vlan_range : Optional[str] = ( tp .get('ietf-eth-te-topology:eth-svc', dict()) .get('supported-classification', dict()) .get('vlan-classification', dict()) .get('outer-tag', dict()) .get('vlan-range') ) if outer_tag_vlan_range is not None: RE_NUMBER = re.compile(r'[0-9]+') if RE_NUMBER.match(outer_tag_vlan_range) is not None: endpoint_settings['vlan_tag'] = int(outer_tag_vlan_range) endpoint_data = { 'device_uuid': node_id, 'uuid': tp_id, Loading