Loading .gitlab-ci.yml +1 −0 Changes for .gitlab-ci.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ include: - local: '/src/osm_client/.gitlab-ci.yml' - local: '/src/simap_connector/.gitlab-ci.yml' - local: '/src/pluggables/.gitlab-ci.yml' - local: '/src/logical_resources/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' manifests/logical_resourcesservice.yaml 0 → 100644 +101 −0 Changes for manifests/logical_resourcesservice.yaml: 101 added lines, 0 removed lines. Original line number Diff line number Diff line # Copyright 2022-2026 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. # 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: logical-resourcesservice spec: selector: matchLabels: app: logical-resourcesservice #replicas: 1 template: metadata: labels: app: logical-resourcesservice spec: terminationGracePeriodSeconds: 5 containers: - name: server image: labs.etsi.org:5050/tfs/controller/logical_resources:latest imagePullPolicy: Always ports: - containerPort: 30230 - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30230"] failureThreshold: 30 periodSeconds: 1 readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30230"] livenessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30230"] resources: requests: cpu: 250m memory: 128Mi limits: cpu: 1000m memory: 1024Mi --- apiVersion: v1 kind: Service metadata: name: logical-resourcesservice labels: app: logical-resourcesservice spec: type: ClusterIP selector: app: logical-resourcesservice ports: - name: grpc protocol: TCP port: 30230 targetPort: 30230 - name: metrics protocol: TCP port: 9192 targetPort: 9192 # TODO: Cannot be auto-scaled until a proper database is implemented. #--- #apiVersion: autoscaling/v2 #kind: HorizontalPodAutoscaler #metadata: # name: logical-resourcesservice-hpa #spec: # scaleTargetRef: # apiVersion: apps/v1 # kind: Deployment # name: logical-resourcesservice # minReplicas: 1 # maxReplicas: 20 # metrics: # - type: Resource # resource: # name: cpu # target: # type: Utilization # averageUtilization: 80 # #behavior: # # scaleDown: # # stabilizationWindowSeconds: 30 manifests/pluggablesservice.yaml +1 −1 Changes for manifests/pluggablesservice.yaml: 1 added line, 1 removed line. Original line number Diff line number Diff line # Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # Copyright 2022-2026 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 my_deploy.sh +3 −0 Changes for my_deploy.sh: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -97,6 +97,9 @@ export TFS_COMPONENTS="context device pathcomp service nbi webui" # Uncomment to activate SIMAP Connector #export TFS_COMPONENTS="${TFS_COMPONENTS} simap_connector" # Uncomment to activate Logical Resources. #export TFS_COMPONENTS="${TFS_COMPONENTS} logical_resources" # Uncomment to activate Load Generator #export TFS_COMPONENTS="${TFS_COMPONENTS} load_generator" Loading proto/logical_resources.proto 0 → 100644 +102 −0 Changes for proto/logical_resources.proto: 102 added lines, 0 removed lines. Original line number Diff line number Diff line // Copyright 2022-2026 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. // 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 logical_resources; service LogicalResources { rpc AddResources (ConfigParameters ) returns (Response ) {} rpc GetAvailableResources (Empty ) returns (ResourceList ) {} rpc ReserveResource (ResourceReservation) returns (Success ) {} rpc ReleaseResource (ResourceReservation) returns (Success ) {} rpc DeleteResource (ResourceReservation) returns (Success ) {} rpc GetReservedResources (Empty ) returns (ResourceList ) {} rpc GetResourceOwner (Value ) returns (FabricId ) {} rpc GetResourcesByType (ResourceTypeQuery ) returns (TypedResourceList) {} } message Empty {} message Value { string value = 1; } message FabricId { string fabric_id = 1; } message Tuple { string type = 1; string value = 2; } message Success { bool success = 1; string message = 2; } message ResourceReservation { Tuple tuple = 1; FabricId fabric_id = 2; } message ResourceTypeQuery { string resource_type = 1; } message ResourceEntry { string type = 1; string value = 2; string fabric_id = 3; bool allocated = 4; } message ResourceList { repeated ResourceEntry resources = 1; } message TypedResourceList { string resource_type = 1; repeated ResourceEntry resources = 2; } message ConfigParameters { string device_uuid = 1; string endpoint_uuid = 2; string ip_address = 3; uint32 vlan_tag = 4; string mac_address = 5; uint32 asn = 6; string router_id = 7; uint32 vni = 8; string local_address = 9; uint32 port = 10; string bridge = 11; string interface = 12; string remote_address = 13; uint32 remote_as = 14; string local_role = 15; string routing_table = 16; bool multihop = 17; string afi = 18; string name = 19; string interface_comment = 20; string link_target_device = 21; string link_target_interface = 22; } message Response { bool success = 1; string message = 2; } Loading
.gitlab-ci.yml +1 −0 Changes for .gitlab-ci.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ include: - local: '/src/osm_client/.gitlab-ci.yml' - local: '/src/simap_connector/.gitlab-ci.yml' - local: '/src/pluggables/.gitlab-ci.yml' - local: '/src/logical_resources/.gitlab-ci.yml' # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml'
manifests/logical_resourcesservice.yaml 0 → 100644 +101 −0 Changes for manifests/logical_resourcesservice.yaml: 101 added lines, 0 removed lines. Original line number Diff line number Diff line # Copyright 2022-2026 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. # 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: logical-resourcesservice spec: selector: matchLabels: app: logical-resourcesservice #replicas: 1 template: metadata: labels: app: logical-resourcesservice spec: terminationGracePeriodSeconds: 5 containers: - name: server image: labs.etsi.org:5050/tfs/controller/logical_resources:latest imagePullPolicy: Always ports: - containerPort: 30230 - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" startupProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30230"] failureThreshold: 30 periodSeconds: 1 readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30230"] livenessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30230"] resources: requests: cpu: 250m memory: 128Mi limits: cpu: 1000m memory: 1024Mi --- apiVersion: v1 kind: Service metadata: name: logical-resourcesservice labels: app: logical-resourcesservice spec: type: ClusterIP selector: app: logical-resourcesservice ports: - name: grpc protocol: TCP port: 30230 targetPort: 30230 - name: metrics protocol: TCP port: 9192 targetPort: 9192 # TODO: Cannot be auto-scaled until a proper database is implemented. #--- #apiVersion: autoscaling/v2 #kind: HorizontalPodAutoscaler #metadata: # name: logical-resourcesservice-hpa #spec: # scaleTargetRef: # apiVersion: apps/v1 # kind: Deployment # name: logical-resourcesservice # minReplicas: 1 # maxReplicas: 20 # metrics: # - type: Resource # resource: # name: cpu # target: # type: Utilization # averageUtilization: 80 # #behavior: # # scaleDown: # # stabilizationWindowSeconds: 30
manifests/pluggablesservice.yaml +1 −1 Changes for manifests/pluggablesservice.yaml: 1 added line, 1 removed line. Original line number Diff line number Diff line # Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # Copyright 2022-2026 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
my_deploy.sh +3 −0 Changes for my_deploy.sh: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -97,6 +97,9 @@ export TFS_COMPONENTS="context device pathcomp service nbi webui" # Uncomment to activate SIMAP Connector #export TFS_COMPONENTS="${TFS_COMPONENTS} simap_connector" # Uncomment to activate Logical Resources. #export TFS_COMPONENTS="${TFS_COMPONENTS} logical_resources" # Uncomment to activate Load Generator #export TFS_COMPONENTS="${TFS_COMPONENTS} load_generator" Loading
proto/logical_resources.proto 0 → 100644 +102 −0 Changes for proto/logical_resources.proto: 102 added lines, 0 removed lines. Original line number Diff line number Diff line // Copyright 2022-2026 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. // 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 logical_resources; service LogicalResources { rpc AddResources (ConfigParameters ) returns (Response ) {} rpc GetAvailableResources (Empty ) returns (ResourceList ) {} rpc ReserveResource (ResourceReservation) returns (Success ) {} rpc ReleaseResource (ResourceReservation) returns (Success ) {} rpc DeleteResource (ResourceReservation) returns (Success ) {} rpc GetReservedResources (Empty ) returns (ResourceList ) {} rpc GetResourceOwner (Value ) returns (FabricId ) {} rpc GetResourcesByType (ResourceTypeQuery ) returns (TypedResourceList) {} } message Empty {} message Value { string value = 1; } message FabricId { string fabric_id = 1; } message Tuple { string type = 1; string value = 2; } message Success { bool success = 1; string message = 2; } message ResourceReservation { Tuple tuple = 1; FabricId fabric_id = 2; } message ResourceTypeQuery { string resource_type = 1; } message ResourceEntry { string type = 1; string value = 2; string fabric_id = 3; bool allocated = 4; } message ResourceList { repeated ResourceEntry resources = 1; } message TypedResourceList { string resource_type = 1; repeated ResourceEntry resources = 2; } message ConfigParameters { string device_uuid = 1; string endpoint_uuid = 2; string ip_address = 3; uint32 vlan_tag = 4; string mac_address = 5; uint32 asn = 6; string router_id = 7; uint32 vni = 8; string local_address = 9; uint32 port = 10; string bridge = 11; string interface = 12; string remote_address = 13; uint32 remote_as = 14; string local_role = 15; string routing_table = 16; bool multihop = 17; string afi = 18; string name = 19; string interface_comment = 20; string link_target_device = 21; string link_target_interface = 22; } message Response { bool success = 1; string message = 2; }