Commit 2fe140ef authored by Pablo Armingol's avatar Pablo Armingol
Browse files

Creation of BGP-LS speaker module and webUI interface to manage BGP-LS peers....

Creation of BGP-LS speaker module and webUI interface to manage BGP-LS peers. Also, possibility to add discovered nodes and automatic link management. Creation of a folder in compute to support BGP-LS in NBI.

1) New features in BGP module.
2) Removal of old files.
3) Webui support for new functionalities.
4) Compute modification for NBI support (in progress).
parent dc4cb5df
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ cython_debug/

# Other
/tmp
/netphony-network-protocols

# Sqlite
*.db
+72 −0
Original line number Diff line number Diff line
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: bgpls-speakerservice
spec:
  selector:
    matchLabels:
      app: bgpls-speakerservice
  replicas: 1
  template:
    metadata:
      labels:
        app: bgpls-speakerservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: localhost:32000/tfs/bgpls_speaker:dev
        imagePullPolicy: Always
        ports:
        - containerPort: 10030
        - containerPort: 9192
        env:
        - name: LOG_LEVEL
          value: "DEBUG"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10030"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10030"]
        resources:
          requests:
            cpu: 50m
            memory: 64Mi
          limits:
            cpu: 500m
            memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
  name: bgpls-speakerservice
  labels:
    app: bgpls-speakerservice
spec:
  type: ClusterIP
  selector:
    app: bgpls-speakerservice
  ports:
  - name: grpc
    protocol: TCP
    port: 10030
    targetPort: 10030
  - name: metrics
    protocol: TCP
    port: 9192
    targetPort: 9192
+3 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ import logging
from enum import Enum

# Default logging level
DEFAULT_LOG_LEVEL = logging.WARNING
DEFAULT_LOG_LEVEL = logging.DEBUG

# Default gRPC server settings
DEFAULT_GRPC_BIND_ADDRESS = '0.0.0.0'
@@ -49,6 +49,7 @@ class ServiceNameEnum(Enum):
    INTERDOMAIN   = 'interdomain'
    PATHCOMP      = 'pathcomp'
    WEBUI         = 'webui'
    BGPLS         = 'bgpls-speaker'

    # Used for test and debugging only
    DLT_GATEWAY    = 'dltgateway'
@@ -68,6 +69,7 @@ DEFAULT_SERVICE_GRPC_PORTS = {
    ServiceNameEnum.CYBERSECURITY.value : 10000,
    ServiceNameEnum.INTERDOMAIN  .value : 10010,
    ServiceNameEnum.PATHCOMP     .value : 10020,
    ServiceNameEnum.BGPLS        .value : 10030,

    # Used for test and debugging only
    ServiceNameEnum.DLT_GATEWAY   .value : 50051,
+1 −3
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ class DeviceTypeEnum(Enum):
    EMULATED_P4_SWITCH              = 'emu-p4-switch'
    EMULATED_PACKET_ROUTER          = 'emu-packet-router'
    EMULATED_PACKET_SWITCH          = 'emu-packet-switch'
    EMULATED_BGPLS_ASNUMBER         = 'emu-bgpls-asnumber'

    # Real device types
    DATACENTER                      = 'datacenter'
@@ -40,4 +39,3 @@ class DeviceTypeEnum(Enum):
    PACKET_ROUTER                   = 'packet-router'
    PACKET_SWITCH                   = 'packet-switch'
    XR_CONSTELLATION                = 'xr-constellation'
 No newline at end of file
    BGPLS_ASNUMBER                  = 'bgpls-asnumber'
 No newline at end of file
+0 −3
Original line number Diff line number Diff line
@@ -43,9 +43,6 @@ DEVICE_MICROWAVE_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY]
DEVICE_P4_TYPE      = DeviceTypeEnum.P4_SWITCH.value
DEVICE_P4_DRIVERS   = [DeviceDriverEnum.DEVICEDRIVER_P4]

DEVICE_BGPLS_TYPE      = DeviceTypeEnum.BGPLS_ASNUMBER.value
DEVICE_BGPLS_DRIVERS   = [DeviceDriverEnum.DEVICEDRIVER_BGPLS]

def json_device_id(device_uuid : str):
    return {'device_uuid': {'uuid': device_uuid}}

Loading