How to use test_live_block_migration method in tempest

Best Python code snippet using tempest_python

test_live_migration.py

Source:test_live_migration.py Github

copy

Full Screen

...69 @test.idempotent_id('1dce86b8-eb04-4c03-a9d8-9c1dc3ee0c7b')70 @testtools.skipIf(not CONF.compute_feature_enabled.live_migration,71 'Live migration not available')72 @test.attr(type='gate')73 def test_live_block_migration(self):74 # Live block migrate an instance to another host75 if len(self._get_compute_hostnames()) < 2:76 raise self.skipTest(77 "Less than 2 compute nodes, skipping migration test.")78 server_id = self._get_an_active_server()79 actual_host = self._get_host_for_server(server_id)80 target_host = self._get_host_other_than(actual_host)81 self._migrate_server_to(server_id, target_host)82 self.servers_client.wait_for_server_status(server_id, 'ACTIVE')83 self.assertEqual(target_host, self._get_host_for_server(server_id))84 @test.idempotent_id('e19c0cc6-6720-4ed8-be83-b6603ed5c812')85 @testtools.skipIf(not CONF.compute_feature_enabled.live_migration or not86 CONF.compute_feature_enabled.87 block_migration_for_live_migration,...

Full Screen

Full Screen

test_live_block_migration.py

Source:test_live_block_migration.py Github

copy

Full Screen

...74 return server_id75 @attr(type='positive')76 @testtools.skipIf(not live_migration_available,77 'Block Live migration not available')78 def test_live_block_migration(self):79 # Live block migrate an instance to another host80 if len(self._get_compute_hostnames()) < 2:81 raise self.skipTest(82 "Less than 2 compute nodes, skipping migration test.")83 server_id = self._get_an_active_server()84 actual_host = self._get_host_for_server(server_id)85 target_host = self._get_host_other_than(actual_host)86 self._migrate_server_to(server_id, target_host)87 self.servers_client.wait_for_server_status(server_id, 'ACTIVE')88 self.assertEquals(target_host, self._get_host_for_server(server_id))89 @testtools.skipIf(not live_migration_available,90 'Block Live migration not available')91 def test_invalid_host_for_migration(self):92 # Migrating to an invalid host should not change the status...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful