Browse code

Merge "Check quantum status dependent on the plugin"

Jenkins authored on 2013/05/15 00:04:34
Showing 10 changed files
... ...
@@ -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
... ...
@@ -56,5 +56,9 @@ function has_quantum_plugin_security_group() {
56 56
     return 1
57 57
 }
58 58
 
59
+function quantum_plugin_check_adv_test_requirements() {
60
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
61
+}
62
+
59 63
 # Restore xtrace
60 64
 $MY_XTRACE
... ...
@@ -50,5 +50,9 @@ function has_quantum_plugin_security_group() {
50 50
     return 0
51 51
 }
52 52
 
53
+function quantum_plugin_check_adv_test_requirements() {
54
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
55
+}
56
+
53 57
 # Restore xtrace
54 58
 $BRCD_XTRACE
... ...
@@ -86,5 +86,9 @@ function has_quantum_plugin_security_group() {
86 86
     return 0
87 87
 }
88 88
 
89
+function quantum_plugin_check_adv_test_requirements() {
90
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
91
+}
92
+
89 93
 # Restore xtrace
90 94
 $MY_XTRACE
... ...
@@ -118,5 +118,9 @@ function has_quantum_plugin_security_group() {
118 118
     return 0
119 119
 }
120 120
 
121
+function quantum_plugin_check_adv_test_requirements() {
122
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
123
+}
124
+
121 125
 # Restore xtrace
122 126
 $MY_XTRACE
... ...
@@ -146,5 +146,9 @@ function has_quantum_plugin_security_group() {
146 146
     return 0
147 147
 }
148 148
 
149
+function quantum_plugin_check_adv_test_requirements() {
150
+    is_service_enabled q-dhcp && return 0
151
+}
152
+
149 153
 # Restore xtrace
150 154
 $MY_XTRACE
... ...
@@ -144,5 +144,9 @@ function has_quantum_plugin_security_group() {
144 144
     return 0
145 145
 }
146 146
 
147
+function quantum_plugin_check_adv_test_requirements() {
148
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
149
+}
150
+
147 151
 # Restore xtrace
148 152
 $MY_XTRACE
... ...
@@ -35,5 +35,8 @@ function quantum_plugin_configure_debug_command() {
35 35
     :
36 36
 }
37 37
 
38
+function quantum_plugin_check_adv_test_requirements() {
39
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
40
+}
38 41
 # Restore xtrace
39 42
 $MY_XTRACE
... ...
@@ -71,5 +71,9 @@ function has_quantum_plugin_security_group() {
71 71
     return 0
72 72
 }
73 73
 
74
+function quantum_plugin_check_adv_test_requirements() {
75
+    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
76
+}
77
+
74 78
 # Restore xtrace
75 79
 $MY_XTRACE