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
Amer
erp5
Commits
f1db96b4
Commit
f1db96b4
authored
Jun 13, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Up
parent
8cbe95f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+11
-7
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
f1db96b4
...
@@ -57,13 +57,11 @@ class ScalabilityTestRunner():
...
@@ -57,13 +57,11 @@ class ScalabilityTestRunner():
certificate
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountCertificate
()
certificate
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountCertificate
()
self
.
slapos_controler
.
createSlaposConfigurationFileAccount
(
key
,
certificate
,
self
.
slapos_controler
.
createSlaposConfigurationFileAccount
(
key
,
certificate
,
self
.
testnode
.
config
,
self
.
testnode
.
log
)
self
.
testnode
.
config
,
self
.
testnode
.
log
)
# {'COMPX' : ['soft_path1.cfg', 'soft_path2.cfg'],
# {'COMPX' : ['soft_path1.cfg', 'soft_path2.cfg'],
# 'COMPY' : ['soft_path1.cfg'], ... }
# 'COMPY' : ['soft_path1.cfg'], ... }
self
.
remaining_software_installation_grid
=
{}
self
.
remaining_software_installation_grid
=
{}
# Protection to prevent installation of softwares after checking
# Protection to prevent installation of softwares after checking
self
.
authorize_supply
=
True
self
.
authorize_supply
=
True
def
_prepareSlapOS
(
self
,
software_path
,
computer_guid
,
create_partition
=
0
):
def
_prepareSlapOS
(
self
,
software_path
,
computer_guid
,
create_partition
=
0
):
# create_partition is kept for compatibility
# create_partition is kept for compatibility
...
@@ -94,6 +92,10 @@ class ScalabilityTestRunner():
...
@@ -94,6 +92,10 @@ class ScalabilityTestRunner():
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
def
isSoftwareReleaseReady
(
self
,
software_url
,
computer_guid
):
def
isSoftwareReleaseReady
(
self
,
software_url
,
computer_guid
):
"""
Return true if the specified software on the specified node is installed.
This method should communicates with SlapOS Master.
"""
# TODO : implement this method
# TODO : implement this method
# -> communication with SlapOS master
# -> communication with SlapOS master
# todo : simulate slapOS Master answer
# todo : simulate slapOS Master answer
...
@@ -101,7 +103,7 @@ class ScalabilityTestRunner():
...
@@ -101,7 +103,7 @@ class ScalabilityTestRunner():
def
remainSoftwareToInstall
(
self
):
def
remainSoftwareToInstall
(
self
):
"""
"""
Return True if
all softwares are not installed
, otherwise return False
Return True if
it remains softwares to install
, otherwise return False
"""
"""
# Remove from grid installed software entries
# Remove from grid installed software entries
for
computer_guid
,
v
in
self
.
remaining_software_installation_grid
.
items
():
for
computer_guid
,
v
in
self
.
remaining_software_installation_grid
.
items
():
...
@@ -121,7 +123,7 @@ class ScalabilityTestRunner():
...
@@ -121,7 +123,7 @@ class ScalabilityTestRunner():
max_time
=
3600
*
10
*
1.0
# 10 hours
max_time
=
3600
*
10
*
1.0
# 10 hours
interval_time
=
30
interval_time
=
30
start_time
=
time
.
time
()
start_time
=
time
.
time
()
#
#
Only master testnode must order software installation
if
self
.
testnode
.
test_suite_portal
.
isValidatedMaster
(
if
self
.
testnode
.
test_suite_portal
.
isValidatedMaster
(
self
.
testnode
.
config
[
'test_node_title'
]):
self
.
testnode
.
config
[
'test_node_title'
]):
# Get from ERP5 Master the configuration of the cluster for the test
# Get from ERP5 Master the configuration of the cluster for the test
...
@@ -137,13 +139,11 @@ class ScalabilityTestRunner():
...
@@ -137,13 +139,11 @@ class ScalabilityTestRunner():
self
.
testnode
.
log
(
"Test suite %s is not actually launchable with
\
self
.
testnode
.
log
(
"Test suite %s is not actually launchable with
\
the current cluster configuration."
%
(
node_test_suite
.
test_suite_title
,))
the current cluster configuration."
%
(
node_test_suite
.
test_suite_title
,))
self
.
testnode
.
log
(
"ERP5 Master indicates : %s"
%
(
self
.
error_message
,))
self
.
testnode
.
log
(
"ERP5 Master indicates : %s"
%
(
self
.
error_message
,))
# error : wich code to return ?
# wich code to return ?
return
{
'status_code'
:
1
}
return
{
'status_code'
:
1
}
involved_nodes_computer_guid
=
test_configuration
[
'involved_nodes_computer_guid'
]
involved_nodes_computer_guid
=
test_configuration
[
'involved_nodes_computer_guid'
]
configuration_list
=
test_configuration
[
'configuration_list'
]
configuration_list
=
test_configuration
[
'configuration_list'
]
launcher_nodes_computer_guid
=
test_configuration
[
'launcher_nodes_computer_guid'
]
launcher_nodes_computer_guid
=
test_configuration
[
'launcher_nodes_computer_guid'
]
software_path_list
=
[]
software_path_list
=
[]
# Here add the ipv6 url reachable from master profile
# Here add the ipv6 url reachable from master profile
software_path_list
.
append
(
"http://foo.bar/It_is_a_test_for_scalability_test/My_unreachable_profile.cfg"
)
software_path_list
.
append
(
"http://foo.bar/It_is_a_test_for_scalability_test/My_unreachable_profile.cfg"
)
...
@@ -179,4 +179,8 @@ class ScalabilityTestRunner():
...
@@ -179,4 +179,8 @@ class ScalabilityTestRunner():
pass
pass
def
getRelativePathUsage
(
self
):
def
getRelativePathUsage
(
self
):
"""
Used by the method testnode.constructProfile() to know
if the software.cfg have to use relative path or not.
"""
return
True
return
True
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