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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NGUYEN Do Duc Anh
GNS3_unikernel_testbed
Commits
8388279d
Commit
8388279d
authored
5 months ago
by
NGUYEN Do Duc Anh
Browse files
Options
Downloads
Patches
Plain Diff
fix concatenate str + command
parent
9ba21c2c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ubuntu_base/if_utils.py
+2
-1
2 additions, 1 deletion
ubuntu_base/if_utils.py
ubuntu_base/opportunistic_utils.py
+2
-1
2 additions, 1 deletion
ubuntu_base/opportunistic_utils.py
with
4 additions
and
2 deletions
ubuntu_base/if_utils.py
+
2
−
1
View file @
8388279d
...
...
@@ -235,7 +235,8 @@ def run_ids_solo5_hvt(map_tap_inf_for_ids):
# Append node ID
command
.
append
(
f
"
--node-id=
{
my_id
}
"
)
process
=
subprocess
.
Popen
([
'
gnome-terminal
'
,
'
--
'
,
'
bash
'
,
'
-c
'
,
command
])
command_str
=
"
"
.
join
(
command
)
process
=
subprocess
.
Popen
([
'
gnome-terminal
'
,
'
--
'
,
'
bash
'
,
'
-c
'
,
command_str
])
return
process
...
...
This diff is collapsed.
Click to expand it.
ubuntu_base/opportunistic_utils.py
+
2
−
1
View file @
8388279d
...
...
@@ -163,6 +163,7 @@ class IdsOpportunistic:
if_utils
.
create_bridge
(
new_bridge
)
# Add ens$i and public$j to br$j, Add private$j to br0
if_utils
.
delete_interface_from_bridge
(
if_utils
.
BR_CENTER_NAME
,
inter_name
)
if_utils
.
add_interface_to_bridge
(
new_bridge
,
inter_name
)
if_utils
.
add_interface_to_bridge
(
new_bridge
,
public_if
)
if_utils
.
add_interface_to_bridge
(
if_utils
.
BR_CENTER_NAME
,
private_if
)
...
...
@@ -224,7 +225,7 @@ class IdsOpportunistic:
if
is_ids_deployed
and
not
IdsOpportunistic
.
ids_process
:
# Generate and store IDS ID to differentiate instances deployed overtime, currently we do not use it
new_ids_deploy_id
=
node_ID
+
"
_
"
+
str
(
time_decided
)
new_ids_deploy_id
=
str
(
node_ID
)
+
"
_
"
+
str
(
time_decided
)
if
IdsOpportunistic
.
ids_deploy_id
==
0
or
IdsOpportunistic
.
ids_deploy_id
!=
new_ids_deploy_id
:
IdsOpportunistic
.
ids_deploy_id
=
new_ids_deploy_id
...
...
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