Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
a141a2f8
Commit
a141a2f8
authored
Apr 24, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid accessing the same key on each iteration.
parent
9fdf6765
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+3
-2
No files found.
erp5/util/testnode/SlapOSControler.py
View file @
a141a2f8
...
...
@@ -73,12 +73,13 @@ class SlapOSControler(object):
shutil
.
rmtree
(
software_root
)
os
.
mkdir
(
software_root
)
os
.
chmod
(
software_root
,
0750
)
instance_root
=
config
[
'instance_root'
]
for
i
in
range
(
0
,
MAX_PARTIONS
):
# create partition and configure computer
# XXX: at the moment all partitions do share same virtual interface address
# this is not a problem as usually all services are on different ports
partition_reference
=
'%s-%s'
%
(
config
[
'partition_reference'
],
i
)
partition_path
=
os
.
path
.
join
(
config
[
'instance_root'
]
,
partition_reference
)
partition_path
=
os
.
path
.
join
(
instance_root
,
partition_reference
)
if
os
.
path
.
exists
(
partition_path
):
# delete old paritions which may exists in order to not get its data (ex. MySQL db content)
# from previous testnode's runs
...
...
@@ -87,7 +88,7 @@ class SlapOSControler(object):
os
.
chmod
(
partition_path
,
0750
)
computer
.
updateConfiguration
(
xml_marshaller
.
xml_marshaller
.
dumps
({
'address'
:
config
[
'ipv4_address'
],
'instance_root'
:
config
[
'instance_root'
]
,
'instance_root'
:
instance_root
,
'netmask'
:
'255.255.255.255'
,
'partition_list'
:
[{
'address_list'
:
[{
'addr'
:
config
[
'ipv4_address'
],
'netmask'
:
'255.255.255.255'
},
...
...
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