From 5543345d32514bfa38292a5080e57b915e39ea1d Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Mon, 27 May 2019 13:54:02 +0200 Subject: HC2VPP-411: remove deprecated interface-state - new ietf-interfaces obsoletes interfaces-state container, only interfaces container should be used from now on. Change-Id: Ifb24611a3dca987bdf6b029d32e01d9b1f479fe8 Signed-off-by: Michal Cmarada --- .../main/yang/subinterface-span@2017-06-07.yang | 7 - v3po/api/src/main/yang/v3po@2019-05-02.yang | 147 +++------------------ v3po/api/src/main/yang/vpp-pbb@2016-12-14.yang | 2 +- v3po/api/src/main/yang/vpp-vlan@2018-03-19.yang | 40 ++---- 4 files changed, 31 insertions(+), 165 deletions(-) (limited to 'v3po/api/src') diff --git a/v3po/api/src/main/yang/subinterface-span@2017-06-07.yang b/v3po/api/src/main/yang/subinterface-span@2017-06-07.yang index e138d0f35..911181eca 100644 --- a/v3po/api/src/main/yang/subinterface-span@2017-06-07.yang +++ b/v3po/api/src/main/yang/subinterface-span@2017-06-07.yang @@ -62,11 +62,4 @@ module subinterface-span { uses v3po:span-attributes; } } - - augment /if:interfaces-state/if:interface/vpp-vlan:sub-interfaces/vpp-vlan:sub-interface { - ext:augment-identifier "vpp-subinterface-span-state-augmentation"; - container span-state { - uses v3po:span-state-attributes; - } - } } diff --git a/v3po/api/src/main/yang/v3po@2019-05-02.yang b/v3po/api/src/main/yang/v3po@2019-05-02.yang index 50112385b..dea978724 100644 --- a/v3po/api/src/main/yang/v3po@2019-05-02.yang +++ b/v3po/api/src/main/yang/v3po@2019-05-02.yang @@ -406,17 +406,15 @@ module v3po { type inet:ipv6-address; description "Host IPv6 gateway address."; } - } - grouping tap-v2-interface-state-attributes { - leaf device-name { - config false; - type string{ - pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; - length 1..63; - } - description "Device name of the Tap v2 interface in VPP."; + leaf device-name { + config false; + type string{ + pattern '[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*'; + length 1..63; } + description "Device name of the Tap v2 interface in VPP."; + } } grouping loopback-interface-base-attributes { @@ -440,24 +438,12 @@ module v3po { Mapped to hw_interface_set_mtu VPP API message which programs the NIC."; } - } - grouping routing-base-attributes { - leaf ipv4-vrf-id { - type fib-management:fib-table-list-ref; - } - leaf ipv6-vrf-id { - type fib-management:fib-table-list-ref; - } - description - "Defines VRF tables used for ipv4 and ipv6 traffic"; - } - - grouping ethernet-state-attributes { leaf manufacturer-description { type string; config false; } + leaf duplex { type enumeration { enum "half"; @@ -467,6 +453,17 @@ module v3po { } } + grouping routing-base-attributes { + leaf ipv4-vrf-id { + type fib-management:fib-table-list-ref; + } + leaf ipv6-vrf-id { + type fib-management:fib-table-list-ref; + } + description + "Defines VRF tables used for ipv4 and ipv6 traffic"; + } + grouping vhost-user-interface-base-attributes { leaf socket { type string { @@ -488,9 +485,7 @@ module v3po { description "Custom device instance. Autogenerated will be used if not configured"; } description "vhost-user settings"; - } - grouping vhost-user-interface-state-attributes { leaf features { type uint64; config false; @@ -630,26 +625,6 @@ module v3po { } } - grouping l2-state-attributes { - description - "Parameters for configuring Layer2 features on interfaces."; - - choice interconnection { - case xconnect-based { - leaf xconnect-outgoing-interface { - /* Don't allow selection of this interface */ - must "../../if:name != current()"; - type if:interface-state-ref; - description - "L2 xconnect mode"; - } - } - case bridge-based { - uses bridge-based-attributes; - } - } - } - grouping bridge-based-attributes { leaf bridge-domain { type bridge-domain-ref; @@ -698,24 +673,6 @@ module v3po { } } - grouping span-state-attributes { - description "Parameters of the SPAN feature"; - - container mirrored-interfaces { - list mirrored-interface { - key "iface-ref"; - leaf iface-ref { - type if:interface-state-ref; - } - - leaf state { - type span-state; - mandatory true; - } - } - } - } - augment /if:interfaces/if:interface { ext:augment-identifier "vpp-interface-augmentation"; @@ -802,68 +759,6 @@ module v3po { } } - augment /if:interfaces-state/if:interface { - ext:augment-identifier "vpp-interface-state-augmentation"; - - leaf description { - type string; - } - - container tap-v2 { - when "../if:type = 'v3po:tap-v2'"; - uses tap-v2-interface-base-attributes; - uses tap-v2-interface-state-attributes; - } - - container ethernet { - when "../if:type = 'ianaift:ethernetCsmacd'"; - uses ethernet-base-attributes; - uses ethernet-state-attributes; - } - - container routing { - uses routing-base-attributes; - } - - container vhost-user { - when "../if:type = 'v3po:vhost-user'"; - uses vhost-user-interface-base-attributes; - uses vhost-user-interface-state-attributes; - } - - container vxlan { - when "../if:type = 'v3po:vxlan-tunnel'"; - uses vxlan-base-attributes; - } - container vxlan-gpe { - when "../if:type = 'v3po:vxlan-gpe-tunnel'"; - - uses vxlan-gpe-base-attributes; - } - - container gre { - when "../if:type = 'gre-tunnel'"; - uses gre-base-attributes; - } - - container l2 { - must "bridged-virtual-interface = 'true' or " + - "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + - "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; - - uses l2-state-attributes; - } - - container af-packet { - when "../if:type = 'v3po:af-packet'"; - uses af-packet-base-attributes; - } - - container span { - uses span-state-attributes; - } - } - augment /if:interfaces { ext:augment-identifier "vpp-interfaces-stats-augmentation"; container statistics{ @@ -874,7 +769,7 @@ module v3po { } } - augment /if:interfaces-state/if:interface/if:statistics { + augment /if:interfaces/if:interface/if:statistics { ext:augment-identifier "vpp-interface-statistics-augmentation"; leaf in-errors-no-buf { type yang:counter64; @@ -925,7 +820,7 @@ module v3po { } } - notification interface-state-change { + notification interface-change { leaf name { type interface-name-or-index; } diff --git a/v3po/api/src/main/yang/vpp-pbb@2016-12-14.yang b/v3po/api/src/main/yang/vpp-pbb@2016-12-14.yang index 3947831f7..159d05de6 100644 --- a/v3po/api/src/main/yang/vpp-pbb@2016-12-14.yang +++ b/v3po/api/src/main/yang/vpp-pbb@2016-12-14.yang @@ -52,7 +52,7 @@ module vpp-pbb { } } - augment /if:interfaces-state/if:interface { + augment /if:interfaces/if:interface { ext:augment-identifier "pbb-rewrite-state-interface-augmentation"; container pbb-rewrite-state { uses pbb-types:pbb-rewrite-attributes; diff --git a/v3po/api/src/main/yang/vpp-vlan@2018-03-19.yang b/v3po/api/src/main/yang/vpp-vlan@2018-03-19.yang index c5f025429..05b088689 100644 --- a/v3po/api/src/main/yang/vpp-vlan@2018-03-19.yang +++ b/v3po/api/src/main/yang/vpp-vlan@2018-03-19.yang @@ -216,13 +216,6 @@ module vpp-vlan { } } - grouping sub-interface-l2-state-attributes { - container l2 { - uses v3po:l2-state-attributes; - uses rewrite-attributes; - } - } - grouping sub-interface-config-attributes { leaf enabled { type boolean; @@ -231,31 +224,38 @@ module vpp-vlan { "Contains the configured, desired state of the sub-interface. To enable sub-interface, the super inerface needs to be enabled"; } - } - grouping sub-interface-operational-attributes { leaf admin-status { type sub-interface-status; mandatory true; + config false; } + leaf oper-status { type sub-interface-status; mandatory true; + config false; } + leaf if-index { type int32 { range "1..2147483647"; } mandatory true; + config false; } + leaf phys-address { type yang:phys-address; description "The sub-interface's Media Access Control (MAC) address."; + config false; } + leaf speed { type yang:gauge64; units "bits/second"; + config false; } } @@ -464,26 +464,4 @@ module vpp-vlan { } } } - - augment /if:interfaces-state/if:interface { - ext:augment-identifier "subinterface-state-augmentation"; - - container sub-interfaces { - description "L2 vlan subinterfaces"; - - list sub-interface { - key "identifier"; - leaf identifier { - type uint32; - } - - uses sub-interface-base-attributes; - uses sub-interface-operational-attributes; - uses sub-interface-ip4-attributes; - uses sub-interface-ip6-attributes; - uses sub-interface-routing-attributes; - uses sub-interface-l2-state-attributes; - } - } - } } -- cgit 1.2.3-korg