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
Ekaterina
erp5
Commits
76331189
Commit
76331189
authored
Jul 29, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: SlapOSMasterCommunicator: remove unused methods
parent
a83e16c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
+0
-29
erp5/util/testnode/SlapOSMasterCommunicator.py
erp5/util/testnode/SlapOSMasterCommunicator.py
+0
-29
No files found.
erp5/util/testnode/SlapOSMasterCommunicator.py
View file @
76331189
...
...
@@ -17,9 +17,6 @@ class SlapOSMasterCommunicator(object):
# Try to reuse same communicator, because initilization step may takes a lot of time
# due to listing of all instances (alive or not) related to the specified slapOS account.
communicator = SlapOSMasterCommunicator()
# Know if 'TestScalability_21423104630420' requested status is corresponding as excepted (True/Flase)
print communicator.isHostingSubscriptionCorrect('TestScalability_21423104630420')
# Print news related to 'TestScalability_21423104630420' all instances
instance_link_list = communicator._getRelatedInstanceLink('TestScalability_21423104630420')
...
...
@@ -142,32 +139,6 @@ class SlapOSMasterCommunicator(object):
return
False
return
len
(
related_instance_link_list
)
>
0
# check if requested state = status
def
isInstanceCorrect
(
self
,
instance_link
):
"""
Return True if instance status and instance news text ~looks corresponding.
( use the matching of 'correctly' and 'Instance' and status )
"""
instance
=
self
.
_curl
(
instance_link
)
news_link
=
instance
[
'_links'
][
'http://slapos.org/reg/news'
]
news
=
self
.
_curl
(
news_link
)
text
=
news
[
'news'
][
0
][
'text'
]
requested_status
=
instance
[
'status'
]
return
(
'Instance'
in
text
)
and
(
'correctly'
in
text
)
and
(
requested_status
in
text
)
# check if requested state = status
def
isHostingSubscriptionCorrect
(
self
,
hosting_subscription_title
):
"""
Return True if all instance news related to hosting_subscription_title
correspond to the requested status.
"""
instance_link_list
=
self
.
_getRelatedInstanceLink
(
hosting_subscription_title
)
for
instance_link
in
instance_link_list
:
if
not
communicator
.
isInstanceCorrect
(
instance_link
):
return
False
return
len
(
instance_link_list
)
>
0
# check if provided 'status' = status
def
isInstanceCorrectly
(
self
,
instance_link
,
status
):
"""
Return True if instance status and instance news text ~looks corresponding.
...
...
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