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
Ludovic Kiefer
erp5
Commits
f57a41cc
Commit
f57a41cc
authored
Jul 22, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify imports and make them diff friendly.
parent
f3a14222
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+6
-3
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+8
-5
No files found.
erp5/util/testnode/SlapOSControler.py
View file @
f57a41cc
...
@@ -24,8 +24,11 @@
...
@@ -24,8 +24,11 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
##############################################################################
##############################################################################
import
slapos.slap
,
subprocess
,
os
,
time
import
os
from
xml_marshaller
import
xml_marshaller
import
slapos.slap
import
subprocess
import
time
import
xml_marshaller
class
SlapOSControler
(
object
):
class
SlapOSControler
(
object
):
...
@@ -60,7 +63,7 @@ class SlapOSControler(object):
...
@@ -60,7 +63,7 @@ class SlapOSControler(object):
if
not
os
.
path
.
exists
(
partition_path
):
if
not
os
.
path
.
exists
(
partition_path
):
os
.
mkdir
(
partition_path
)
os
.
mkdir
(
partition_path
)
os
.
chmod
(
partition_path
,
0750
)
os
.
chmod
(
partition_path
,
0750
)
computer
.
updateConfiguration
(
xml_marshaller
.
dumps
({
computer
.
updateConfiguration
(
xml_marshaller
.
xml_marshaller
.
dumps
({
'address'
:
config
[
'ipv4_address'
],
'address'
:
config
[
'ipv4_address'
],
'instance_root'
:
config
[
'instance_root'
],
'instance_root'
:
config
[
'instance_root'
],
'netmask'
:
'255.255.255.255'
,
'netmask'
:
'255.255.255.255'
,
...
...
erp5/util/testnode/testnode.py
View file @
f57a41cc
...
@@ -24,13 +24,16 @@
...
@@ -24,13 +24,16 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
##############################################################################
##############################################################################
import
os
,
xmlrpclib
,
time
import
os
import
pprint
import
signal
import
signal
import
socket
import
subprocess
import
subprocess
import
sys
import
sys
import
socket
import
time
import
pprint
import
xmlrpclib
from
SlapOSControler
import
SlapOSControler
import
SlapOSControler
class
SubprocessError
(
EnvironmentError
):
class
SubprocessError
(
EnvironmentError
):
def
__init__
(
self
,
status_dict
):
def
__init__
(
self
,
status_dict
):
...
@@ -226,7 +229,7 @@ branch = %(branch)s
...
@@ -226,7 +229,7 @@ branch = %(branch)s
updater
.
checkout
()
updater
.
checkout
()
# Now prepare the installation of SlapOS and create instance
# Now prepare the installation of SlapOS and create instance
slapos_controler
=
SlapOSControler
(
config
,
slapos_controler
=
SlapOSControler
.
SlapOSControler
(
config
,
process_group_pid_set
=
process_group_pid_set
,
log
=
log
)
process_group_pid_set
=
process_group_pid_set
,
log
=
log
)
for
method_name
in
(
"runSoftwareRelease"
,
"runComputerPartition"
):
for
method_name
in
(
"runSoftwareRelease"
,
"runComputerPartition"
):
stdout
,
stderr
=
getInputOutputFileList
(
config
,
method_name
)
stdout
,
stderr
=
getInputOutputFileList
(
config
,
method_name
)
...
...
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