cinder/cinder/tests/unit/zonemanager
Gorka Eguileor 6dbd08b491 Brocade: Fix AttributeError when raising exception
When we moved Brocade exceptions from cinder.exception to
cinder.zonemanager.drivers.broade.exception we missed one file,
brcd_rest_fc_zone_client, so when we use that file (setting
`fc_southbound_protocol = REST_HTTP`) if it tries to raise an exception
we end up seeing:

  AttributeError: module 'cinder.exception' has no attribute
  'BrocadeZoningRestException'

The CI didn't catch it because there are no unit tests for the
brcd_rest_fc_zone_client.py file.

This patch fixes the issue by changing the import so it gets the
exceptions from the Brocade file and it also adds some tests for the
first half (211 lines) of the code in the brcd_rest_fc_zone_client.py
file.

TrivialFix
Closes-Bug: #1866860
Change-Id: Idfdb8796d5f4b650aa762e54a189c9ab48f93d1a
2020-07-29 10:14:12 +02:00
..
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
test_brcd_fc_san_lookup_service.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_brcd_fc_zone_client_cli.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_brcd_fc_zone_driver.py Brocade: Python 3 support 2020-07-29 10:12:48 +02:00
test_brcd_http_fc_zone_client.py Brocade: Python 3 support 2020-07-29 10:12:48 +02:00
test_brcd_lookup_service.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_brcd_rest_fc_zone_client.py Brocade: Fix AttributeError when raising exception 2020-07-29 10:14:12 +02:00
test_cisco_fc_san_lookup_service.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_cisco_fc_zone_client_cli.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_cisco_fc_zone_driver.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_cisco_lookup_service.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_driverutils.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_fc_zone_manager.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00
test_volume_driver.py Move unit test code under tests/unit/ 2020-04-30 18:13:54 -04:00