===== Scenario with conditionals and a loop ===== # Comments that follow after a hash will be ignored [parameters] # Assign a static value ring_node = rng00cs01 version = "ipvpn 1.1" [scenario] # assign a value, which could be changed later on := switch1 # create a list := += # create a list of nodes from a relation += Description test scenario config_create -n -t ring_interface -f .cfg if log -m "failed to create cpe config" += else += endif # foreach loop log -m "creating config pe-nodes" foreach in log -m "pe-node: " if " == " log -m "skipping cpe node as pe-node" next endif # or: if ! if " == ''" log -m "aborting on blank pe-node" last endif config_create -n -t pe_template -f .cfg if log -m "failed to gen cfg for pe-node " += else += endif foreach in log -m "node is on done list" endeach log -m "starting next loop" endeach log -m "generated configs for: " if log -m "failed configs for: " stop endif