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
1
Issues
1
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
Roque
erp5
Commits
4de42e9d
Commit
4de42e9d
authored
Jun 18, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add method to generate title
parent
70d415b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+16
-8
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
4de42e9d
...
...
@@ -84,17 +84,24 @@ class ScalabilityTestRunner():
raise
ValueError
(
"Too late to supply now. ('self.authorize_supply' is False)"
)
return
{
'status_code'
:
1
}
def
_createInstance
(
self
,
software_path
,
software_configuration
,
test_suite_title
):
def
_generateInstancetitle
(
self
,
test_suite_title
):
"""
Generate an instance title using various parameter
TODO : add some verification (to don't use unexisting variables)
"""
instance_title
=
"Scalability-"
instance_title
+=
"("
+
test_suite_title
+
")-"
instance_title
+=
str
(
self
.
involved_nodes_computer_guid
).
replace
(
"'"
,
""
)
instance_title
+=
"-"
instance_title
+=
testnodeUtils
.
generateRandomString
(
6
)
return
instance_title
def
_createInstance
(
self
,
software_path
,
software_configuration
,
instance_title
):
"""
Launch instance
"""
if
self
.
authorize_request
:
instance_title
=
"Scalability-"
instance_title
+=
"("
+
test_suite_title
+
")-"
instance_title
+=
str
(
self
.
involved_nodes_computer_guid
).
replace
(
"'"
,
""
)
instance_title
+=
"-"
instance_title
+=
testnodeUtils
.
generateRandomString
(
6
)
software_configuration
[
'launcher-partition-list'
]
=
self
.
launcher_nodes_computer_guid
self
.
log
(
"testnode, request : %s"
,
instance_title
)
self
.
slapos_controler
.
request
(
instance_title
,
software_path
,
"scalability"
,
{
"_"
:
software_configuration
})
...
...
@@ -249,8 +256,9 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
try
:
# Launch instance
instance_title
=
self
.
_generateInstancetitle
(
node_test_suite
.
test_suite_title
)
self
.
_createInstance
(
self
.
reachable_profile
,
configuration_list
[
0
],
node_test_suite
.
test_suit
e_title
)
instanc
e_title
)
self
.
log
(
"Scalability instance requested"
)
except
:
self
.
log
(
"Unable to launch instance"
)
...
...
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