How to use prepare_instance_network method in tempest

Best Python code snippet using tempest_python

test_sf_servers.py

Source:test_sf_servers.py Github

copy

Full Screen

...21CONF = config.CONF22class SfCreateServersTestJSON(sf_base.SfBaseV2ComputeTest):23 # @classmethod24 # def setup_credentials(cls):25 # cls.prepare_instance_network()26 # super(SfCreateServersTestJSON, cls).setup_credentials()27 # if uncomment these codes, as execute create_test_server and28 # create_sf_server at the same time, it would make this testcase failed.29 # but at the cost of comments, the server of create_test_server() is error.30 @test.attr(type='smoke')31 @test.idempotent_id('748f32b7-1133-41ce-9875-5518931163e6')32 def test_sf_create_server_with_datadisk(self):33 self.create_sf_server()34 @test.attr(type='smoke')35 @test.idempotent_id('f5c22d1b-5dd4-4634-a27b-31d06843d09f')36 def test_sf_multi_create_server(self):37 # create two servers at the same time38 num = 239 self.create_sf_server(max_count=num, min_count=num)40class SfUpdateServersTestJSON(sf_base.SfBaseV2ComputeTest):41 """testcase for update server cpu and ram"""42 # @classmethod43 # def setup_credentials(cls):44 # cls.prepare_instance_network()45 # super(SfUpdateServersTestJSON, cls).setup_credentials()46 @classmethod47 def resource_setup(cls):48 super(SfUpdateServersTestJSON, cls).resource_setup()49 cls.server = cls.create_sf_server()50 @test.attr(type='smoke')51 @test.idempotent_id('e6cffbdf-c4c1-4718-ae43-d1020dec2efc')52 def test_sf_update_server_cpu(self):53 cpu = 254 self.stop_server(self.server['id'])55 server = self.servers_client.update_server(self.server['id'], cpu=cpu)56 waiters.wait_for_server_status(self.servers_client, self.server['id'],57 u'SHUTOFF')58 flavor = self.flavors_client.show_flavor(server['flavor']['id'])...

Full Screen

Full Screen

test_ips_rbac.py

Source:test_ips_rbac.py Github

copy

Full Screen

...29 raise cls.skipException(30 '%s skipped as Neutron is required' % cls.__name__)31 @classmethod32 def setup_credentials(cls):33 cls.prepare_instance_network()34 super(IpsRbacTest, cls).setup_credentials()35 @classmethod36 def resource_setup(cls):37 super(IpsRbacTest, cls).resource_setup()38 cls.server = cls.create_test_server(wait_until='ACTIVE')39 @decorators.idempotent_id('6886d360-0d86-4760-b1a3-882d81fbebcc')40 @rbac_rule_validation.action(41 service="nova",42 rule="os_compute_api:ips:index")43 def test_list_addresses(self):44 self.rbac_utils.switch_role(self, toggle_rbac_role=True)45 self.servers_client.list_addresses(self.server['id'])['addresses']46 @decorators.idempotent_id('fa43e7e5-0db9-48eb-9c6b-c11eb766b8e4')47 @rbac_rule_validation.action(...

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