Best Python code snippet using tempest_python
test_live_migration.py
Source:test_live_migration.py
...155 # At this step we have 2 instances on different hosts, both with156 # serial consoles, both with port 10000 (the default value).157 # https://bugs.launchpad.net/nova/+bug/1455252 describes the issue158 # when live-migrating in such a scenario.159 self._verify_console_interaction(server01_id)160 self._verify_console_interaction(server02_id)161 self._migrate_server_to(server01_id, host02_id)162 waiters.wait_for_server_status(self.servers_client,163 server01_id, 'ACTIVE')164 self.assertEqual(host02_id, self.get_host_for_server(server01_id))165 self._verify_console_interaction(server01_id)166 # At this point, both instances have a valid serial console167 # connection, which means the ports got updated.168 def _verify_console_interaction(self, server_id):169 body = self.servers_client.get_remote_console(server_id,170 console_type='serial',171 protocol='serial')172 console_url = body['remote_console']['url']173 data = "test_live_migration_serial_console"174 console_output = ''175 t = 0.0176 interval = 0.1177 ws = compute.create_websocket(console_url)178 try:179 # NOTE (markus_z): It can take a long time until the terminal180 # of the instance is available for interaction. Hence the181 # long timeout value.182 while data not in console_output and t <= 120.0:...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!