Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
faeea472
Commit
faeea472
authored
4 months ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Context component:
- Added LinkTypeEnum
parent
c2c41b80
No related branches found
Branches containing commit
No related tags found
3 merge requests
!346
Draft: support for restconf protocol
,
!345
Draft: support ipinfusion devices via netconf
,
!315
Resolve "(CTTC) Define fields to specify type of link"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/context/service/database/models/enums/LinkType.py
+33
-0
33 additions, 0 deletions
src/context/service/database/models/enums/LinkType.py
with
33 additions
and
0 deletions
src/context/service/database/models/enums/LinkType.py
0 → 100644
+
33
−
0
View file @
faeea472
# 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.
# 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.
import
enum
,
functools
from
common.proto.context_pb2
import
LinkTypeEnum
from
._GrpcToEnum
import
grpc_to_enum
# IMPORTANT: Entries of enum class ORM_LinkTypeEnum should be named as in
# the proto files removing the prefixes. For example, proto item
# LinkTypeEnum.DEVICEDRIVER_COPPER should be included as COPPER.
# If item name does not match, automatic mapping of proto enums
# to database enums will fail.
class
ORM_LinkTypeEnum
(
enum
.
Enum
):
UNKNOWN
=
LinkTypeEnum
.
LINKTYPE_UNKNOWN
COPPER
=
LinkTypeEnum
.
LINKTYPE_COPPER
FIBER
=
LinkTypeEnum
.
LINKTYPE_FIBER
RADIO
=
LinkTypeEnum
.
LINKTYPE_RADIO
VIRTUAL
=
LinkTypeEnum
.
LINKTYPE_VIRTUAL
grpc_to_enum__link_type_enum
=
functools
.
partial
(
grpc_to_enum
,
LinkTypeEnum
,
ORM_LinkTypeEnum
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment