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
5309bdf4
Commit
5309bdf4
authored
Aug 20, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: ScalabilityTestRunner: Add getting slapos API REST url from ERP5 Master
parent
7ac59050
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+7
-0
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+20
-8
No files found.
erp5/util/taskdistribution/__init__.py
View file @
5309bdf4
...
@@ -576,6 +576,13 @@ class TaskDistributor(RPCRetry):
...
@@ -576,6 +576,13 @@ class TaskDistributor(RPCRetry):
"""
"""
return
self
.
_retryRPC
(
'getSlaposUrl'
)
return
self
.
_retryRPC
(
'getSlaposUrl'
)
def
getSlaposHateoasUrl
(
self
):
"""
Returns the url of API REST using hateoas of
slapos master related to the distributor
"""
return
self
.
_retryRPC
(
'getSlaposHateoasUrl'
)
class
DummyTaskDistributionTool
(
object
):
class
DummyTaskDistributionTool
(
object
):
"""
"""
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
5309bdf4
...
@@ -63,19 +63,31 @@ class ScalabilityTestRunner():
...
@@ -63,19 +63,31 @@ class ScalabilityTestRunner():
# Create the slapos account configuration file and dir
# Create the slapos account configuration file and dir
key
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountKey
()
key
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountKey
()
certificate
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountCertificate
()
certificate
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountCertificate
()
# Get Slapos Master Url
# Get Slapos Master Url
slapos_url
=
''
self
.
slapos_url
=
''
try
:
self
.
slapos_url
=
self
.
testnode
.
test_suite_portal
.
getSlaposUrl
()
if
not
self
.
slapos_url
:
self
.
slapos_url
=
self
.
testnode
.
config
[
'server_url'
]
except
:
self
.
slapos_url
=
self
.
testnode
.
config
[
'server_url'
]
# Get Slapos Master url used for api rest (using hateoas)
self
.
slapos_api_rest_url
=
""
try
:
try
:
s
lapos_url
=
self
.
testnode
.
test_suite_portal
.
getSlapo
sUrl
()
s
elf
.
slapos_api_rest_url
=
self
.
testnode
.
test_suite_portal
.
getSlaposHateoa
sUrl
()
if
not
s
lapos
_url
:
if
not
s
elf
.
slapos_api_rest
_url
:
s
lapos_url
=
self
.
testnode
.
config
[
'serv
er_url'
]
s
elf
.
slapos_api_rest_url
=
self
.
testnode
.
config
[
'hateoas_slapos_mast
er_url'
]
except
:
except
:
slapos_url
=
self
.
testnode
.
config
[
'server_url'
]
self
.
slapos_api_rest_url
=
self
.
testnode
.
config
[
'hateoas_slapos_master_url'
]
self
.
log
(
"SlapOS Master url is: %s"
%
slapos_url
)
self
.
log
(
"SlapOS Master url is: %s"
%
s
elf
.
s
lapos_url
)
self
.
key_path
,
self
.
cert_path
,
config_path
=
self
.
slapos_controler
.
createSlaposConfigurationFileAccount
(
self
.
key_path
,
self
.
cert_path
,
config_path
=
self
.
slapos_controler
.
createSlaposConfigurationFileAccount
(
key
,
certificate
,
slapos_url
,
self
.
testnode
.
config
)
key
,
certificate
,
s
elf
.
s
lapos_url
,
self
.
testnode
.
config
)
self
.
slapos_communicator
=
None
self
.
slapos_communicator
=
None
self
.
remaining_software_installation_dict
=
{}
self
.
remaining_software_installation_dict
=
{}
...
@@ -250,7 +262,7 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
...
@@ -250,7 +262,7 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
self
.
cert_path
,
self
.
cert_path
,
self
.
key_path
,
self
.
key_path
,
self
.
log
,
self
.
log
,
self
.
testnode
.
config
[
'hateoas_slapos_master_url'
]
)
self
.
slapos_api_rest_url
)
# Only master testnode must order software installation
# Only master testnode must order software installation
if
self
.
testnode
.
test_suite_portal
.
isMasterTestnode
(
if
self
.
testnode
.
test_suite_portal
.
isMasterTestnode
(
self
.
testnode
.
config
[
'test_node_title'
]):
self
.
testnode
.
config
[
'test_node_title'
]):
...
...
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