该目录下只定义转换规则，
排序规则放在priRuleName目录下,通过设置deviceModel version priRuleName三个字段来关联排序规则
deviceModel和version对应该目录下metadata.json里的字段相应的字段 而priRuleName对应rules字段下的rulename

目前工具左边的列表信息 来自 srcFactory字段 ,右边的列表信息来自 deviceModel和version的组合  deviceModel_version

metadata文件说明:
{
    "name": "migration_conf",
    "relation": [
        { 
            "deviceModel"   : "sw",  
            "version"       : "10.x",
            "priRuleName"   : "sw_10.x", 
            "rules": [
                {
                    "ruleName"  :"huawei", //目前没用到
                    "path"      :"Huawei_AC_WS5302.json"
                },
                {
                    "ruleName"  : "cisco",
                    "path"      :"Cisco_IOS_SW_S5750.json"
                }
            ]
        }, 
        {
            "deviceModel"   : "ac",
            "version"       : "11.x",
            "priRuleName"   : "ac_11.x",
            "rules": [
                {
                    "ruleName"  : "cisco",
                    "path"      :"Cisco_IOS_SW_S5750.json"
                },
                {
                    "ruleName"  :"huawei",
                    "path"      :"Huawei_AC_WS5302.json"
                }
            ]
        }
    ]
}


{  
    "transforms":[                      //* 数组-transforms[i] 对应一组转行规则  如下 transforms[0]定义了从Cisco转化到AC的规则
        {
            "srcFactory"  : "Cisco",    //* 源配置厂商
            "srcType"     : "IOS",      //* 目前没用到
            "srcVersion"  : "default",  //* 目前没用到
            "destFactory" : "AC",       //* 目前没用到
            "destType"    : "S3300",    //* 目前没用到
            "destVersion" : "default",  //* 目前没用到
            /*
                interface VLAN 197         -> 顶层命令
                 no ip proxy-arp           -> 第1层命令
                  test test 1 2            -> 第2层命令
                 ip address 192.168.23.191 255.255.255.0
                 ip address 192.168.186.186 255.255.255.0 secondary
                commands : [
                    {
                        "layer"     : 1.定义命令所在的层级 缺省为(顶层)，
                                      2.定义规则:以\r\n或者\n作为分层
                                      3.设置"global"的时候会查找并替换所有层级下的命令
                                      4.缺省或者设置为""则表示为顶层规则
                                      5.参数占位符使用"@b+数字(从1开始)"
                        
                        "src"       : 用来匹配要转化的命令
                                    "(@a+数字从1开始)"参数占位符匹配单个参数
                                    "@l" 参数占位符匹配后面全部字符
                                    比如 输入命令：interface VLAN 123 234 456 
                                    interface VLAN @a1 @a2 @a1=‘123’ @a2=‘234’
                                    interface VLAN @l @l匹配‘123 234 456’
                        
                        "dst"       : 用来设定要转化的命令
                                    1) 可以使用"src"或者"layer"中的参数占位符作为替换参数,占位符中可有加减操作
                                    比如 输入命令：
                                    interface VLAN 12 
                                     ip addr 123
                                    ip address @a1+1 @b1+2
                                    @a1='123' @b1='12' 
                                    转换结果 ip address 124 14
                                    2) 可使用@getParam函数获取之前参数
                                    比如 输入命令：
                                    interface asa
                                     ip address 1.1.1.1 255.255.255.0
                                    ntp-service source-interface asa
                                    
                                    dst:ntp server @getParam(interface @a1, ip address @ret @l) source @a1  
                                    @ret 指要获取的参数值
                                    注：@a1参数值必须相同，否则获取不到
                                    3) 如果要跨层替换请使用#号开头，并且给出完整的层级路径，#号后一定是顶层命令不加空格，其余子层需要自行添加空格
                                    比如:
                                        vlan 100
                                            name test
                                      要将name test 替换成 顶层的命令则如此配置
                                        "dst":#top name test
                                      替换后得到:
                                        vlan 100
                                        top name test
                                      如果要替换到子层命令，需要给出完整的命令行，包括空格
                                        "dst":#second name\r\n空格空格name test
                                      替换后得到:
                                        vlan 100
                                        second name
                                          name test
                                    4) 特殊命令替换
                                    目前有@#vlan @#intfname
                                        src:vlan batch @#vlan
                                        dst:vlan range @#vlan
                                        华为:vlan batch 2 to 11 14 to 19 24
                                        我司:vlan range 2-11,14-19,24
                                        src:ntp-service source-interface @#intfname
                                        dst:ntp server @getParam(interface @a1, ip address @ret @l) source @#intfname
                                        华为:ntp-service source-interface LoopBack123
                                        我司:ntp server 1.1.1.1 source loopback 123
                        简单示例:
                            比如想把第2层命令"test test 1 2"替换成"test1 test1 1 2 197"可如此定义:
                            {
                                "layer" : "interface VLAN @b1\r\nno ip proxy-arp"  
                                "src"   : "test test @a1 @a2"
                                "dst"   : "test1 test1 @a1 @a2 @b1"
                            }
                        //* priority缺省
                    },
                    ...
                ]
            */
            "commands"    : [           //* 规则命令数组
                {   //* 全局替换规则
                    "layer"   : "global", 
                    "src"     : "web-auth acl white-url @a1",
                    "dst"     : "switch-> web-auth acl white-url @a1",
                },
                {
                    "src"     : "http redirect adapter @a1",
                    "dst"     : "switch->http redirect adapter @a1"
                },
                {   //* 缺省priority = 0
                    "layer"   : "http redirect adapter @b1",
                    "src"     : "no @a1 free-auth @a2",
                    "dst"     : "switch->no @a1 free-auth @a2" 
                },
                {   //* 顶层替换规则
                    "layer"   : "",
                    "src"     : "vlan @a1",
                    "dst"     : "switch->VLAN @a1"
                },
                {
                    "layer"   : "vlan @b1",
                    "src"     : "name AP_VLAN",
                    "dst"     : "switch->name AP_VLAN"
                },
                {   //* 顶层替换规则
                    "src"     : "interface VLAN @a1",
                    "dst"     : "switch->interface VLAN @a1"
                },
                {
                    "layer"   : "global",
                    "src"     : "ip address @a1 @a2",
                    "dst"     : "switch->ip address @a1 @a2 \r\n 多行测试@a1\r\n 多行测试@a2"
                },
                {
                    "layer"   : "wlansec @b1\r\nweb-auth portal wechat",
                    "src"     : "webauth",
                    "dst"     : "switch->webauth"
                }，
                {
                    "layer"   : "global",
                    "src"     : "ntp-service source-interface @a1",
                    "dst"     : "ntp server @getParam(interface @a1, ip address @ret @l) source @a1"
                },
                {
                    "layer"   : "interface Vlanif@b1",
                    "src"     : "ip address x1 @a11",
                    "dst"     : "ip address xx1 @a11+10 @b1+10"
                },
                {
                    "layer"   : "global",
                    "src"     : "ip address @l",
                    "dst"     : "my ip address @l"
                }
            ]
        }
        ....
    ]

}