Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tfs/controller
1 result
Show changes
Commits on Source (172)
Showing
with 471 additions and 86 deletions
......@@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.my_venv/
# requirements.txt # removed to enable tracking versions of packages over time
# PyInstaller
......
......@@ -34,6 +34,7 @@ include:
- local: '/src/opticalcontroller/.gitlab-ci.yml'
- local: '/src/ztp/.gitlab-ci.yml'
- local: '/src/policy/.gitlab-ci.yml'
- local: '/src/automation/.gitlab-ci.yml'
- local: '/src/forecaster/.gitlab-ci.yml'
#- local: '/src/webui/.gitlab-ci.yml'
#- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
......@@ -50,5 +51,7 @@ include:
- local: '/src/kpi_value_writer/.gitlab-ci.yml'
- local: '/src/telemetry/.gitlab-ci.yml'
- local: '/src/analytics/.gitlab-ci.yml'
- local: '/src/qos_profile/.gitlab-ci.yml'
# This should be last one: end-to-end integration tests
- local: '/src/tests/.gitlab-ci.yml'
......@@ -154,8 +154,8 @@ function crdb_undeploy_single() {
echo
}
function crdb_drop_database_single() {
echo "Drop database if exists"
function crdb_drop_databases_single() {
echo "Drop TFS databases, if exist"
if [[ -z "${GITLAB_CI}" ]]; then
#kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml
......@@ -168,9 +168,21 @@ function crdb_drop_database_single() {
CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require"
echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}"
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \
--execute "DROP DATABASE IF EXISTS ${CRDB_DATABASE};"
DATABASES=$(
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \
--execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs"
)
echo "Found TFS databases: ${DATABASES}" | tr '\n' ' '
echo
for DB_NAME in $DATABASES; do
echo "Dropping TFS database: $DB_NAME"
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \
--execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;"
done
echo
}
......@@ -349,11 +361,23 @@ function crdb_undeploy_cluster() {
echo
}
function crdb_drop_database_cluster() {
echo "Drop database if exists"
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public --execute \
"DROP DATABASE IF EXISTS ${CRDB_DATABASE};"
function crdb_drop_databases_cluster() {
echo "Drop TFS databases, if exist"
DATABASES=$(
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \
--execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs"
)
echo "Found TFS databases: ${DATABASES}" | tr '\n' ' '
echo
for DB_NAME in $DATABASES; do
echo "Dropping TFS database: $DB_NAME"
kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \
./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \
--execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;"
done
echo
}
......@@ -365,7 +389,7 @@ if [ "$CRDB_DEPLOY_MODE" == "single" ]; then
crdb_deploy_single
if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then
crdb_drop_database_single
crdb_drop_databases_single
fi
elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then
if [ "$CRDB_REDEPLOY" == "YES" ]; then
......@@ -375,7 +399,7 @@ elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then
crdb_deploy_cluster
if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then
crdb_drop_database_cluster
crdb_drop_databases_cluster
fi
else
echo "Unsupported value: CRDB_DEPLOY_MODE=$CRDB_DEPLOY_MODE"
......
......@@ -344,11 +344,10 @@ for COMPONENT in $TFS_COMPONENTS; do
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"
else
VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
if [ "$TFS_SKIP_BUILD" != "YES" ]; then
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
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')
fi
sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
......
......@@ -98,11 +98,11 @@ spec:
selector:
app: analyticsservice
ports:
- name: frontend-grpc
- name: grpc
protocol: TCP
port: 30080
targetPort: 30080
- name: backend-grpc
- name: grpc-backend
protocol: TCP
port: 30090
targetPort: 30090
......
# 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: automationservice
spec:
selector:
matchLabels:
app: automationservice
replicas: 1
template:
metadata:
annotations:
# Required for IETF L2VPN SBI when both parent and child run in same K8s cluster with Linkerd
config.linkerd.io/skip-outbound-ports: "2002"
labels:
app: automationservice
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: labs.etsi.org:5050/tfs/controller/automation:latest
imagePullPolicy: Always
ports:
- containerPort: 30200
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
startupProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:30200"]
failureThreshold: 30
periodSeconds: 1
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:30200"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:30200"]
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
name: automationservice
labels:
app: automationservice
spec:
type: ClusterIP
selector:
app: automationservice
ports:
- name: grpc
protocol: TCP
port: 30200
targetPort: 30200
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
......@@ -40,7 +40,7 @@ spec:
- name: LOG_LEVEL
value: "INFO"
- name: CRDB_DATABASE
value: "tfs_kpi"
value: "tfs_kpi_mgmt"
envFrom:
- secretRef:
name: crdb-data
......
......@@ -38,6 +38,8 @@ spec:
env:
- name: LOG_LEVEL
value: "INFO"
- name: IETF_NETWORK_RENDERER
value: "LIBYANG"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"]
......
......@@ -66,6 +66,6 @@ spec:
pathType: Prefix
backend:
service:
name: qkd-appservice
name: nbiservice
port:
number: 8005
number: 8080
......@@ -28,36 +28,35 @@ spec:
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: labs.etsi.org:5050/tfs/controller/qkd_app:latest
imagePullPolicy: Always
ports:
- containerPort: 10060
- containerPort: 9192
- containerPort: 8005
env:
- name: LOG_LEVEL
value: "DEBUG"
- name: CRDB_DATABASE_APP
value: "qkd_app"
envFrom:
- secretRef:
name: crdb-data
- secretRef:
name: nats-data
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10060"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10060"]
resources:
requests:
cpu: 150m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
- name: server
image: labs.etsi.org:5050/tfs/controller/qkd_app:latest
imagePullPolicy: Always
ports:
- containerPort: 10060
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
- name: CRDB_DATABASE
value: "qkd_app"
envFrom:
- secretRef:
name: crdb-data
- secretRef:
name: nats-data
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10060"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10060"]
resources:
requests:
cpu: 150m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
......@@ -70,14 +69,11 @@ spec:
selector:
app: qkd-appservice
ports:
- name: grpc
protocol: TCP
port: 10060
targetPort: 10060
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
- name: http
port: 8005
targetPort: 8005
- name: grpc
protocol: TCP
port: 10060
targetPort: 10060
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
# 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: qos-profileservice
spec:
selector:
matchLabels:
app: qos-profileservice
#replicas: 1
template:
metadata:
annotations:
config.linkerd.io/skip-outbound-ports: "4222"
labels:
app: qos-profileservice
spec:
terminationGracePeriodSeconds: 5
containers:
- name: server
image: labs.etsi.org:5050/tfs/controller/qos_profile:latest
imagePullPolicy: Always
ports:
- containerPort: 20040
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "INFO"
- name: CRDB_DATABASE
value: "tfs_qos_profile"
envFrom:
- secretRef:
name: crdb-data
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:20040"]
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:20040"]
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
name: qos-profileservice
labels:
app: qos-profileservice
spec:
type: ClusterIP
selector:
app: qos-profileservice
ports:
- name: grpc
protocol: TCP
port: 20040
targetPort: 20040
- name: metrics
protocol: TCP
port: 9192
targetPort: 9192
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: qos-profileservice-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: qos-profileservice
minReplicas: 1
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
#behavior:
# scaleDown:
# stabilizationWindowSeconds: 30
......@@ -38,7 +38,7 @@ spec:
- name: LOG_LEVEL
value: "INFO"
- name: CRDB_DATABASE
value: "tfs_kpi"
value: "tfs_telemetry"
- name: METRICS_PORT
value: "9192"
envFrom:
......@@ -98,11 +98,11 @@ spec:
selector:
app: telemetryservice
ports:
- name: frontend-grpc
- name: grpc
protocol: TCP
port: 30050
targetPort: 30050
- name: backend-grpc
- name: grpc-backend
protocol: TCP
port: 30060
targetPort: 30060
......
......@@ -20,13 +20,16 @@
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 slice nbi webui load_generator"
export TFS_COMPONENTS="context device pathcomp service slice nbi webui"
# Uncomment to activate Monitoring (old)
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
# Uncomment to activate Monitoring Framework (new)
#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api"
#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation"
# Uncomment to activate QoS Profiles
#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile"
# Uncomment to activate BGP-LS Speaker
#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker"
......@@ -80,6 +83,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene
# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}"
#fi
# Uncomment to activate Load Generator
#export TFS_COMPONENTS="${TFS_COMPONENTS} load_generator"
# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"
......
......@@ -20,7 +20,7 @@ import "kpi_manager.proto";
//import "kpi_sample_types.proto";
service AnalyticsFrontendService {
rpc StartAnalyzer (Analyzer ) returns (AnalyzerId ) {}
rpc StartAnalyzer (Analyzer ) returns (AnalyzerId) {}
rpc StopAnalyzer (AnalyzerId ) returns (context.Empty) {}
rpc SelectAnalyzers(AnalyzerFilter) returns (AnalyzerList ) {}
}
......
// 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.
syntax = "proto3";
package automation;
import "context.proto";
import "policy.proto";
// Automation service RPCs
service AutomationService {
rpc ZSMCreate (ZSMCreateRequest ) returns (ZSMService ) {}
rpc ZSMUpdate (ZSMCreateUpdate ) returns (ZSMService ) {}
rpc ZSMDelete (ZSMServiceID ) returns (ZSMServiceState) {}
rpc ZSMGetById (ZSMServiceID ) returns (ZSMService ) {}
rpc ZSMGetByService (context.ServiceId) returns (ZSMService ) {}
}
// ZSM service states
enum ZSMServiceStateEnum {
ZSM_UNDEFINED = 0; // Undefined ZSM loop state
ZSM_FAILED = 1; // ZSM loop failed
ZSM_ACTIVE = 2; // ZSM loop is currently active
ZSM_INACTIVE = 3; // ZSM loop is currently inactive
ZSM_UPDATED = 4; // ZSM loop is updated
ZSM_REMOVED = 5; // ZSM loop is removed
}
message ZSMCreateRequest {
context.ServiceId serviceId = 1;
policy.PolicyRuleList policyList = 2;
}
message ZSMCreateUpdate {
context.Uuid ZSMServiceID = 1;
policy.PolicyRuleList policyList = 2;
}
// A unique identifier per ZSM service
message ZSMServiceID {
context.Uuid uuid = 1;
}
// The state of a ZSM service
message ZSMServiceState {
ZSMServiceStateEnum zsmServiceState = 1;
string zsmServiceStateMessage = 2;
}
// Basic ZSM service attributes
message ZSMService {
ZSMServiceID zsmServiceId = 1;
context.ServiceId serviceId = 2;
policy.PolicyRuleList policyList = 3;
// TODO: When new Analytics and updated Monitoring are in place, add the necessary binding to them
}
......@@ -536,7 +536,7 @@ message Constraint_Custom {
}
message Constraint_Schedule {
float start_timestamp = 1;
double start_timestamp = 1;
float duration_days = 2;
}
......@@ -599,6 +599,16 @@ message Constraint_Exclusions {
repeated LinkId link_ids = 4;
}
message QoSProfileId {
context.Uuid qos_profile_id = 1;
}
message Constraint_QoSProfile {
QoSProfileId qos_profile_id = 1;
string qos_profile_name = 2;
}
message Constraint {
ConstraintActionEnum action = 1;
oneof constraint {
......@@ -611,6 +621,7 @@ message Constraint {
Constraint_SLA_Availability sla_availability = 8;
Constraint_SLA_Isolation_level sla_isolation = 9;
Constraint_Exclusions exclusions = 10;
Constraint_QoSProfile qos_profile = 11;
}
}
......
......@@ -19,18 +19,19 @@ import "context.proto";
import "kpi_manager.proto";
service KpiValueAPIService {
rpc StoreKpiValues (KpiValueList) returns (context.Empty) {}
rpc SelectKpiValues (KpiValueFilter) returns (KpiValueList) {}
rpc StoreKpiValues (KpiValueList ) returns (context.Empty ) {}
rpc SelectKpiValues (KpiValueFilter ) returns (KpiValueList ) {}
rpc GetKpiAlarms (kpi_manager.KpiId) returns (stream KpiAlarms) {}
}
message KpiValue {
kpi_manager.KpiId kpi_id = 1;
context.Timestamp timestamp = 2;
KpiValueType kpi_value_type = 3;
kpi_manager.KpiId kpi_id = 1;
context.Timestamp timestamp = 2;
KpiValueType kpi_value_type = 3;
}
message KpiValueList {
repeated KpiValue kpi_value_list = 1;
repeated KpiValue kpi_value_list = 1;
}
message KpiValueType {
......@@ -46,7 +47,14 @@ message KpiValueType {
}
message KpiValueFilter {
repeated kpi_manager.KpiId kpi_id = 1;
repeated context.Timestamp start_timestamp = 2;
repeated context.Timestamp end_timestamp = 3;
repeated kpi_manager.KpiId kpi_id = 1;
repeated context.Timestamp start_timestamp = 2;
repeated context.Timestamp end_timestamp = 3;
}
message KpiAlarms {
context.Timestamp start_timestamp = 1;
context.Timestamp end_timestamp = 2;
kpi_manager.KpiId kpi_id = 3;
map<string, bool> alarms = 4;
}
// 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.
syntax = "proto3";
package qkd_app;
import "context.proto";
// Optare: Change this if you want to change App's structure or enums.
// Optare: If a message (structure) is changed it must be changed in src/app/service/database
// Define Empty message if you don't want to use google.protobuf.Empty.
message Empty {}
// Enum representing possible states of a QKD application.
enum QKDAppStatusEnum {
QKDAPPSTATUS_ON = 0;
QKDAPPSTATUS_DISCONNECTED = 1;
......@@ -13,16 +28,26 @@ enum QKDAppStatusEnum {
QKDAPPSTATUS_ZOMBIE = 3;
}
// Enum representing QKD application types.
enum QKDAppTypesEnum {
QKDAPPTYPES_INTERNAL = 0;
QKDAPPTYPES_CLIENT = 1;
}
// Message representing a QKDL (Quantum Key Distribution Link) identifier.
message QKDLId {
context.Uuid qkdl_uuid = 1;
}
// Define QoS parameters for QKD applications
message QoS {
uint32 max_bandwidth = 1; // Maximum bandwidth (in bits per second)
uint32 min_bandwidth = 2; // Minimum bandwidth (optional)
uint32 jitter = 3; // Maximum jitter (in milliseconds)
uint32 ttl = 4; // Time-to-live (in seconds)
}
// Main message representing a QKD application with all required fields.
message App {
AppId app_id = 1;
QKDAppStatusEnum app_status = 2;
......@@ -32,22 +57,24 @@ message App {
repeated QKDLId backing_qkdl_id = 6;
context.DeviceId local_device_id = 7;
context.DeviceId remote_device_id = 8;
QoS qos = 9; // Include QoS in the App message
}
// Message representing an identifier for an app.
message AppId {
context.ContextId context_id = 1;
context.Uuid app_uuid = 2;
}
// Service definition for AppService, including app registration and listing.
service AppService {
rpc RegisterApp(App) returns (context.Empty) {}
rpc ListApps (context.ContextId ) returns ( AppList ) {}
}
rpc ListApps(context.ContextId) returns (AppList) {}
rpc GetApp(AppId) returns (App) {}
rpc DeleteApp (AppId) returns (Empty) {} // Use locally defined Empty
}
message AppList {
// Message representing a list of apps.
message AppList {
repeated App apps = 1;
}
// 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.
syntax = "proto3";
package qos_profile;
import "context.proto";
message QoSProfileValueUnitPair {
int32 value = 1;
string unit = 2;
}
message QoDConstraintsRequest {
context.QoSProfileId qos_profile_id = 1;
double start_timestamp = 2;
float duration = 3;
}
message QoSProfile {
context.QoSProfileId qos_profile_id = 1;
string name = 2;
string description = 3;
string status = 4;
QoSProfileValueUnitPair targetMinUpstreamRate = 5;
QoSProfileValueUnitPair maxUpstreamRate = 6;
QoSProfileValueUnitPair maxUpstreamBurstRate = 7;
QoSProfileValueUnitPair targetMinDownstreamRate = 8;
QoSProfileValueUnitPair maxDownstreamRate = 9;
QoSProfileValueUnitPair maxDownstreamBurstRate = 10;
QoSProfileValueUnitPair minDuration = 11;
QoSProfileValueUnitPair maxDuration = 12;
int32 priority = 13;
QoSProfileValueUnitPair packetDelayBudget = 14;
QoSProfileValueUnitPair jitter = 15;
int32 packetErrorLossRate = 16;
}
service QoSProfileService {
rpc CreateQoSProfile (QoSProfile ) returns ( QoSProfile ) {}
rpc UpdateQoSProfile (QoSProfile ) returns ( QoSProfile ) {}
rpc DeleteQoSProfile (context.QoSProfileId ) returns ( context.Empty ) {}
rpc GetQoSProfile (context.QoSProfileId ) returns ( QoSProfile ) {}
rpc GetQoSProfiles (context.Empty ) returns (stream QoSProfile ) {}
rpc GetConstraintListFromQoSProfile (QoDConstraintsRequest) returns (stream context.Constraint) {}
}
......@@ -19,6 +19,6 @@ PROJECTDIR=`pwd`
cd $PROJECTDIR/src
RCFILE=$PROJECTDIR/coverage/.coveragerc
CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}')
export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_kpi_mgmt?sslmode=require"
export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require"
python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \
analytics/tests/test_analytics_db.py