Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flame-clmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
flame
flame-clmc
Commits
b663301f
Commit
b663301f
authored
6 years ago
by
Nikolay Stanchev
Browse files
Options
Downloads
Patches
Plain Diff
Updates network topology builder to update latencies if an edge already existed
parent
a4d7f11d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/clmcservice/graphapi/utilities.py
+5
-1
5 additions, 1 deletion
src/service/clmcservice/graphapi/utilities.py
with
5 additions
and
1 deletion
src/service/clmcservice/graphapi/utilities.py
+
5
−
1
View file @
b663301f
...
...
@@ -389,7 +389,11 @@ def build_network_graph(graph, switches, links, clusters, ues):
new_switches_count
+=
1
# create the link between the two nodes
find_or_create_edge
(
graph
,
"
linkedTo
"
,
from_node
,
to_node
,
latency
=
latency
)
edge
=
find_or_create_edge
(
graph
,
"
linkedTo
"
,
from_node
,
to_node
,
latency
=
latency
)
if
edge
[
"
latency
"
]
!=
latency
:
log
.
info
(
"
Updating latency for edge {0}, old latency {1}, new latency {2}
"
.
format
(
edge
,
edge
[
"
latency
"
],
latency
))
edge
[
"
latency
"
]
=
latency
# make sure that the latency is updated if the edge already existed
graph
.
push
(
edge
)
# update the relationship in the DB
# check whether the source service router connects a particular cluster or a particular UE
if
create_node_from_mapping
(
graph
,
from_node
,
source
,
clusters
,
"
Cluster
"
):
...
...
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