Check quantum status dependent on the plugin
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
This commit is contained in:
parent
b240ad472b
commit
7c025fedc3
@ -43,13 +43,12 @@ source $TOP_DIR/functions
|
|||||||
# Import configuration
|
# Import configuration
|
||||||
source $TOP_DIR/openrc
|
source $TOP_DIR/openrc
|
||||||
|
|
||||||
# If quantum is not enabled we exit with exitcode 55 which mean
|
# Import quantum functions
|
||||||
# exercise is skipped.
|
|
||||||
is_service_enabled quantum && is_service_enabled q-agt && is_service_enabled q-dhcp || exit 55
|
|
||||||
|
|
||||||
# Import quantum fucntions
|
|
||||||
source $TOP_DIR/lib/quantum
|
source $TOP_DIR/lib/quantum
|
||||||
|
|
||||||
|
# If quantum is not enabled we exit with exitcode 55, which means exercise is skipped.
|
||||||
|
quantum_plugin_check_adv_test_requirements || exit 55
|
||||||
|
|
||||||
# Import exercise configuration
|
# Import exercise configuration
|
||||||
source $TOP_DIR/exerciserc
|
source $TOP_DIR/exerciserc
|
||||||
|
|
||||||
|
@ -34,3 +34,5 @@ functions
|
|||||||
* ``quantum_plugin_setup_interface_driver``
|
* ``quantum_plugin_setup_interface_driver``
|
||||||
* ``has_quantum_plugin_security_group``:
|
* ``has_quantum_plugin_security_group``:
|
||||||
return 0 if the plugin support quantum security group otherwise return 1
|
return 0 if the plugin support quantum security group otherwise return 1
|
||||||
|
* ``quantum_plugin_check_adv_test_requirements``:
|
||||||
|
return 0 if requirements are satisfied otherwise return 1
|
||||||
|
@ -56,5 +56,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
@ -50,5 +50,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$BRCD_XTRACE
|
$BRCD_XTRACE
|
||||||
|
@ -86,5 +86,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
@ -118,5 +118,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
@ -146,5 +146,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
@ -144,5 +144,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
@ -35,5 +35,8 @@ function quantum_plugin_configure_debug_command() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
@ -71,5 +71,9 @@ function has_quantum_plugin_security_group() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quantum_plugin_check_adv_test_requirements() {
|
||||||
|
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$MY_XTRACE
|
$MY_XTRACE
|
||||||
|
Loading…
Reference in New Issue
Block a user