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
3277682e
Commit
3277682e
authored
Jun 12, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Many change in SlapOSControler
parent
4f37b09f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
10 deletions
+36
-10
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+12
-0
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+5
-8
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+19
-2
No files found.
erp5/util/taskdistribution/__init__.py
View file @
3277682e
...
...
@@ -475,6 +475,18 @@ class TaskDistributor(RPCRetry):
"""
return
self
.
_retryRPC
(
'isValidatedMaster'
,
(
test_node_title
,))
def
getSlaposAccountKey
(
self
):
"""
Returns the slapos account key related to the distributor
"""
return
self
.
_retryRPC
(
'getSlaposAccountKey'
)
def
getSlaposAccountCertificate
(
self
):
"""
Returns the slapos account certificate related to the distributor
"""
return
self
.
_retryRPC
(
'getSlaposAccountCertificate'
)
def
getFooFooFoo
(
self
):
"""
Returns "FooFooFoo"
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
3277682e
...
...
@@ -52,6 +52,11 @@ class ScalabilityTestRunner():
self
.
testnode
.
working_directory
,
self
.
testnode
.
config
,
self
.
testnode
.
log
)
# Create the slapos account configuration file and dir
key
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountKey
()
certificate
=
self
.
testnode
.
test_suite_portal
.
getSlaposAccountCertificate
()
self
.
slapos_controler
.
createSlaposConfigurationFileAccount
(
key
,
certificate
)
# {'COMPX' : ['soft_path1.cfg', 'soft_path2.cfg'],
# 'COMPY' : ['soft_path1.cfg'], ... }
self
.
remaining_software_installation_grid
=
{}
...
...
@@ -126,14 +131,6 @@ the current cluster configuration." %(node_test_suite.test_suite_title,))
configuration_list
=
test_configuration
[
'configuration_list'
]
launcher_nodes_computer_guid
=
test_configuration
[
'launcher_nodes_computer_guid'
]
print
"launcher_nodes_computer_guid:"
print
launcher_nodes_computer_guid
print
"involved_nodes_computer_guid:"
print
involved_nodes_computer_guid
print
"configuration_list:"
print
configuration_list
software_path_list
=
[]
for
software_path
in
software_path_list
:
for
computer_guid
in
self
.
involved_nodes_computer_guid
:
...
...
erp5/util/testnode/SlapOSControler.py
View file @
3277682e
...
...
@@ -67,8 +67,24 @@ class SlapOSControler(object):
self
.
slapos_config
=
os
.
path
.
join
(
working_directory
,
'slapos.cfg'
)
self
.
log
=
log
self
.
proxy_database
=
os
.
path
.
join
(
working_directory
,
'proxy.db'
)
#self.configuration_path_file = self.config['configuration_path_file']
self
.
configuration_path_file
=
""
def
createSlaposConfigurationFileAccount
(
key
,
certificate
):
# Create "slapos_account" directory in the "slapos_directory"
slapos_account_directory
=
os
.
path
.
join
(
self
.
config
[
'slapos_directory'
],
"slapos_account"
)
SlapOSControler
.
createFolder
(
slapos_account_directory
)
# Create slapos-account files
slapos_account_key_path
=
os
.
path
.
join
(
slapos_account_directory
,
"key"
)
slapos_account_certificate_path
=
os
.
path
.
join
(
slapos_account_directory
,
"certificate"
)
configuration_file_path
=
os
.
path
.
join
(
slapos_account_directory
,
"slapos.cfg"
)
configuration_file_value
=
"[slapos]
\
n
master_url = %s
\
n
\
[slapconsole]
\
n
cert_file = %s
\
n
key_file = %s"
%
(
self
.
config
[
'server_url'
],
slapos_account_certificate_path
,
slapos_account_key_path
)
SlapOSControler
.
createFile
(
slapos_account_key_path
,
"w"
,
key
)
SlapOSControler
.
createFile
(
slapos_account_certificate_path
,
"w"
,
certificate
)
SlapOSControler
.
createFile
(
configuration_file_path
,
"w"
,
configuration_file_value
)
self
.
configuration_file_path
=
configuration_file_path
def
supply
(
self
,
software_url
,
computer_id
,
remove
=
False
):
"""
...
...
@@ -77,6 +93,7 @@ class SlapOSControler(object):
my_controler.supply('kvm.cfg', 'COMP-726')
"""
# TODO : remove return
print
"Ben:I GONNE SEARCH MY SLAPOS CONFIG FILE THERE : %s"
%
self
.
configuration_file_path
return
self
.
log
(
'SlapOSControler : supply'
)
parser
=
argparse
.
ArgumentParser
()
...
...
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