Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
626f0309
Commit
626f0309
authored
Oct 12, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format: fix some conflicts about tun interfaces when changing the number of partitions
parent
9a9d4b0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
slapos/format.py
slapos/format.py
+3
-2
No files found.
slapos/format.py
View file @
626f0309
...
...
@@ -436,6 +436,7 @@ class Computer(object):
config
=
config
,
)
partition_amount
=
int
(
config
.
partition_amount
)
for
partition_index
,
partition_dict
in
enumerate
(
dumped_dict
[
'partition_list'
]):
if
partition_dict
[
'user'
]:
...
...
@@ -454,10 +455,10 @@ class Computer(object):
tap
=
Tap
(
partition_dict
[
'reference'
])
if
partition_dict
.
get
(
'tun'
)
is
not
None
and
partition_dict
[
'tun'
].
get
(
'ipv4_addr'
)
is
not
None
:
tun
=
Tun
(
partition_dict
[
'tun'
][
'name'
],
partition_index
,
len
(
dumped_dict
[
'partition_list'
])
)
tun
=
Tun
(
partition_dict
[
'tun'
][
'name'
],
partition_index
,
partition_amount
)
tun
.
ipv4_addr
=
partition_dict
[
'tun'
][
'ipv4_addr'
]
else
:
tun
=
Tun
(
"slaptun"
+
str
(
partition_index
),
partition_index
,
len
(
dumped_dict
[
'partition_list'
])
)
tun
=
Tun
(
"slaptun"
+
str
(
partition_index
),
partition_index
,
partition_amount
)
address_list
=
partition_dict
[
'address_list'
]
external_storage_list
=
partition_dict
.
get
(
'external_storage_list'
,
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment