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:
armando-migliaccio 2013-05-08 11:33:07 -07:00
parent b240ad472b
commit 7c025fedc3
10 changed files with 37 additions and 5 deletions

View File

@ -43,13 +43,12 @@ source $TOP_DIR/functions
# Import configuration
source $TOP_DIR/openrc
# If quantum is not enabled we exit with exitcode 55 which mean
# exercise is skipped.
is_service_enabled quantum && is_service_enabled q-agt && is_service_enabled q-dhcp || exit 55
# Import quantum fucntions
# Import quantum functions
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
source $TOP_DIR/exerciserc

View File

@ -34,3 +34,5 @@ functions
* ``quantum_plugin_setup_interface_driver``
* ``has_quantum_plugin_security_group``:
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

View File

@ -56,5 +56,9 @@ function has_quantum_plugin_security_group() {
return 1
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$MY_XTRACE

View File

@ -50,5 +50,9 @@ function has_quantum_plugin_security_group() {
return 0
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$BRCD_XTRACE

View File

@ -86,5 +86,9 @@ function has_quantum_plugin_security_group() {
return 0
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$MY_XTRACE

View File

@ -118,5 +118,9 @@ function has_quantum_plugin_security_group() {
return 0
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$MY_XTRACE

View File

@ -146,5 +146,9 @@ function has_quantum_plugin_security_group() {
return 0
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$MY_XTRACE

View File

@ -144,5 +144,9 @@ function has_quantum_plugin_security_group() {
return 0
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$MY_XTRACE

View File

@ -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
$MY_XTRACE

View File

@ -71,5 +71,9 @@ function has_quantum_plugin_security_group() {
return 0
}
function quantum_plugin_check_adv_test_requirements() {
is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
}
# Restore xtrace
$MY_XTRACE