Loading manifests/opticalcontrollerservice.yaml +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. Loading Loading @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" value: "DEBUG" #readinessProbe: # exec: # command: ["/bin/grpc_health_probe", "-addr=:10060"] Loading Loading @@ -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 my_deploy.sh +3 −3 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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="" Loading Loading @@ -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 src/common/Constants.py +2 −0 Original line number Diff line number Diff line Loading @@ -144,5 +144,7 @@ def OpticalServiceType(value): return 2 elif value == "pmp": return 3 elif value == "pmp_simple": return 4 else: return 1 src/context/Dockerfile +4 −3 Original line number Diff line number Diff line Loading @@ -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 Loading src/device/service/DeviceServiceServicerImpl.py +12 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
manifests/opticalcontrollerservice.yaml +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. Loading Loading @@ -36,7 +36,7 @@ spec: - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" value: "DEBUG" #readinessProbe: # exec: # command: ["/bin/grpc_health_probe", "-addr=:10060"] Loading Loading @@ -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
my_deploy.sh +3 −3 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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="" Loading Loading @@ -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
src/common/Constants.py +2 −0 Original line number Diff line number Diff line Loading @@ -144,5 +144,7 @@ def OpticalServiceType(value): return 2 elif value == "pmp": return 3 elif value == "pmp_simple": return 4 else: return 1
src/context/Dockerfile +4 −3 Original line number Diff line number Diff line Loading @@ -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 Loading
src/device/service/DeviceServiceServicerImpl.py +12 −1 Original line number Diff line number Diff line Loading @@ -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