Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
41a62737
Commit
41a62737
authored
Apr 22, 2015
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos format: drop limit of 4 data storage directory
parent
c6625b11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
slapos/format.py
slapos/format.py
+8
-5
No files found.
slapos/format.py
View file @
41a62737
...
...
@@ -37,6 +37,7 @@ import logging
import
netaddr
import
netifaces
import
os
import
glob
import
pwd
import
random
import
shutil
...
...
@@ -475,11 +476,13 @@ class Computer(object):
# get list of instance external storage if exist
instance_external_list
=
[]
if
self
.
instance_storage_home
:
# XXX - Hard limit for storage number to 4
for
i
in
range
(
1
,
5
):
storage_path
=
os
.
path
.
join
(
self
.
instance_storage_home
,
'data%s'
%
i
)
if
os
.
path
.
exists
(
storage_path
):
instance_external_list
.
append
(
storage_path
)
# get all /XXX/dataN where N is a digit
data_list
=
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_storage_home
,
'data*'
))
for
i
in
range
(
0
,
len
(
data_list
)):
data_path
=
data_list
.
pop
()
the_digit
=
os
.
path
.
basename
(
data_path
).
split
(
'data'
)[
-
1
]
if
the_digit
.
isdigit
():
instance_external_list
.
append
(
data_path
)
tap_address_list
=
[]
if
alter_network
and
self
.
tap_gateway_interface
and
create_tap
:
...
...
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