Skip to content
Snippets Groups Projects
Commit ac5209e1 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into...

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into feat/89-cttc-extend-gnmi-openconfig-sbi-driver
parents 316a807f 88b4d7c7
Branches
Tags
2 merge requests!294Release TeraFlowSDN 4.0,!172Resolve "(CTTC) Extend gNMI-OpenConfig SBI driver"
Showing
with 203 additions and 38 deletions
...@@ -52,6 +52,8 @@ include: ...@@ -52,6 +52,8 @@ include:
#- local: '/src/telemetry/.gitlab-ci.yml' #- local: '/src/telemetry/.gitlab-ci.yml'
#- local: '/src/analytics/.gitlab-ci.yml' #- local: '/src/analytics/.gitlab-ci.yml'
#- local: '/src/qos_profile/.gitlab-ci.yml' #- local: '/src/qos_profile/.gitlab-ci.yml'
#- local: '/src/vnt_manager/.gitlab-ci.yml'
#- local: '/src/e2e_orchestrator/.gitlab-ci.yml'
# This should be last one: end-to-end integration tests # This should be last one: end-to-end integration tests
- local: '/src/tests/.gitlab-ci.yml' - local: '/src/tests/.gitlab-ci.yml'
...@@ -175,6 +175,7 @@ function crdb_drop_databases_single() { ...@@ -175,6 +175,7 @@ function crdb_drop_databases_single() {
--execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs"
) )
echo "Found TFS databases: ${DATABASES}" | tr '\n' ' ' echo "Found TFS databases: ${DATABASES}" | tr '\n' ' '
echo
for DB_NAME in $DATABASES; do for DB_NAME in $DATABASES; do
echo "Dropping TFS database: $DB_NAME" echo "Dropping TFS database: $DB_NAME"
...@@ -369,6 +370,7 @@ function crdb_drop_databases_cluster() { ...@@ -369,6 +370,7 @@ function crdb_drop_databases_cluster() {
--execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs"
) )
echo "Found TFS databases: ${DATABASES}" | tr '\n' ' ' echo "Found TFS databases: ${DATABASES}" | tr '\n' ' '
echo
for DB_NAME in $DATABASES; do for DB_NAME in $DATABASES; do
echo "Dropping TFS database: $DB_NAME" echo "Dropping TFS database: $DB_NAME"
......
...@@ -344,11 +344,10 @@ for COMPONENT in $TFS_COMPONENTS; do ...@@ -344,11 +344,10 @@ for COMPONENT in $TFS_COMPONENTS; do
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4) VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4)
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
else else
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
if [ "$TFS_SKIP_BUILD" != "YES" ]; then if [ "$TFS_SKIP_BUILD" != "YES" ]; then
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g') IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
else else
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$VERSION" | sed 's,//,/,g' | sed 's,http:/,,g') IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$VERSION" | sed 's,//,/,g' | sed 's,http:/,,g')
fi fi
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
......
ecoc24 0 → 120000
src/tests/ecoc24/
\ No newline at end of file
...@@ -98,11 +98,11 @@ spec: ...@@ -98,11 +98,11 @@ spec:
selector: selector:
app: analyticsservice app: analyticsservice
ports: ports:
- name: frontend-grpc - name: grpc
protocol: TCP protocol: TCP
port: 30080 port: 30080
targetPort: 30080 targetPort: 30080
- name: backend-grpc - name: grpc-backend
protocol: TCP protocol: TCP
port: 30090 port: 30090
targetPort: 30090 targetPort: 30090
......
...@@ -20,8 +20,12 @@ spec: ...@@ -20,8 +20,12 @@ spec:
selector: selector:
matchLabels: matchLabels:
app: e2e-orchestratorservice app: e2e-orchestratorservice
replicas: 1
template: template:
metadata: metadata:
annotations:
config.linkerd.io/skip-outbound-ports: "8761"
config.linkerd.io/skip-inbound-ports: "8761"
labels: labels:
app: e2e-orchestratorservice app: e2e-orchestratorservice
spec: spec:
...@@ -33,9 +37,18 @@ spec: ...@@ -33,9 +37,18 @@ spec:
ports: ports:
- containerPort: 10050 - containerPort: 10050
- containerPort: 9192 - containerPort: 9192
- containerPort: 8761
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: WS_IP_HOST
value: "nbiservice.tfs-ip.svc.cluster.local"
- name: WS_IP_PORT
value: 8761
- name: WS_E2E_HOST
value: "e2e-orchestratorservice.tfs-e2e.svc.cluster.local"
- name: WS_E2E_PORT
value: 8762
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10050"] command: ["/bin/grpc_health_probe", "-addr=:10050"]
...@@ -67,25 +80,6 @@ spec: ...@@ -67,25 +80,6 @@ spec:
- name: metrics - name: metrics
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
--- - name: ws
apiVersion: autoscaling/v2 port: 8761
kind: HorizontalPodAutoscaler targetPort: 8761
metadata:
name: e2e-orchestratorservice-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: e2e-orchestratorservice
minReplicas: 1
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
#behavior:
# scaleDown:
# stabilizationWindowSeconds: 30
...@@ -23,6 +23,9 @@ spec: ...@@ -23,6 +23,9 @@ spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
annotations:
config.linkerd.io/skip-inbound-ports: "8762"
config.linkerd.io/skip-outbound-ports: "8762"
labels: labels:
app: nbiservice app: nbiservice
spec: spec:
...@@ -35,11 +38,14 @@ spec: ...@@ -35,11 +38,14 @@ spec:
- containerPort: 8080 - containerPort: 8080
- containerPort: 9090 - containerPort: 9090
- containerPort: 9192 - containerPort: 9192
- containerPort: 8762
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: IETF_NETWORK_RENDERER - name: IETF_NETWORK_RENDERER
value: "LIBYANG" value: "LIBYANG"
- name: WS_E2E_PORT
value: 8762
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"] command: ["/bin/grpc_health_probe", "-addr=:9090"]
...@@ -77,3 +83,7 @@ spec: ...@@ -77,3 +83,7 @@ spec:
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
- name: ws
protocol: TCP
port: 8762
targetPort: 8762
...@@ -98,11 +98,11 @@ spec: ...@@ -98,11 +98,11 @@ spec:
selector: selector:
app: telemetryservice app: telemetryservice
ports: ports:
- name: frontend-grpc - name: grpc
protocol: TCP protocol: TCP
port: 30050 port: 30050
targetPort: 30050 targetPort: 30050
- name: backend-grpc - name: grpc-backend
protocol: TCP protocol: TCP
port: 30060 port: 30060
targetPort: 30060 targetPort: 30060
......
# Copyright 2022-2024 ETSI OSG/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.
# 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: vnt-managerservice
spec:
selector:
matchLabels:
app: vnt-managerservice
replicas: 1
template:
metadata:
annotations:
config.linkerd.io/skip-outbound-ports: "8765"
config.linkerd.io/skip-inbound-ports: "8765"
labels:
app: vnt-managerservice
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: labs.etsi.org:5050/tfs/controller/vnt_manager:latest
imagePullPolicy: Always
ports:
- containerPort: 10080
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
- name: WS_IP_PORT
value: 8761
- name: WS_E2E_PORT
value: 8762
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10080"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10080"]
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
name: vnt-managerservice
labels:
app: vnt-managerservice
spec:
type: ClusterIP
selector:
app: vnt-managerservice
ports:
- name: grpc
port: 10080
targetPort: 10080
- name: metrics
port: 9192
targetPort: 9192
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
# Set the list of components, separated by spaces, you want to build images for, and deploy. # Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" export TFS_COMPONENTS="context device pathcomp service slice nbi webui"
# Uncomment to activate Monitoring (old) # Uncomment to activate Monitoring (old)
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
...@@ -65,6 +65,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene ...@@ -65,6 +65,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene
# Uncomment to activate E2E Orchestrator # Uncomment to activate E2E Orchestrator
#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" #export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator"
# Uncomment to activate VNT Manager
#export TFS_COMPONENTS="${TFS_COMPONENTS} vnt_manager"
# Uncomment to activate DLT and Interdomain # Uncomment to activate DLT and Interdomain
#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" #export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt"
#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then #if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then
...@@ -83,6 +86,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene ...@@ -83,6 +86,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene
# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" # export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}"
#fi #fi
# Uncomment to activate Load Generator
#export TFS_COMPONENTS="${TFS_COMPONENTS} load_generator"
# Set the tag you want to use for your images. # Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev" export TFS_IMAGE_TAG="dev"
......
...@@ -260,6 +260,7 @@ message Link { ...@@ -260,6 +260,7 @@ message Link {
string name = 2; string name = 2;
repeated EndPointId link_endpoint_ids = 3; repeated EndPointId link_endpoint_ids = 3;
LinkAttributes attributes = 4; LinkAttributes attributes = 4;
LinkTypeEnum link_type = 5;
} }
message LinkIdList { message LinkIdList {
...@@ -275,6 +276,13 @@ message LinkEvent { ...@@ -275,6 +276,13 @@ message LinkEvent {
LinkId link_id = 2; LinkId link_id = 2;
} }
enum LinkTypeEnum {
LINKTYPE_UNKNOWN = 0;
LINKTYPE_COPPER = 1;
LINKTYPE_VIRTUAL_COPPER = 2;
LINKTYPE_OPTICAL = 3;
LINKTYPE_VIRTUAL_OPTICAL = 4;
}
// ----- Service ------------------------------------------------------------------------------------------------------- // ----- Service -------------------------------------------------------------------------------------------------------
message ServiceId { message ServiceId {
......
...@@ -21,6 +21,7 @@ import "context.proto"; ...@@ -21,6 +21,7 @@ import "context.proto";
service E2EOrchestratorService { service E2EOrchestratorService {
rpc Compute(E2EOrchestratorRequest) returns (E2EOrchestratorReply) {} rpc Compute(E2EOrchestratorRequest) returns (E2EOrchestratorReply) {}
rpc PushTopology(context.Topology) returns (context.Empty) {}
} }
message E2EOrchestratorRequest { message E2EOrchestratorRequest {
......
// Copyright 2022-2024 ETSI OSG/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.
// 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.
// protocol buffers documentation: https://developers.google.com/protocol-buffers/docs/proto3
syntax = "proto3";
package vnt_manager;
import "context.proto";
service VNTManagerService {
rpc VNTSubscript (VNTSubscriptionRequest) returns (VNTSubscriptionReply) {}
rpc ListVirtualLinkIds (context.Empty) returns (context.LinkIdList) {}
rpc ListVirtualLinks (context.Empty) returns (context.LinkList) {}
rpc GetVirtualLink (context.LinkId) returns (context.Link) {}
rpc SetVirtualLink (context.Link) returns (context.LinkId) {}
rpc RemoveVirtualLink (context.LinkId) returns (context.Empty) {}
}
message VNTSubscriptionRequest {
string host = 1;
string port = 2;
}
message VNTSubscriptionReply {
string subscription = 1;
}
...@@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} ...@@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
# Automated steps start here # Automated steps start here
######################################################################################################################## ########################################################################################################################
kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/ztpservice kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/automationservice
...@@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} ...@@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
# Automated steps start here # Automated steps start here
######################################################################################################################## ########################################################################################################################
kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/e2eorchestratorservice -c server kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/e2e-orchestratorservice -c server
#!/bin/bash
# Copyright 2022-2024 ETSI OSG/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.
# 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.
########################################################################################################################
# Define your deployment settings here
########################################################################################################################
# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
########################################################################################################################
# Automated steps start here
########################################################################################################################
kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/vnt_managerservice -c server
...@@ -32,6 +32,7 @@ STR_NEW_COPYRIGHT = 'Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https:/ ...@@ -32,6 +32,7 @@ STR_NEW_COPYRIGHT = 'Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https:/
RE_OLD_COPYRIGHTS = [ RE_OLD_COPYRIGHTS = [
r'Copyright\ 2021\-2023\ H2020\ TeraFlow\ \(https\:\/\/www\.teraflow\-h2020\.eu\/\)', r'Copyright\ 2021\-2023\ H2020\ TeraFlow\ \(https\:\/\/www\.teraflow\-h2020\.eu\/\)',
r'Copyright\ 2022\-2023\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)', r'Copyright\ 2022\-2023\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)',
r'Copyright\ 2022\-2024\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)',
] ]
RE_OLD_COPYRIGHTS = [ RE_OLD_COPYRIGHTS = [
(re.compile(r'.*{}.*'.format(re_old_copyright)), re.compile(re_old_copyright)) (re.compile(r'.*{}.*'.format(re_old_copyright)), re.compile(re_old_copyright))
......
...@@ -28,8 +28,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, ...@@ -28,8 +28,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION,
class AnalyticsFrontendClient: class AnalyticsFrontendClient:
def __init__(self, host=None, port=None): def __init__(self, host=None, port=None):
if not host: host = get_service_host(ServiceNameEnum.ANALYTICSFRONTEND) if not host: host = get_service_host(ServiceNameEnum.ANALYTICS)
if not port: port = get_service_port_grpc(ServiceNameEnum.ANALYTICSFRONTEND) if not port: port = get_service_port_grpc(ServiceNameEnum.ANALYTICS)
self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) self.endpoint = '{:s}:{:s}'.format(str(host), str(port))
LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint)))
self.channel = None self.channel = None
......
...@@ -20,7 +20,7 @@ from analytics.frontend.service.AnalyticsFrontendServiceServicerImpl import Anal ...@@ -20,7 +20,7 @@ from analytics.frontend.service.AnalyticsFrontendServiceServicerImpl import Anal
class AnalyticsFrontendService(GenericGrpcService): class AnalyticsFrontendService(GenericGrpcService):
def __init__(self, cls_name: str = __name__): def __init__(self, cls_name: str = __name__):
port = get_service_port_grpc(ServiceNameEnum.ANALYTICSFRONTEND) port = get_service_port_grpc(ServiceNameEnum.ANALYTICS)
super().__init__(port, cls_name=cls_name) super().__init__(port, cls_name=cls_name)
self.analytics_frontend_servicer = AnalyticsFrontendServiceServicerImpl() self.analytics_frontend_servicer = AnalyticsFrontendServiceServicerImpl()
......
...@@ -41,9 +41,9 @@ from apscheduler.triggers.interval import IntervalTrigger ...@@ -41,9 +41,9 @@ from apscheduler.triggers.interval import IntervalTrigger
LOCAL_HOST = '127.0.0.1' LOCAL_HOST = '127.0.0.1'
ANALYTICS_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.ANALYTICSFRONTEND)) ANALYTICS_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.ANALYTICS))
os.environ[get_env_var_name(ServiceNameEnum.ANALYTICSFRONTEND, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST)
os.environ[get_env_var_name(ServiceNameEnum.ANALYTICSFRONTEND, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(ANALYTICS_FRONTEND_PORT) os.environ[get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(ANALYTICS_FRONTEND_PORT)
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment