From b4581d183065af6b82026003959b96fbe6850dd1 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 16 Jun 2017 14:36:52 +0200 Subject: Rename yang files to match model revision Also order of revisions was sorted starting from most current. Change-Id: I21fd35cfdb1cc5601b3fb40c9f3755bd3b995b14 Signed-off-by: Marek Gradzki --- nsh/api/src/main/yang/vpp-nsh.yang | 344 -------------------------- nsh/api/src/main/yang/vpp-nsh@2017-03-15.yang | 344 ++++++++++++++++++++++++++ 2 files changed, 344 insertions(+), 344 deletions(-) delete mode 100644 nsh/api/src/main/yang/vpp-nsh.yang create mode 100644 nsh/api/src/main/yang/vpp-nsh@2017-03-15.yang (limited to 'nsh') diff --git a/nsh/api/src/main/yang/vpp-nsh.yang b/nsh/api/src/main/yang/vpp-nsh.yang deleted file mode 100644 index a379313cf..000000000 --- a/nsh/api/src/main/yang/vpp-nsh.yang +++ /dev/null @@ -1,344 +0,0 @@ -module vpp-nsh { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:vpp:nsh"; - prefix "vpp-nsh"; - - revision "2017-03-15" { - description - "This revision adds support for NSH-MD2 features"; - } - - revision "2016-12-14" { - description - "This revision adds support for NSH-Proxy and NSH-Classifier features"; - } - - revision "2016-06-24" { - description - "Initial revision of vpp-nsh model"; - } - - import iana-if-type { - prefix "ianaift"; - } - import ietf-interfaces { - prefix "if"; - } - import ietf-yang-types { - prefix "yang"; - } - import ietf-inet-types { - prefix "inet"; - } - import yang-ext { - prefix "ext"; - } - import v3po { - prefix "v3po"; - } - /* - * Defines the supported next protocols that can be used for - * NSH next-protocol field. - */ - identity next-protocol { - description "Base identity from which all nsh next protocols - are derived from"; - } - - identity ipv4 { - base next-protocol; - description - "Support ipv4 to act as next protocol"; - } - - identity ipv6 { - base next-protocol; - description - "Support ipv6 to act as next protocol"; - } - - identity ethernet { - base next-protocol; - description - "Support ethernet to act as next protocol"; - } - - typedef nsh-next-protocol { - type identityref { - base "next-protocol"; - } - description "Identifies a specific next protocol for nsh"; - } - - /* - * Defines the supported nsh header action. - */ - identity action-type { - description "nsh header action type"; - } - - identity swap { - base "action-type"; - description "swap action type"; - } - - identity push { - base "action-type"; - description "push action type"; - } - - identity pop { - base "action-type"; - description "pop action type"; - } - - typedef nsh-action-type { - type identityref { - base "action-type"; - } - } - - /* - * Defines the supported encap type. - */ - identity encap-type { - description "encap type"; - } - - identity vxlan-gpe { - base "encap-type"; - description "vxlan-gpe encap type"; - } - - identity vxlan4 { - base "encap-type"; - description "ipv4 vxlan encap type"; - } - - identity vxlan6 { - base "encap-type"; - description "ipv6 vxlan encap type"; - } - - identity none { - base "encap-type"; - description "encap-none"; - } - - typedef nsh-encap-type { - type identityref { - base "encap-type"; - } - } - - /* - * Defines the supported MD-types. - */ - identity md-type { - description "md type"; - } - - identity md-type1 { - base "md-type"; - description "nsh md-type1"; - } - - identity md-type2 { - base "md-type"; - description "nsh md-type2"; - } - - typedef nsh-md-type { - type identityref { - base "md-type"; - } - } - - grouping nsh-md-type1-attributes { - leaf c1 { - type uint32; - } - leaf c2 { - type uint32; - } - leaf c3 { - type uint32; - } - leaf c4 { - type uint32; - } - } - - grouping nsh-md-type2-attributes { - list md2-data { - key "md2_class type"; - - leaf md2_class { - type uint32 { - range "0..65535"; - } - } - leaf type - { - type uint8; - } - leaf len - { - type uint8; - } - leaf metadata - { - type string { - length 1..128; - } - } - } - } - - grouping nsh-entry-base-attributes { - leaf name { - type string; - description "NSH Entry Name"; - } - leaf nsp { - type uint32 { - range "0..16777215"; - } - } - leaf nsi { - type uint8 { - range "1..255"; - } - } - leaf md-type { - type nsh-md-type; - } - leaf version { - type uint8; - } - leaf length { - type uint8; - } - leaf next-protocol { - type nsh-next-protocol; - } - } - - grouping nsh-map-base-attributes { - leaf name { - type string; - description "NSH Map Name"; - } - leaf nsp { - type uint32 { - range "0..16777215"; - } - } - leaf nsi { - type uint8 { - range "1..255"; - } - } - leaf mapped-nsp { - type uint32 { - range "0..16777215"; - } - } - leaf mapped-nsi { - type uint8 { - range "1..255"; - } - } - leaf nsh-action { - type nsh-action-type; - default "swap"; - } - leaf encap-type { - type nsh-encap-type; - } - leaf encap-if-name { - type string; - description "Interface Name"; - } - } - - container vpp-nsh { - description - "NSH config data"; - - container nsh-entries { - list nsh-entry { - key "name"; - - uses nsh-entry-base-attributes; - - description - "nsh-entry configuration"; - } - } - - container nsh-maps { - list nsh-map { - key "name"; - - uses nsh-map-base-attributes; - - description - "nsh-map configuration"; - } - } - } - - augment /vpp-nsh/nsh-entries/nsh-entry { - ext:augment-identifier nsh-md-type-1-augment; - when "/md-type = 'vpp-nsh:md-type1' "; - uses nsh-md-type1-attributes; - } - - augment /vpp-nsh/nsh-entries/nsh-entry { - ext:augment-identifier nsh-md-type-2-augment; - when "/md-type = 'vpp-nsh:md-type2' "; - uses nsh-md-type2-attributes; - } - - container vpp-nsh-state { - config false; - - description - "NSH operational data"; - - container nsh-entries { - list nsh-entry { - key "name"; - - uses nsh-entry-base-attributes; - - description - "nsh-entry operational data"; - } - } - - container nsh-maps { - list nsh-map { - key "name"; - - uses nsh-map-base-attributes; - - description - "nsh-map operational data"; - } - } - } - - augment /vpp-nsh-state/nsh-entries/nsh-entry { - ext:augment-identifier nsh-md-type-1-state-augment; - when "/md-type = 'vpp-nsh:md-type1' "; - uses nsh-md-type1-attributes; - } - - augment /vpp-nsh-state/nsh-entries/nsh-entry { - ext:augment-identifier nsh-md-type-2-state-augment; - when "/md-type = 'vpp-nsh:md-type2' "; - uses nsh-md-type2-attributes; - } -} \ No newline at end of file diff --git a/nsh/api/src/main/yang/vpp-nsh@2017-03-15.yang b/nsh/api/src/main/yang/vpp-nsh@2017-03-15.yang new file mode 100644 index 000000000..a379313cf --- /dev/null +++ b/nsh/api/src/main/yang/vpp-nsh@2017-03-15.yang @@ -0,0 +1,344 @@ +module vpp-nsh { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vpp:nsh"; + prefix "vpp-nsh"; + + revision "2017-03-15" { + description + "This revision adds support for NSH-MD2 features"; + } + + revision "2016-12-14" { + description + "This revision adds support for NSH-Proxy and NSH-Classifier features"; + } + + revision "2016-06-24" { + description + "Initial revision of vpp-nsh model"; + } + + import iana-if-type { + prefix "ianaift"; + } + import ietf-interfaces { + prefix "if"; + } + import ietf-yang-types { + prefix "yang"; + } + import ietf-inet-types { + prefix "inet"; + } + import yang-ext { + prefix "ext"; + } + import v3po { + prefix "v3po"; + } + /* + * Defines the supported next protocols that can be used for + * NSH next-protocol field. + */ + identity next-protocol { + description "Base identity from which all nsh next protocols + are derived from"; + } + + identity ipv4 { + base next-protocol; + description + "Support ipv4 to act as next protocol"; + } + + identity ipv6 { + base next-protocol; + description + "Support ipv6 to act as next protocol"; + } + + identity ethernet { + base next-protocol; + description + "Support ethernet to act as next protocol"; + } + + typedef nsh-next-protocol { + type identityref { + base "next-protocol"; + } + description "Identifies a specific next protocol for nsh"; + } + + /* + * Defines the supported nsh header action. + */ + identity action-type { + description "nsh header action type"; + } + + identity swap { + base "action-type"; + description "swap action type"; + } + + identity push { + base "action-type"; + description "push action type"; + } + + identity pop { + base "action-type"; + description "pop action type"; + } + + typedef nsh-action-type { + type identityref { + base "action-type"; + } + } + + /* + * Defines the supported encap type. + */ + identity encap-type { + description "encap type"; + } + + identity vxlan-gpe { + base "encap-type"; + description "vxlan-gpe encap type"; + } + + identity vxlan4 { + base "encap-type"; + description "ipv4 vxlan encap type"; + } + + identity vxlan6 { + base "encap-type"; + description "ipv6 vxlan encap type"; + } + + identity none { + base "encap-type"; + description "encap-none"; + } + + typedef nsh-encap-type { + type identityref { + base "encap-type"; + } + } + + /* + * Defines the supported MD-types. + */ + identity md-type { + description "md type"; + } + + identity md-type1 { + base "md-type"; + description "nsh md-type1"; + } + + identity md-type2 { + base "md-type"; + description "nsh md-type2"; + } + + typedef nsh-md-type { + type identityref { + base "md-type"; + } + } + + grouping nsh-md-type1-attributes { + leaf c1 { + type uint32; + } + leaf c2 { + type uint32; + } + leaf c3 { + type uint32; + } + leaf c4 { + type uint32; + } + } + + grouping nsh-md-type2-attributes { + list md2-data { + key "md2_class type"; + + leaf md2_class { + type uint32 { + range "0..65535"; + } + } + leaf type + { + type uint8; + } + leaf len + { + type uint8; + } + leaf metadata + { + type string { + length 1..128; + } + } + } + } + + grouping nsh-entry-base-attributes { + leaf name { + type string; + description "NSH Entry Name"; + } + leaf nsp { + type uint32 { + range "0..16777215"; + } + } + leaf nsi { + type uint8 { + range "1..255"; + } + } + leaf md-type { + type nsh-md-type; + } + leaf version { + type uint8; + } + leaf length { + type uint8; + } + leaf next-protocol { + type nsh-next-protocol; + } + } + + grouping nsh-map-base-attributes { + leaf name { + type string; + description "NSH Map Name"; + } + leaf nsp { + type uint32 { + range "0..16777215"; + } + } + leaf nsi { + type uint8 { + range "1..255"; + } + } + leaf mapped-nsp { + type uint32 { + range "0..16777215"; + } + } + leaf mapped-nsi { + type uint8 { + range "1..255"; + } + } + leaf nsh-action { + type nsh-action-type; + default "swap"; + } + leaf encap-type { + type nsh-encap-type; + } + leaf encap-if-name { + type string; + description "Interface Name"; + } + } + + container vpp-nsh { + description + "NSH config data"; + + container nsh-entries { + list nsh-entry { + key "name"; + + uses nsh-entry-base-attributes; + + description + "nsh-entry configuration"; + } + } + + container nsh-maps { + list nsh-map { + key "name"; + + uses nsh-map-base-attributes; + + description + "nsh-map configuration"; + } + } + } + + augment /vpp-nsh/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-1-augment; + when "/md-type = 'vpp-nsh:md-type1' "; + uses nsh-md-type1-attributes; + } + + augment /vpp-nsh/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-2-augment; + when "/md-type = 'vpp-nsh:md-type2' "; + uses nsh-md-type2-attributes; + } + + container vpp-nsh-state { + config false; + + description + "NSH operational data"; + + container nsh-entries { + list nsh-entry { + key "name"; + + uses nsh-entry-base-attributes; + + description + "nsh-entry operational data"; + } + } + + container nsh-maps { + list nsh-map { + key "name"; + + uses nsh-map-base-attributes; + + description + "nsh-map operational data"; + } + } + } + + augment /vpp-nsh-state/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-1-state-augment; + when "/md-type = 'vpp-nsh:md-type1' "; + uses nsh-md-type1-attributes; + } + + augment /vpp-nsh-state/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-2-state-augment; + when "/md-type = 'vpp-nsh:md-type2' "; + uses nsh-md-type2-attributes; + } +} \ No newline at end of file -- cgit 1.2.3-korg