From 941edc8b15e5f3fed701b5585ce7ad421991b16d Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Fri, 4 Aug 2017 08:49:05 +0200 Subject: HC2VPP-162 - use composite key for locator pair Removes need for custom mapping for locator pairs and their ids Change-Id: Idaa6ee5ec74d8bf57a72bea95c0c0d408e6e940e Signed-off-by: Jan Srnicek --- ...tor-pair-identification-context@2017-05-17.yang | 70 --------- lisp/api/src/main/yang/gpe@2017-05-18.yang | 162 --------------------- lisp/api/src/main/yang/gpe@2017-08-01.yang | 161 ++++++++++++++++++++ 3 files changed, 161 insertions(+), 232 deletions(-) delete mode 100644 lisp/api/src/main/yang/gpe-locator-pair-identification-context@2017-05-17.yang delete mode 100644 lisp/api/src/main/yang/gpe@2017-05-18.yang create mode 100644 lisp/api/src/main/yang/gpe@2017-08-01.yang (limited to 'lisp/api') diff --git a/lisp/api/src/main/yang/gpe-locator-pair-identification-context@2017-05-17.yang b/lisp/api/src/main/yang/gpe-locator-pair-identification-context@2017-05-17.yang deleted file mode 100644 index 776dbc927..000000000 --- a/lisp/api/src/main/yang/gpe-locator-pair-identification-context@2017-05-17.yang +++ /dev/null @@ -1,70 +0,0 @@ -module gpe-locator-pair-identification-context { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:gpe:locator:pair:identification:context"; - prefix "gpe-locator-pair-identification-context"; - - description - "This module contains mappings between gpe entry identificator and locator pair in vpp"; - - revision "2017-05-17" { - description - "Initial revision."; - } - - import lisp {prefix "lisp";} - import ietf-inet-types {prefix "inet";} - import yang-ext {prefix "ext";} - import naming-context { prefix "nc";} - - grouping gpe-locator-pair-identification-context-attributes{ - - container gpe-locator-pair-identification-contexts { - - list gpe-locator-pair-identification { - - key "name"; - - leaf name { - type string; - } - - container mappings{ - list mapping { - - key "id"; - - leaf id { - type string; - description "Id that uniquely identifies gpe entry"; - } - - list locator-pair-mapping { - key "id"; - - leaf id { - type string; - description "Id that uniquely identifies locator pair"; - } - - container pair { - leaf local-address{ - type inet:ip-address; - description "Local locator address"; - } - leaf remote-address { - type inet:ip-address; - description "Remote locator address"; - } - } - } - } - } - } - } - } - - augment /nc:contexts { - ext:augment-identifier "gpe-locator-pair-identification-ctx-augmentation"; - uses gpe-locator-pair-identification-context-attributes; - } -} \ No newline at end of file diff --git a/lisp/api/src/main/yang/gpe@2017-05-18.yang b/lisp/api/src/main/yang/gpe@2017-05-18.yang deleted file mode 100644 index c99d5f26a..000000000 --- a/lisp/api/src/main/yang/gpe@2017-05-18.yang +++ /dev/null @@ -1,162 +0,0 @@ -module gpe { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:gpe"; - prefix "gpe"; - - import lisp { - prefix "lisp"; - } - - import ietf-interfaces { - prefix "if"; - } - - import ietf-inet-types { - prefix "inet"; - } - - import ietf-lisp-address-types { - prefix "lisp-types"; - } - - revision 2017-05-18 { - description - "Add support for defining lisp gpe forward entries"; - } - - grouping locator-pair { - container locator-pair { - leaf local-locator { - type inet:ip-address; - description "Local locator address"; - } - leaf remote-locator { - type inet:ip-address; - description "Remote locator address"; - } - leaf weight { - type uint8; - description "Weight"; - } - } - } - grouping gpe-entry-table-grouping { - container gpe-entry-table { - when "../enable = 'true'"; - - list gpe-entry { - key id; - leaf id { - type string; - description "GPE entry ID"; - } - leaf dp-table { - type uint32; - mandatory true; - description "VRF/BD index"; - } - leaf vni { - type uint32; - mandatory true; - description "Virtual Network Identifier"; - } - container local-eid { - presence "Enforce mandatory only if present"; - uses lisp-types:lisp-address; - description "Local EID that must be a local address"; - } - container remote-eid { - presence "Enforce mandatory only if present"; - uses lisp-types:lisp-address; - description "Remote EID"; - } - list locator-pairs { - key id; - leaf id { - type string; - description "Locator Pair ID"; - } - uses locator-pair; - } - leaf action { - type lisp:map-reply-action; - description "Forwarding action for negative entries"; - } - } - } - } - - grouping gpe-feature-data-grouping { - //aggregation of all gpe data, restricted by GPE being enabled - container gpe-feature-data { - leaf enable { - type boolean; - description "Enable/disable GPE feature"; - } - - uses gpe-entry-table-grouping; - } - } - - container gpe { - // gpe_enable_disable - - uses gpe-feature-data-grouping; - description "GPE configuration"; - } - - container gpe-state { - //gpe_enable_disable_status_dump - config false; - - uses gpe-feature-data-grouping; - description "GPE state"; - } - - container native-forward-paths-tables { - // gpe_add_del_native_fwd_rpath - list native-forward-paths-table{ - key table-id; - - leaf table-id { - type uint32; - } - - list native-forward-path { - key next-hop-address; - - leaf next-hop-address { - type inet:ip-address; - } - - leaf next-hop-interface { - type if:interface-ref; - } - } - } - } - - container native-forward-paths-tables-state { - // gpe_native_fwd_rpaths_get - config false; - list native-forward-paths-table{ - key table-id; - - leaf table-id { - type uint32; - } - - list native-forward-path { - key next-hop-address; - - leaf next-hop-address { - type inet:ip-address; - } - - leaf next-hop-interface { - type if:interface-state-ref; - } - } - } - } -} \ No newline at end of file diff --git a/lisp/api/src/main/yang/gpe@2017-08-01.yang b/lisp/api/src/main/yang/gpe@2017-08-01.yang new file mode 100644 index 000000000..e327e9bd8 --- /dev/null +++ b/lisp/api/src/main/yang/gpe@2017-08-01.yang @@ -0,0 +1,161 @@ +module gpe { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:gpe"; + prefix "gpe"; + + import lisp { + prefix "lisp"; + } + + import ietf-interfaces { + prefix "if"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-lisp-address-types { + prefix "lisp-types"; + } + + revision 2017-08-01 { + description + "Locator pair composite key support"; + } + + revision 2017-05-18 { + description + "Add support for defining lisp gpe forward entries"; + } + + grouping locator-pairs-grouping { + list locator-pair { + key "local-locator remote-locator"; + leaf local-locator { + type inet:ip-address; + description "Local locator address"; + } + leaf remote-locator { + type inet:ip-address; + description "Remote locator address"; + } + leaf weight { + type uint8; + description "Weight"; + } + } + } + grouping gpe-entry-table-grouping { + container gpe-entry-table { + when "../enable = 'true'"; + + list gpe-entry { + key id; + leaf id { + type string; + description "GPE entry ID"; + } + leaf dp-table { + type uint32; + mandatory true; + description "VRF/BD index"; + } + leaf vni { + type uint32; + mandatory true; + description "Virtual Network Identifier"; + } + container local-eid { + presence "Enforce mandatory only if present"; + uses lisp-types:lisp-address; + description "Local EID that must be a local address"; + } + container remote-eid { + presence "Enforce mandatory only if present"; + uses lisp-types:lisp-address; + description "Remote EID"; + } + leaf action { + type lisp:map-reply-action; + description "Forwarding action for negative entries"; + } + uses locator-pairs-grouping; + } + } + } + + grouping gpe-feature-data-grouping { + //aggregation of all gpe data, restricted by GPE being enabled + container gpe-feature-data { + leaf enable { + type boolean; + description "Enable/disable GPE feature"; + } + + uses gpe-entry-table-grouping; + } + } + + container gpe { + // gpe_enable_disable + + uses gpe-feature-data-grouping; + description "GPE configuration"; + } + + container gpe-state { + //gpe_enable_disable_status_dump + config false; + + uses gpe-feature-data-grouping; + description "GPE state"; + } + + container native-forward-paths-tables { + // gpe_add_del_native_fwd_rpath + list native-forward-paths-table{ + key table-id; + + leaf table-id { + type uint32; + } + + list native-forward-path { + key next-hop-address; + + leaf next-hop-address { + type inet:ip-address; + } + + leaf next-hop-interface { + type if:interface-ref; + } + } + } + } + + container native-forward-paths-tables-state { + // gpe_native_fwd_rpaths_get + config false; + list native-forward-paths-table{ + key table-id; + + leaf table-id { + type uint32; + } + + list native-forward-path { + key next-hop-address; + + leaf next-hop-address { + type inet:ip-address; + } + + leaf next-hop-interface { + type if:interface-state-ref; + } + } + } + } +} \ No newline at end of file -- cgit 1.2.3-korg