def testTopologyImport(topId): createStarTopology(topId, 3) print "Exporting topology..." data = topology_export(topId) print "Importing topology..." (top_id, elements, connections, errors) = topology_import(data) topology_remove(top_id) assert not errors, "Import resulted in errors: %s" % errors assert len(elements) == 10, "Imported topology was malformed" assert len(connections) == 3, "Imported topology was malformed"
def testTopologyAction(topId): createStarTopology(topId) print "Calling action prepare..." topology_action(topId, "prepare") print "Calling action start..." topology_action(topId, "start") print "Calling action stop..." topology_action(topId, "stop") print "Calling action destroy..." topology_action(topId, "destroy")
def testTopologyExport(topId): createStarTopology(topId) print "Exporting topology..." res = topology_export(topId) assert res, "Exporting topology did not return anything"
def testTopologyInfo(topId): createStarTopology(topId) print "Calling topology_info..." top = topology_info(topId)