How to use test_create_update_delete_network_subnet method in tempest

Best Python code snippet using tempest_python

test_networks.py

Source:test_networks.py Github

copy

Full Screen

...51 cls.subnet = cls.create_subnet(cls.network)52 cls.cidr = cls.subnet['cidr']53 cls.port = cls.create_port(cls.network)54 @attr(type='smoke')55 def test_create_update_delete_network_subnet(self):56 # Creates a network57 name = data_utils.rand_name('network-')58 resp, body = self.client.create_network(name)59 self.assertEqual('201', resp['status'])60 network = body['network']61 net_id = network['id']62 # Verification of network update63 new_name = "New_network"64 resp, body = self.client.update_network(net_id, new_name)65 self.assertEqual('200', resp['status'])66 updated_net = body['network']67 self.assertEqual(updated_net['name'], new_name)68 # Find a cidr that is not in use yet and create a subnet with it69 cidr = netaddr.IPNetwork(self.network_cfg.tenant_network_cidr)...

Full Screen

Full Screen

test_networks_nuage.py

Source:test_networks_nuage.py Github

copy

Full Screen

...87 self.networks_client.delete_network(net_id)88 self.networks.pop()89 self.subnets.pop()90 @test.attr(type='smoke')91 def test_create_update_delete_network_subnet(self):92 super(NetworksTestJSONNuage,93 self).test_create_update_delete_network_subnet()94 # VSD validation95 # Validate that an L2Domain is created on VSD for the subnet creation96 nuage_l2dom = self.nuage_vsd_client.get_l2domain(97 filters='externalID', filter_value=self.subnets[-1]['id'])98 self.assertEqual(nuage_l2dom[0]['name'], self.subnets[-1]['id'])99 @test.attr(type='smoke')100 def test_delete_network_with_subnet(self):101 # Creates a network102 name = data_utils.rand_name('network-')103 body = self.networks_client.create_network(name=name)104 network = body['network']105 net_id = network['id']106 self.addCleanup(self._try_delete_network, net_id)107 # Find a cidr that is not in use yet and create a subnet with it...

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