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
alecs_myu
erp5
Commits
45e6d8fb
Commit
45e6d8fb
authored
Jul 17, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: add instance state getter
parent
9ea74ee8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+3
-0
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+10
-1
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
45e6d8fb
...
...
@@ -326,15 +326,18 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
count
=
0
for
configuration
in
configuration_list
:
# Stop instance
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
slapos_controler
.
stopInstance
(
self
.
instance_title
)
self
.
log
(
"Waiting for instance stop.."
)
self
.
_waitInstance
(
self
.
instance_title
)
# Update instance XML configuration
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
_updateInstanceXML
(
configuration
,
self
.
instance_title
,
node_test_suite
.
test_result
,
node_test_suite
.
test_suite
)
self
.
log
(
"Waiting for XML updating instance ready.."
)
self
.
_waitInstance
(
self
.
instance_title
)
# Start instance
self
.
log
(
"Instance state: %s"
,
self
.
slapos_controler
.
getInstanceState
(
self
.
instance_title
))
self
.
slapos_controler
.
startInstance
(
self
.
instance_title
)
self
.
log
(
"Waiting for instance start.."
)
self
.
_waitInstance
(
self
.
instance_title
)
...
...
erp5/util/testnode/SlapOSControler.py
View file @
45e6d8fb
...
...
@@ -135,6 +135,13 @@ class SlapOSControler(object):
except
:
raise
ValueError
(
"Instance '%s' not exist"
%
self
.
instance_config
[
reference
])
def
getInstanceState
(
self
,
reference
):
try
:
return
self
.
instance_config
[
reference
][
'partition'
].
getState
()
except
:
raise
ValueError
(
"Impossible to get the instance state, instance "
"'%s' may not exist"
%
self
.
instance_config
[
reference
])
def
request
(
self
,
reference
,
software_url
,
software_type
=
None
,
software_configuration
=
None
,
computer_guid
=
None
,
state
=
'started'
):
"""
...
...
@@ -154,7 +161,8 @@ class SlapOSControler(object):
'software_configuration'
:
software_configuration
,
'computer_guid'
:
computer_guid
,
'software_url'
:
software_url
,
'requested_state'
:
state
'requested_state'
:
state
,
'partition'
:
None
}
self
.
instance_config
[
reference
]
=
current_intance_config
...
...
@@ -176,6 +184,7 @@ class SlapOSControler(object):
software_type
=
software_type
,
filter_kw
=
filter_kw
,
state
=
state
)
self
.
instance_config
[
reference
][
'partition'
]
=
partition
# print "Instance requested.\nState is : %s." % partition.getState()
# Is it possible to have the true state of the instance with getState() ?
# Do a return partition ?
...
...
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