There are Quantum plugins that do not require the use of an agent.
This patch relaxes the constraint in quantum-adv-test.sh by adding
the ability to customize the logic that verifies whether the test
can run or not, depending on the Quantum plugin of your choice.
Fixes bug #1177904
Change-Id: I6e2c17f43d9e1475b2eb175cceb5107a83f9aa74
| ... | ... |
@@ -43,13 +43,12 @@ source $TOP_DIR/functions |
| 43 | 43 |
# Import configuration |
| 44 | 44 |
source $TOP_DIR/openrc |
| 45 | 45 |
|
| 46 |
-# If quantum is not enabled we exit with exitcode 55 which mean |
|
| 47 |
-# exercise is skipped. |
|
| 48 |
-is_service_enabled quantum && is_service_enabled q-agt && is_service_enabled q-dhcp || exit 55 |
|
| 49 |
- |
|
| 50 |
-# Import quantum fucntions |
|
| 46 |
+# Import quantum functions |
|
| 51 | 47 |
source $TOP_DIR/lib/quantum |
| 52 | 48 |
|
| 49 |
+# If quantum is not enabled we exit with exitcode 55, which means exercise is skipped. |
|
| 50 |
+quantum_plugin_check_adv_test_requirements || exit 55 |
|
| 51 |
+ |
|
| 53 | 52 |
# Import exercise configuration |
| 54 | 53 |
source $TOP_DIR/exerciserc |
| 55 | 54 |
|
| ... | ... |
@@ -34,3 +34,5 @@ functions |
| 34 | 34 |
* ``quantum_plugin_setup_interface_driver`` |
| 35 | 35 |
* ``has_quantum_plugin_security_group``: |
| 36 | 36 |
return 0 if the plugin support quantum security group otherwise return 1 |
| 37 |
+* ``quantum_plugin_check_adv_test_requirements``: |
|
| 38 |
+ return 0 if requirements are satisfied otherwise return 1 |