Commit 05a481c6 authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

first p2mp push related to ECOC25 demo

parent 0ee4d415
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (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.
@@ -36,7 +36,7 @@ spec:
            - containerPort: 9192
          env:
            - name: LOG_LEVEL
              value: "INFO"
              value: "DEBUG"
          #readinessProbe:
          #  exec:
          #    command: ["/bin/grpc_health_probe", "-addr=:10060"]
@@ -70,3 +70,22 @@ spec:
      protocol: TCP
      port: 9192
      targetPort: 9192

---
# 2. New external service (for public access)
apiVersion: v1
kind: Service
metadata:
  name: opticalcontrollerservice-external  # Different name for external API access
  labels:
    app: opticalcontrollerservice
spec:
  type: NodePort  # Or LoadBalancer
  selector:
    app: opticalcontrollerservice
  ports:
    - name: grpc-external
      protocol: TCP
      port: 10060
      targetPort: 10060
      nodePort: 31060  # Only for NodePort
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"

# Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="context device pathcomp service nbi webui"
export TFS_COMPONENTS="context device pathcomp opticalcontroller service nbi webui"

# Uncomment to activate Monitoring (old)
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
@@ -140,7 +140,7 @@ export CRDB_PASSWORD="tfs123"
export CRDB_DEPLOY_MODE="single"

# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS=""
export CRDB_DROP_DATABASE_IF_EXISTS="YES"

# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
@@ -226,4 +226,4 @@ export GRAF_EXT_PORT_HTTP="3000"
# ----- Telemetry Config ------------------------------------------------------

# Define a Load Balancer IP for Telemetry Collector components
export LOAD_BALANCER_IP="192.168.5.250" # <-- Change this to match your network
export LOAD_BALANCER_IP="10.30.7.66" # <-- Change this to match your network
+2 −0
Original line number Diff line number Diff line
@@ -144,5 +144,7 @@ def OpticalServiceType(value):
        return 2
    elif value == "pmp":
        return 3
    elif value == "pmp_simple":
        return 4
    else:
        return 1
+4 −3
Original line number Diff line number Diff line
@@ -28,9 +28,10 @@ ENV PYTHONUNBUFFERED=0
#     chmod +x /bin/grpc_health_probe

# Get generic Python packages
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade setuptools wheel
RUN python3 -m pip install --upgrade pip-tools
# Get generic Python packages
RUN python3 -m pip install --upgrade 'pip==25.2'
RUN python3 -m pip install --upgrade 'setuptools==79.0.0' 'wheel==0.45.1'
RUN python3 -m pip install --upgrade 'pip-tools==7.3.0'

# Get common Python packages
# Note: this step enables sharing the previous Docker build steps among all the Python components
+12 −1
Original line number Diff line number Diff line
@@ -164,9 +164,20 @@ class DeviceServiceServicerImpl(DeviceServiceServicer):
                #    #endpoint.endpoint_id.device_id.CopyFrom(device.device_id)
                #    pass

                #if 'new_optical_config' in new_optical_configs and 'opticalconfig' in new_optical_configs["new_optical_config"]:
                #    LOGGER.info(f"set optical device config {new_optical_configs}")
                #    context_client.SetOpticalConfig(new_optical_configs["new_optical_config"]['opticalconfig'])
                if 'new_optical_config' in new_optical_configs and 'opticalconfig' in new_optical_configs["new_optical_config"]:
                    LOGGER.info(f"set optical device config {new_optical_configs}")
                    context_client.SetOpticalConfig(new_optical_configs["new_optical_config"]['opticalconfig'])
                    optical_config = new_optical_configs["new_optical_config"]['opticalconfig']
                    try:
                        if isinstance(optical_config, list) and len(optical_config) > 0:
                            context_client.SetOpticalConfig(optical_config[0])
                        else:
                            context_client.SetOpticalConfig(optical_config)
                    except Exception as e:
                        LOGGER.warning(f"Failed to set optical config: {e}")


            device_id = context_client.SetDevice(device)

Loading