How to use test_show_host method in tempest

Best Python code snippet using tempest_python

test_volume_hosts.py

Source:test_volume_hosts.py Github

copy

Full Screen

...21 self.assertGreaterEqual(len(hosts), 2,22 "The count of volume hosts is < 2, "23 "response of list hosts is: %s" % hosts)24 @decorators.idempotent_id('21168d57-b373-4b71-a3ac-f2c88f0c5d31')25 def test_show_host(self):26 hosts = self.admin_hosts_client.list_hosts()['hosts']27 self.assertGreaterEqual(len(hosts), 2,28 "The count of volume hosts is < 2, "29 "response of list hosts is: %s" % hosts)30 # Note(jeremyZ): The show host API is to show volume usage info on the31 # specified cinder-volume host. If the host does not run cinder-volume32 # service, or the cinder-volume service is disabled on the host, the33 # show host API should fail (return code: 404). The cinder-volume host34 # is presented in format: <host-name>@driver-name.35 c_vol_hosts = [host['host_name'] for host in hosts36 if (host['service'] == 'cinder-volume' and37 host['service-state'] == 'enabled')]38 self.assertNotEmpty(c_vol_hosts,39 "No available cinder-volume host is found, "...

Full Screen

Full Screen

test_volume_hosts_rbac.py

Source:test_volume_hosts_rbac.py Github

copy

Full Screen

...24 self.volume_hosts_client.list_hosts()25 @decorators.idempotent_id('9ddf321e-788f-4787-b8cc-dfa59e264143')26 @rbac_rule_validation.action(service="cinder",27 rules=["volume_extension:hosts"])28 def test_show_host(self):29 hosts = self.volume_hosts_client.list_hosts()['hosts']30 host_names = [host['host_name'] for host in hosts]31 self.assertNotEmpty(host_names, "No available volume host was found, "32 "all hosts found were: %s" % hosts)33 with self.override_role():...

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