base-files: config_generate: handle switch port attributes and better group json_select