Commit 1cc7639a authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: check if remote instance is allocated

parent 9df847b4
...@@ -479,22 +479,23 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin): ...@@ -479,22 +479,23 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
def checkRemoteInstanceAllocation(self, person_user_id, person_reference, def checkRemoteInstanceAllocation(self, person_user_id, person_reference,
instance_title, software_release, software_type, server, instance_title, software_release, software_type, server,
project_reference): project_reference, connection_dict_to_check=None):
self.login(person_user_id) self.login(person_user_id)
self.personRequestInstanceNotReady( if connection_dict_to_check is None:
software_release=software_release, self.personRequestInstanceNotReady(
software_type=software_type, software_release=software_release,
partition_reference=instance_title, software_type=software_type,
project_reference=project_reference partition_reference=instance_title,
) project_reference=project_reference
)
self.checkCloudContract(person_user_id, person_reference, self.checkCloudContract(person_user_id, person_reference,
instance_title, software_release, software_type, server) instance_title, software_release, software_type, server)
self.stepCallSlaposAllocateInstanceAlarm() self.stepCallSlaposAllocateInstanceAlarm()
self.tic() self.tic()
self.personRequestInstance( self.personRequestInstance(
software_release=software_release, software_release=software_release,
...@@ -517,15 +518,14 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin): ...@@ -517,15 +518,14 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self.assertEqual(software_instance.getTitle(), self.assertEqual(software_instance.getTitle(),
instance_tree.getTitle()) instance_tree.getTitle())
connection_dict = software_instance.getConnectionXmlAsDict() connection_dict = software_instance.getConnectionXmlAsDict()
self.assertSameSet((), connection_dict.keys())
""" if connection_dict_to_check is None:
self.assertSameSet(('url_1', 'url_2'), connection_dict.keys()) connection_dict_to_check = {}
self.login()
partition = software_instance.getAggregateValue() self.assertSameSet(connection_dict_to_check.keys(), connection_dict.keys())
self.assertSameSet( self.assertSameSet(
['http://%s/' % q.getIpAddress() for q in connection_dict_to_check.values(),
partition.contentValues(portal_type='Internet Protocol Address')], connection_dict.values())
connection_dict.values())"""
def checkSlaveInstanceUnallocation(self, person_user_id, def checkSlaveInstanceUnallocation(self, person_user_id,
person_reference, instance_title, person_reference, instance_title,
......
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