Configuration generator for switches based on topology and config templates