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
ae6bc78b
Commit
ae6bc78b
authored
2 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
PathComp:
- Added definition of algorithm in proto file - Minor code comments and TODOs added
parent
f4cff5db
No related branches found
No related tags found
1 merge request
!54
Release 2.0.0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
proto/pathcomp.proto
+11
-0
11 additions, 0 deletions
proto/pathcomp.proto
src/pathcomp/service/PathCompServiceServicerImpl.py
+2
-0
2 additions, 0 deletions
src/pathcomp/service/PathCompServiceServicerImpl.py
src/pathcomp/tests/Objects.py
+2
-2
2 additions, 2 deletions
src/pathcomp/tests/Objects.py
with
15 additions
and
2 deletions
proto/pathcomp.proto
+
11
−
0
View file @
ae6bc78b
...
...
@@ -21,8 +21,19 @@ service PathCompService {
rpc
Compute
(
PathCompRequest
)
returns
(
PathCompReply
)
{}
}
message
Algorithm_ShortestPath
{}
message
Algorithm_KShortestPath
{
uint32
k_inspection
=
1
;
uint32
k_return
=
2
;
}
message
PathCompRequest
{
repeated
context.Service
services
=
1
;
oneof
algorithm
{
Algorithm_ShortestPath
shortest_path
=
10
;
Algorithm_KShortestPath
k_shortest_path
=
11
;
}
}
message
PathCompReply
{
...
...
This diff is collapsed.
Click to expand it.
src/pathcomp/service/PathCompServiceServicerImpl.py
+
2
−
0
View file @
ae6bc78b
...
...
@@ -38,6 +38,8 @@ class PathCompServiceServicerImpl(PathCompServiceServicer):
context_client
=
ContextClient
()
# TODO: consider filtering resources
grpc_contexts
=
context_client
.
ListContexts
(
Empty
())
grpc_devices
=
context_client
.
ListDevices
(
Empty
())
grpc_links
=
context_client
.
ListLinks
(
Empty
())
...
...
This diff is collapsed.
Click to expand it.
src/pathcomp/tests/Objects.py
+
2
−
2
View file @
ae6bc78b
...
...
@@ -93,8 +93,8 @@ LINK_C2_C3_ID, LINK_C2_C3 = compose_link(DEVICE_C2_ENDPOINTS[1], DEVICE_C3_ENDPO
# ----- Service --------------------------------------------------------------------------------------------------------
SERVICE_A1_B1
=
compose_service
(
DEVICE_A1_ENDPOINTS
[
2
],
DEVICE_B1_ENDPOINTS
[
2
],
constraints
=
[
json_constraint
(
'
bandwidth
'
,
10.0
),
json_constraint
(
'
latency
_
ms
'
,
5.0
)
json_constraint
(
'
bandwidth
[gbps]
'
,
10.0
),
json_constraint
(
'
latency
[
ms
]
'
,
5.0
)
,
])
# ----- Containers -----------------------------------------------------------------------------------------------------
...
...
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