How to use _test_create_server_negative method in tempest

Best Python code snippet using tempest_python

test_network_qos_placement.py

Source:test_network_qos_placement.py Github

copy

Full Screen

...635 self.assert_allocations(server, port, min_kbps, min_kpps)636 self.servers_client.delete_server(server['id'])637 waiters.wait_for_server_termination(self.servers_client, server['id'])638 self.assert_no_allocation(server, port)639 def _test_create_server_negative(self, min_kbps=1000, min_kpps=100):640 policy = self._create_qos_policy_with_bw_and_pps_rules(641 min_kbps, min_kpps)642 port = self._create_port_with_qos_policy(policy)643 server = self.create_server(644 networks=[{'port': port['id']}],645 wait_until=None)646 waiters.wait_for_server_status(647 client=self.servers_client, server_id=server['id'],648 status='ERROR', ready_wait=False, raise_on_error=False)649 # check that the creation failed with No valid host650 server = self.servers_client.show_server(server['id'])['server']651 self.assertIn('fault', server)652 self.assertIn('No valid host', server['fault']['message'])653 self.assert_no_allocation(server, port)654 @decorators.idempotent_id('915dd2ce-4890-40c8-9db6-f3e04080c6c1')655 @utils.services('compute', 'network')656 def test_server_create_no_valid_host_due_to_bandwidth(self):657 self._test_create_server_negative(min_kbps=self.PLACEMENT_MAX_INT)658 @decorators.idempotent_id('2d4a755e-10b9-4ac0-bef2-3f89de1f150b')659 @utils.services('compute', 'network')660 def test_server_create_no_valid_host_due_to_packet_rate(self):661 self._test_create_server_negative(min_kpps=self.PLACEMENT_MAX_INT)662 @decorators.idempotent_id('69d93e4f-0dfc-4d17-8d84-cc5c3c842cd5')663 @testtools.skipUnless(664 CONF.compute_feature_enabled.resize, 'Resize not available.')665 @utils.services('compute', 'network')666 def test_server_resize(self):667 min_kbps = 1000668 min_kpps = 100669 policy = self._create_qos_policy_with_bw_and_pps_rules(670 min_kbps, min_kpps)671 port = self._create_port_with_qos_policy(policy)672 server = self.create_server(673 networks=[{'port': port['id']}],674 wait_until='ACTIVE'675 )...

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