+test_mode = ["None", "nat", "route
eth1"]
If you want to set the forward device as eth1, you'll need to use the
ForwardDevice attribute. See the schema (or the template NetPoolRASDs)
for more info.
+ for i in range(0, len(test_mode)):
+ pool_attr["ForwardMode"] = test_mode[i]
ForwardMode needs to be an int, not a string. Really, you should be
using the template NetPoolRASD for this. These have the values set
appropriately.
You can call get_pool_rasds(), and then pull the RASD you want from the
list that is returned. Then you won't have to worry about setting the
properties appropriately.
+
+ status = create_netpool(options.ip, options.virt,
+ test_pool, pool_attr)
+ if status != PASS:
+ logger.error("Error in networkpool creation")
return FAIL
-
- logger.error("The execution should not have reached here!!")
- return FAIL
+
+ status = verify_pool(options.ip, options.virt, np,
+ test_pool, pool_attr)
+ if status != PASS:
+ logger.error("Error in networkpool verification")
+ destroy_netpool(options.ip, options.virt, test_pool)
+ undefine_netpool(options.ip, options.virt, test_pool)
+ return FAIL
+
+ status = destroy_netpool(options.ip, options.virt, test_pool)
+ if status != PASS:
+ logger.error("Unable to destroy networkpool %s", test_pool)
+ return FAIL
+
+ status = undefine_netpool(options.ip, options.virt, test_pool)
+ if status != PASS:
+ logger.error("Unable to undefine networkpool %s", test_pool)
+ return FAIL
Instead of setting PASS at the top of the test case, set status = PASS
here. This helps prevent returning a false positive.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com