Commit 806f1c72 authored by Benjamin Blanc's avatar Benjamin Blanc

testnode: SlapOSMasterCommunicator: rename methods

parent 76331189
......@@ -205,7 +205,7 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
"""
self.log("Wait for instance state: %s" %state)
start_time = time.time()
while (not self.slapos_communicator.isHostingSubscriptionCorrectly(instance_title, state)
while (not self.slapos_communicator.isHostingSubscriptionReady(instance_title, state)
and (max_time > (time.time()-start_time))):
time.sleep(15)
if (time.time()-start_time) > max_time:
......
......@@ -139,7 +139,7 @@ class SlapOSMasterCommunicator(object):
return False
return len(related_instance_link_list) > 0
def isInstanceCorrectly(self, instance_link, status):
def isInstanceReady(self, instance_link, status):
"""
Return True if instance status and instance news text ~looks corresponding.
( use the matching of 'correctly' and 'Instance' and status )
......@@ -148,14 +148,14 @@ class SlapOSMasterCommunicator(object):
return ('Instance' in text) and ('correctly' in text) and (status in text)
# check if provided 'status' = status
def isHostingSubscriptionCorrectly(self, hosting_subscription_title, status):
def isHostingSubscriptionReady(self, hosting_subscription_title, status):
"""
Return True if all instance status and instance news text ~looks corresponding.
( use the matching of 'correctly' and 'Instance' and status ).
"""
instance_link_list = self._getRelatedInstanceLink(hosting_subscription_title)
for instance_link in instance_link_list:
if not self.isInstanceCorrectly(instance_link, status):
if not self.isInstanceReady(instance_link, status):
return False
return len(instance_link_list) > 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment