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
5f310a41
Commit
5f310a41
authored
Mar 14, 2018
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tesnode: more generic get frontend information method in slapos master communicator
parent
162fc8e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
erp5/util/testnode/SlapOSMasterCommunicator.py
erp5/util/testnode/SlapOSMasterCommunicator.py
+5
-13
No files found.
erp5/util/testnode/SlapOSMasterCommunicator.py
View file @
5f310a41
...
@@ -104,7 +104,7 @@ class SlapOSMasterCommunicator(object):
...
@@ -104,7 +104,7 @@ class SlapOSMasterCommunicator(object):
self
.
latest_state
=
state
self
.
latest_state
=
state
return
self
.
slap_order
.
request
(
return
self
.
slap_order
.
request
(
software_release
=
self
.
url
,
software_release
=
self
.
url
,
software_type
=
"RootSoftwareInstance"
,
software_type
=
software_type
,
partition_reference
=
self
.
name
,
partition_reference
=
self
.
name
,
shared
=
shared
,
shared
=
shared
,
state
=
state
,
state
=
state
,
...
@@ -450,9 +450,11 @@ class SlapOSTester(SlapOSMasterCommunicator):
...
@@ -450,9 +450,11 @@ class SlapOSTester(SlapOSMasterCommunicator):
pass
pass
return
{
'instance_guid'
:
self
.
instance
.
getInstanceGuid
(),
'frontend_master_ipv6'
:
frontend_master_ipv6
}
return
{
'instance_guid'
:
self
.
instance
.
getInstanceGuid
(),
'frontend_master_ipv6'
:
frontend_master_ipv6
}
# XXX TODO
# In the future, this should allow customization so each project to be tested parses its own information,
# probably in the test suite definition class
def
getInstanceUrlDict
(
self
):
def
getInstanceUrlDict
(
self
):
frontend_url_list
=
[]
frontend_url_list
=
[]
zope_address_list
=
[]
for
instance
in
self
.
getInstanceUrlList
():
for
instance
in
self
.
getInstanceUrlList
():
information
=
self
.
getInformationFromInstance
(
instance
[
"href"
])
information
=
self
.
getInformationFromInstance
(
instance
[
"href"
])
if
"frontend-"
in
instance
[
"title"
]:
if
"frontend-"
in
instance
[
"title"
]:
...
@@ -472,17 +474,7 @@ class SlapOSTester(SlapOSMasterCommunicator):
...
@@ -472,17 +474,7 @@ class SlapOSTester(SlapOSMasterCommunicator):
password
=
connection_json
[
"inituser-password"
]
password
=
connection_json
[
"inituser-password"
]
except
Exception
as
e
:
except
Exception
as
e
:
raise
ValueError
(
"user and password not found in connection parameters. Error while instantiating?"
)
raise
ValueError
(
"user and password not found in connection parameters. Error while instantiating?"
)
if
"zope-"
in
instance
[
"title"
]:
return
{
'user'
:
user
,
'password'
:
password
,
'frontend-url-list'
:
frontend_url_list
}
try
:
connection_dict
=
information
[
"connection_dict"
][
"_"
]
address
=
json
.
loads
(
connection_dict
)[
"zope-address-list"
][
0
][
0
]
zope
=
[
instance
[
"title"
].
replace
(
"zope-"
,
""
),
address
]
zope_address_list
.
append
(
zope
)
except
Exception
as
e
:
logger
.
info
(
"zope address not found in connection parameters. Error while instantiating?"
)
pass
return
{
'zope-address-list'
:
zope_address_list
,
'user'
:
user
,
'password'
:
password
,
'frontend-url-list'
:
frontend_url_list
}
class
SoftwareReleaseTester
(
SlapOSTester
):
class
SoftwareReleaseTester
(
SlapOSTester
):
deadline
=
None
deadline
=
None
...
...
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