diff --git a/go.mod b/go.mod index f2dbd9a18..b47587698 100644 --- a/go.mod +++ b/go.mod @@ -19,8 +19,9 @@ require ( github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3 // indirect github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f github.com/pkg/profile v1.7.0 - golang.org/x/text v0.3.0 + golang.org/x/text v0.3.3 google.golang.org/grpc v1.28.0 + inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a ) go 1.13 diff --git a/go.sum b/go.sum index 9cbf4b739..aec58acaf 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -93,13 +94,21 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go4.org/intern v0.0.0-20211027215823-ae77deb06f29 h1:UXLjNohABv4S58tHmeuIZDO6e3mHpW2Dx33gaNt03LE= +go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 h1:WJhcL4p+YeDxmZWg141nRm7XC8IDmhz7lk5GpadO1Sg= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -107,14 +116,18 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc h1:zK/HqS5bZxDptfPJNq8v7vJfXtkU7r9TLIoSr1bXaP4= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= @@ -123,15 +136,25 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -163,3 +186,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +inet.af v0.0.0-20181218191229-53da77bc832c h1:U3RoiyEF5b3Y1SVL6NNvpkgqUz2qS3a0OJh9kpSCN04= +inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a h1:1XCVEdxrvL6c0TGOhecLuB7U9zYNdxZEjvOqJreKZiM= +inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a/go.mod h1:e83i32mAQOW1LAqEIweALsuK2Uw4mhQadA5r7b0Wobo= diff --git a/models/yang/annotations/openconfig-interfaces-annot.yang b/models/yang/annotations/openconfig-interfaces-annot.yang index d3124f0f6..64fb448f7 100644 --- a/models/yang/annotations/openconfig-interfaces-annot.yang +++ b/models/yang/annotations/openconfig-interfaces-annot.yang @@ -19,7 +19,6 @@ module openconfig-interfaces-annot { deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config { deviate add { sonic-ext:subtree-transformer "intf_eth_port_config_xfmr"; - sonic-ext:path-transformer "intf_eth_port_config_path_xfmr"; } } @@ -95,7 +94,6 @@ module openconfig-interfaces-annot { sonic-ext:table-transformer "intf_subintfs_table_xfmr"; sonic-ext:virtual-table "true"; sonic-ext:key-transformer "intf_subintfs_xfmr"; - sonic-ext:path-transformer "intf_ip_path_xfmr"; } } diff --git a/models/yang/extensions/openconfig-interfaces-deviation.yang b/models/yang/extensions/openconfig-interfaces-deviation.yang index e3fd326b7..fcc9eddce 100644 --- a/models/yang/extensions/openconfig-interfaces-deviation.yang +++ b/models/yang/extensions/openconfig-interfaces-deviation.yang @@ -12,6 +12,9 @@ module openconfig-interfaces-deviation { import openconfig-extensions { prefix oc-ext; } import openconfig-if-ip {prefix oc-ip; } import openconfig-vlan { prefix oc-vlan; } + import openconfig-if-ethernet {prefix oc-eth; } + import openconfig-if-aggregate {prefix oc-lag; } + import openconfig-if-tunnel {prefix oc-tun; } organization "SONiC"; @@ -22,14 +25,62 @@ module openconfig-interfaces-deviation { description "This module describes a YANG model for openconfig-interfaces deviations."; - oc-ext:openconfig-version "0.2.7"; + oc-ext:openconfig-version "0.1.0"; revision "2024-01-19" { description - "Add Yang deviations for unsupported subinterfaces."; - reference "0.2.7"; + "Add Yang deviations for unsupported interface attributes."; + reference "0.1.0"; } + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:config/oc-intf:loopback-mode { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:config/oc-vlan:tpid { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:config/oc-intf:type { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:loopback-mode { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:oper-status { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:last-change { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:counters { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:type { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:ifindex { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:logical { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-vlan:tpid { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:hold-time { + deviate not-supported; + } + deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:subinterfaces/oc-intf:subinterface/oc-intf:state/oc-intf:ifindex { deviate not-supported; } @@ -131,5 +182,69 @@ module openconfig-interfaces-deviation { deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:subinterfaces/oc-intf:subinterface/oc-ip:ipv6/oc-ip:state { deviate not-supported; } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-eth:mac-address { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-eth:duplex-mode { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-eth:enable-flow-control { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-lag:aggregate-id { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:mac-address { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:duplex-mode { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:enable-flow-control { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:counters { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-lag:aggregate-id { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:hw-mac-address { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:negotiated-duplex-mode { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:negotiated-port-speed { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-vlan:switched-vlan { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-tun:tunnel { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-lag:aggregation { + deviate not-supported; + } + + deviation /oc-intf:interfaces/oc-intf:interface/oc-vlan:routed-vlan { + deviate not-supported; + } } diff --git a/models/yang/extensions/openconfig-interfaces-ext.yang b/models/yang/extensions/openconfig-interfaces-ext.yang deleted file mode 100644 index 73b70e46a..000000000 --- a/models/yang/extensions/openconfig-interfaces-ext.yang +++ /dev/null @@ -1,147 +0,0 @@ -module openconfig-interfaces-ext { - - yang-version "1.1"; - - // namespace - namespace "http://openconfig.net/yang/interfaces/extension"; - - prefix "oc-intf-ext"; - - import openconfig-extensions { prefix oc-ext; } - import openconfig-interfaces { prefix oc-intf; } - import openconfig-vlan { prefix oc-vlan; } - import openconfig-if-ethernet {prefix oc-eth; } - import openconfig-if-aggregate {prefix oc-lag; } - import openconfig-if-tunnel {prefix oc-tun; } - - - organization "SONiC"; - - contact - "SONiC"; - - description - "This module contains collection of yang definitions for extensions to - openconfig-interfaces yang"; - - oc-ext:openconfig-version "0.1.0"; - - revision 2024-01-18 { - description - "Initial version."; - reference "0.1.0"; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:config/oc-intf:loopback-mode { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:config/oc-vlan:tpid { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:config/oc-intf:type { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:loopback-mode { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:oper-status { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:last-change { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:counters { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:type { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:ifindex { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-intf:logical { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:state/oc-vlan:tpid { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-intf:hold-time { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-eth:mac-address { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-eth:duplex-mode { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-eth:enable-flow-control { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:config/oc-lag:aggregate-id { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:mac-address { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:duplex-mode { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:enable-flow-control { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:counters { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-lag:aggregate-id { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:hw-mac-address { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:negotiated-duplex-mode { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-eth:state/oc-eth:negotiated-port-speed { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-eth:ethernet/oc-vlan:switched-vlan { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-tun:tunnel { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-lag:aggregation { - deviate not-supported; - } - - deviation /oc-intf:interfaces/oc-intf:interface/oc-vlan:routed-vlan { - deviate not-supported; - } - -} \ No newline at end of file diff --git a/models/yang/openconfig-if-ethernet.yang b/models/yang/openconfig-if-ethernet.yang index 4e15bd28a..a852fc83b 100644 --- a/models/yang/openconfig-if-ethernet.yang +++ b/models/yang/openconfig-if-ethernet.yang @@ -24,82 +24,14 @@ module openconfig-if-ethernet { "Model for managing Ethernet interfaces -- augments the OpenConfig model for interface configuration and state."; - oc-ext:openconfig-version "2.13.0"; + oc-ext:openconfig-version "2.7.0"; - revision "2023-03-10" { + revision "2024-02-22" { description - "Allow Ethernet configuration parameters to be - used for aggregate (LAG) interfaces."; - reference "2.13.0"; - } - - revision "2022-04-20" { - description - "Remove unused import"; - reference "2.12.2"; - } - - revision "2021-07-20" { - description - "Fix typo in hardware MAC address description."; - reference "2.12.1"; - } - - revision "2021-07-07" { - description - "Add support for configuring fec-mode per interface."; - reference "2.12.0"; - } - - revision "2021-06-16" { - description - "Remove trailing whitespace."; - reference "2.11.1"; - } - - revision "2021-06-09" { - description - "Add support for standalone link training."; - reference "2.11.0"; - } - - revision "2021-05-17" { - description - "Add ethernet counters: in-carrier-errors, - in-interrupted-tx, in-late-collision, in-mac-errors-rx, - in-single-collision, in-symbol-error and out-mac-errors-tx"; - reference "2.10.0"; - } - - revision "2021-03-30" { - description - "Add counter for drops due to oversized frames."; - reference "2.9.0"; - } - - revision "2020-05-06" { - description - "Minor formatting fix."; - reference "2.8.1"; - } - - revision "2020-05-06" { - description - "Add 200G, 400G, 600G and 800G Ethernet speeds."; - reference "2.8.0"; - } - - revision "2020-05-05" { - description - "Fix when statement checks to use rw paths when - from a rw context."; - reference "2.7.3"; - } - - revision "2019-04-16" { - description - "Update import prefix for iana-if-type module"; - reference "2.7.2"; + "Add 200G, 400G, 600G, and 800G Ethernet Speeds. + Minor formatting fix and fixed a typo in + hardware MAC addr description."; + reference "2.7.0"; } revision "2018-11-21" { diff --git a/translib/transformer/xfmr_intf.go b/translib/transformer/xfmr_intf.go index 192d739c7..d878431b3 100644 --- a/translib/transformer/xfmr_intf.go +++ b/translib/transformer/xfmr_intf.go @@ -47,7 +47,6 @@ func init() { XlateFuncBind("DbToYang_intf_enabled_xfmr", DbToYang_intf_enabled_xfmr) XlateFuncBind("YangToDb_intf_eth_port_config_xfmr", YangToDb_intf_eth_port_config_xfmr) XlateFuncBind("DbToYang_intf_eth_port_config_xfmr", DbToYang_intf_eth_port_config_xfmr) - XlateFuncBind("DbToYangPath_intf_eth_port_config_path_xfmr", DbToYangPath_intf_eth_port_config_path_xfmr) XlateFuncBind("DbToYang_intf_eth_auto_neg_xfmr", DbToYang_intf_eth_auto_neg_xfmr) XlateFuncBind("DbToYang_intf_eth_port_speed_xfmr", DbToYang_intf_eth_port_speed_xfmr) @@ -62,7 +61,6 @@ func init() { XlateFuncBind("intf_subintfs_table_xfmr", intf_subintfs_table_xfmr) XlateFuncBind("YangToDb_subif_index_xfmr", YangToDb_subif_index_xfmr) XlateFuncBind("DbToYang_subif_index_xfmr", DbToYang_subif_index_xfmr) - XlateFuncBind("DbToYangPath_intf_ip_path_xfmr", DbToYangPath_intf_ip_path_xfmr) XlateFuncBind("Subscribe_intf_ip_addr_xfmr", Subscribe_intf_ip_addr_xfmr) XlateFuncBind("YangToDb_subintf_ipv6_tbl_key_xfmr", YangToDb_subintf_ipv6_tbl_key_xfmr) @@ -763,27 +761,6 @@ var DbToYang_intf_eth_port_config_xfmr SubTreeXfmrDbToYang = func(inParams XfmrP return err } -var DbToYangPath_intf_eth_port_config_path_xfmr PathXfmrDbToYangFunc = func(params XfmrDbToYgPathParams) error { - log.Info("DbToYangPath_intf_eth_port_config_path_xfmr: params: ", params) - - intfRoot := "/openconfig-interfaces:interfaces/interface" - if params.tblName != "PORT" { - log.Info("DbToYangPath_intf_eth_port_config_path_xfmr: from wrong table: ", params.tblName) - return nil - } - - if (params.tblName == "PORT") && (len(params.tblKeyComp) > 0) { - params.ygPathKeys[intfRoot+"/name"] = params.tblKeyComp[0] - } else { - log.Info("DbToYangPath_intf_eth_port_config_path_xfmr, wrong param: tbl ", params.tblName, " key ", params.tblKeyComp) - return nil - } - - log.Info("DbToYangPath_intf_eth_port_config_path_xfmr: params.ygPathkeys: ", params.ygPathKeys) - - return nil -} - var DbToYang_intf_eth_auto_neg_xfmr FieldXfmrDbtoYang = func(inParams XfmrParams) (map[string]interface{}, error) { var err error result := make(map[string]interface{}) @@ -1040,47 +1017,6 @@ var DbToYang_subif_index_xfmr FieldXfmrDbtoYang = func(inParams XfmrParams) (map return res_map, nil } -var DbToYangPath_intf_ip_path_xfmr PathXfmrDbToYangFunc = func(params XfmrDbToYgPathParams) error { - ifRoot := "/openconfig-interfaces:interfaces/interface" - subIf := ifRoot + "/subinterfaces/subinterface" - dbKey := "" - - log.Info("DbToYangPath_intf_ip_path_xfmr: params: ", params) - - uiName := ¶ms.tblKeyComp[0] - ifParts := strings.Split(*uiName, ".") - - params.ygPathKeys[ifRoot+"/name"] = ifParts[0] - - if params.tblName == "INTERFACE" || params.tblName == "INTF_TABLE" { - - addrPath := "/openconfig-if-ip:ipv4/addresses/address/ip" - - /* For APPL_DB IPv6 case, addr is split [fe80 56bf 64ff feba 3bc0/64] instead of - [fe80::56bf:64ff:feba:3bc0/64] - Handle this case - */ - dbKey = strings.Join(params.tblKeyComp[1:], ":") - - if len(params.tblKeyComp) > 2 || strings.Contains(dbKey, ":") { - addrPath = "/openconfig-if-ip:ipv6/addresses/address/ip" - } - - ipKey := strings.Split(dbKey, "/") - - if len(ifParts) > 1 { - params.ygPathKeys[subIf+"/index"] = ifParts[1] - } else { - params.ygPathKeys[subIf+"/index"] = "0" - } - params.ygPathKeys[subIf+addrPath] = ipKey[0] - - } - - log.Infof("DbToYangPath_intf_ip_path_xfmr: tblName:%v dbKey:[%v] params.ygPathKeys: %v", params.tblName, dbKey, params.ygPathKeys) - return nil -} - /* Get interface to IP mapping for all interfaces in the given table */ func getCachedAllIntfIpMap(dbCl *db.DB, tblName string, ipv4 bool, ipv6 bool, ip string, tblPattern *db.Table) (map[string]map[string]db.Value, error) { var err error