Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GNS3_unikernel_testbed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
NGUYEN Do Duc Anh
GNS3_unikernel_testbed
Commits
e82fe91b
Commit
e82fe91b
authored
4 weeks ago
by
NGUYEN Do Duc Anh
Browse files
Options
Downloads
Patches
Plain Diff
fix set link
parent
07431a56
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gns3manager.py
+1
-1
1 addition, 1 deletion
gns3manager.py
topohub_to_gns3.py
+3
-1
3 additions, 1 deletion
topohub_to_gns3.py
window/tcp_crash_listener.py
+1
-0
1 addition, 0 deletions
window/tcp_crash_listener.py
with
5 additions
and
2 deletions
gns3manager.py
+
1
−
1
View file @
e82fe91b
...
...
@@ -227,7 +227,7 @@ class GNS3Manager:
@staticmethod
def
set_link_filter
(
link_id
,
packet_lost
):
global
PROJECT_ID
,
username
,
password
url
=
f
"
http://localhost:3080/v2/projects/
{
PROJECT_ID
}
/links
"
url
=
f
"
http://localhost:3080/v2/projects/
{
PROJECT_ID
}
/links
/
{
link_id
}
"
data
=
{
"
filters
"
:
{
"
packet_lost
"
:
[
packet_lost
]}}
...
...
This diff is collapsed.
Click to expand it.
topohub_to_gns3.py
+
3
−
1
View file @
e82fe91b
...
...
@@ -96,7 +96,9 @@ def generate_topohub_GNS3_topology():
topo
=
topohub
.
get
(
topology_name
)
g
=
nx
.
node_link_graph
(
topo
)
P_values
=
np
.
random
.
lognormal
(
mean
=
0
,
sigma
=
1
,
size
=
g
.
graph
[
'
stats
'
][
'
nodes
'
]).
tolist
()
# P_values = np.random.lognormal(mean=0, sigma=1, size=g.graph['stats']['nodes']).tolist()
P_values
=
[
0.49729683886415604
,
2.8478372536019494
,
0.5638497692033089
,
1.7066441178756397
,
1.0955777113276581
,
0.6624609705231256
,
1.2170507302967504
,
2.241922851235645
,
0.9904057794366734
,
0.10045359874192523
,
0.1331217360266883
,
0.7161751639559052
]
print
(
"
P_values:
"
,
P_values
)
# Extract X (longitude) and Y (latitude) positions
...
...
This diff is collapsed.
Click to expand it.
window/tcp_crash_listener.py
+
1
−
0
View file @
e82fe91b
...
...
@@ -158,6 +158,7 @@ def main():
scale_factor
=
5000
/
max
(
A
)
for
i
in
range
(
len
(
A
)):
A
[
i
]
*=
scale_factor
print
(
f
"
A[
{
i
}
]
"
,
A
[
i
])
thread
=
threading
.
Thread
(
target
=
read_and_write_points
)
thread
.
daemon
=
True
...
...
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