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 --- .../yang/adjacencies-identification-context.yang | 65 -- ...acencies-identification-context@2016-08-01.yang | 65 ++ lisp/api/src/main/yang/eid-mapping-context.yang | 44 -- .../main/yang/eid-mapping-context@2016-08-01.yang | 44 ++ .../yang/gpe-entry-identification-context.yang | 70 --- ...pe-entry-identification-context@2017-05-17.yang | 70 +++ .../gpe-locator-pair-identification-context.yang | 70 --- ...tor-pair-identification-context@2017-05-17.yang | 70 +++ lisp/api/src/main/yang/gpe.yang | 162 ----- lisp/api/src/main/yang/gpe@2017-05-18.yang | 162 +++++ .../api/src/main/yang/ietf-lisp-address-types.yang | 677 --------------------- .../yang/ietf-lisp-address-types@2015-11-05.yang | 677 +++++++++++++++++++++ lisp/api/src/main/yang/lisp.yang | 476 --------------- lisp/api/src/main/yang/lisp@2017-03-15.yang | 476 +++++++++++++++ 14 files changed, 1564 insertions(+), 1564 deletions(-) delete mode 100644 lisp/api/src/main/yang/adjacencies-identification-context.yang create mode 100644 lisp/api/src/main/yang/adjacencies-identification-context@2016-08-01.yang delete mode 100644 lisp/api/src/main/yang/eid-mapping-context.yang create mode 100644 lisp/api/src/main/yang/eid-mapping-context@2016-08-01.yang delete mode 100644 lisp/api/src/main/yang/gpe-entry-identification-context.yang create mode 100644 lisp/api/src/main/yang/gpe-entry-identification-context@2017-05-17.yang delete mode 100644 lisp/api/src/main/yang/gpe-locator-pair-identification-context.yang create 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.yang create mode 100644 lisp/api/src/main/yang/gpe@2017-05-18.yang delete mode 100755 lisp/api/src/main/yang/ietf-lisp-address-types.yang create mode 100755 lisp/api/src/main/yang/ietf-lisp-address-types@2015-11-05.yang delete mode 100755 lisp/api/src/main/yang/lisp.yang create mode 100755 lisp/api/src/main/yang/lisp@2017-03-15.yang (limited to 'lisp') diff --git a/lisp/api/src/main/yang/adjacencies-identification-context.yang b/lisp/api/src/main/yang/adjacencies-identification-context.yang deleted file mode 100644 index ae05f83f5..000000000 --- a/lisp/api/src/main/yang/adjacencies-identification-context.yang +++ /dev/null @@ -1,65 +0,0 @@ -module adjacencies-identification-context { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:adjacencies:identification:context"; - prefix "adjacencies-identification-context"; - - description - "This module contains mappings between adjacency identificator and actual unique combination of - remote and local eid in vpp"; - - revision "2016-08-01" { - description - "Initial revision."; - } - - import lisp {prefix "lisp";} - import ietf-lisp-address-types {prefix "lisp-types";} - import yang-ext {prefix "ext";} - import naming-context { prefix "nc";} - - grouping adjacencies-identification-context-attributes{ - - container adjacencies-identification-contexts { - - list adjacencies-identification { - - key "name"; - - leaf name { - type string; - } - - container mappings{ - list mapping { - - key "id"; - - leaf id { - type string; - description "Id that uniquely identifies adjacency"; - } - - container eid-identificator-pair{ - leaf local-eid-id { - type lisp:mapping-id; - description "Local EID identifier"; - mandatory true; - } - - leaf remote-eid-id { - type lisp:mapping-id; - description "Remote EID identifier"; - mandatory true; - } - } - } - } - } - } - } - - augment /nc:contexts { - ext:augment-identifier "adjacencies-identification-ctx-augmentation"; - uses adjacencies-identification-context-attributes; - } -} \ No newline at end of file diff --git a/lisp/api/src/main/yang/adjacencies-identification-context@2016-08-01.yang b/lisp/api/src/main/yang/adjacencies-identification-context@2016-08-01.yang new file mode 100644 index 000000000..ae05f83f5 --- /dev/null +++ b/lisp/api/src/main/yang/adjacencies-identification-context@2016-08-01.yang @@ -0,0 +1,65 @@ +module adjacencies-identification-context { + yang-version 1; + namespace "urn:honeycomb:params:xml:ns:yang:adjacencies:identification:context"; + prefix "adjacencies-identification-context"; + + description + "This module contains mappings between adjacency identificator and actual unique combination of + remote and local eid in vpp"; + + revision "2016-08-01" { + description + "Initial revision."; + } + + import lisp {prefix "lisp";} + import ietf-lisp-address-types {prefix "lisp-types";} + import yang-ext {prefix "ext";} + import naming-context { prefix "nc";} + + grouping adjacencies-identification-context-attributes{ + + container adjacencies-identification-contexts { + + list adjacencies-identification { + + key "name"; + + leaf name { + type string; + } + + container mappings{ + list mapping { + + key "id"; + + leaf id { + type string; + description "Id that uniquely identifies adjacency"; + } + + container eid-identificator-pair{ + leaf local-eid-id { + type lisp:mapping-id; + description "Local EID identifier"; + mandatory true; + } + + leaf remote-eid-id { + type lisp:mapping-id; + description "Remote EID identifier"; + mandatory true; + } + } + } + } + } + } + } + + augment /nc:contexts { + ext:augment-identifier "adjacencies-identification-ctx-augmentation"; + uses adjacencies-identification-context-attributes; + } +} \ No newline at end of file diff --git a/lisp/api/src/main/yang/eid-mapping-context.yang b/lisp/api/src/main/yang/eid-mapping-context.yang deleted file mode 100644 index 3fb6d893a..000000000 --- a/lisp/api/src/main/yang/eid-mapping-context.yang +++ /dev/null @@ -1,44 +0,0 @@ -module eid-mapping-context { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:eid:mapping:context"; - prefix "eid-mapping-context"; - - description - "This module contains mappings stored for local-mappings id to actual eid"; - - revision "2016-08-01" { - description - "Initial revision."; - } - - import lisp {prefix "lisp";} - import ietf-lisp-address-types {prefix "lisp-types";} - - container contexts { - list eid-mapping-context { - - key "name"; - - leaf name { - type string; - } - - container mappings{ - list mapping { - - key "id"; - - leaf id { - type lisp:mapping-id; - description "Id that uniquely identifies a mapping"; - } - - container eid { - uses lisp-types:lisp-address; - description "EID address"; - } - } - } - } - } -} \ No newline at end of file diff --git a/lisp/api/src/main/yang/eid-mapping-context@2016-08-01.yang b/lisp/api/src/main/yang/eid-mapping-context@2016-08-01.yang new file mode 100644 index 000000000..3fb6d893a --- /dev/null +++ b/lisp/api/src/main/yang/eid-mapping-context@2016-08-01.yang @@ -0,0 +1,44 @@ +module eid-mapping-context { + yang-version 1; + namespace "urn:honeycomb:params:xml:ns:yang:eid:mapping:context"; + prefix "eid-mapping-context"; + + description + "This module contains mappings stored for local-mappings id to actual eid"; + + revision "2016-08-01" { + description + "Initial revision."; + } + + import lisp {prefix "lisp";} + import ietf-lisp-address-types {prefix "lisp-types";} + + container contexts { + list eid-mapping-context { + + key "name"; + + leaf name { + type string; + } + + container mappings{ + list mapping { + + key "id"; + + leaf id { + type lisp:mapping-id; + description "Id that uniquely identifies a mapping"; + } + + container eid { + uses lisp-types:lisp-address; + description "EID address"; + } + } + } + } + } +} \ No newline at end of file diff --git a/lisp/api/src/main/yang/gpe-entry-identification-context.yang b/lisp/api/src/main/yang/gpe-entry-identification-context.yang deleted file mode 100644 index 8f4d8aceb..000000000 --- a/lisp/api/src/main/yang/gpe-entry-identification-context.yang +++ /dev/null @@ -1,70 +0,0 @@ -module gpe-entry-identification-context { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:gpe:entry:identification:context"; - prefix "gpe-entry-identification-context"; - - description - "This module contains mappings between gpe entry identificator and actual unique combination of - remote/local eid and vni in vpp"; - - revision "2017-05-17" { - description - "Initial revision."; - } - - import lisp {prefix "lisp";} - import ietf-lisp-address-types {prefix "lisp-types";} - import yang-ext {prefix "ext";} - import naming-context { prefix "nc";} - - grouping gpe-entry-identification-context-attributes{ - - container gpe-entry-identification-contexts { - - list gpe-entry-identification { - - key "name"; - - leaf name { - type string; - } - - container mappings{ - list mapping { - - key "id"; - - leaf id { - type string; - description "Id that uniquely identifies gpe entry"; - } - - container gpe-entry-identificator{ - // these three attributes allow to identificated gpe entry - container local-eid { - uses lisp-types:lisp-address; - description "Local EID that must be a local address"; - } - - container remote-eid { - uses lisp-types:lisp-address; - description "Remote EID"; - } - - leaf vni { - type uint32; - mandatory true; - description "Virtual Network Identifier"; - } - } - } - } - } - } - } - - augment /nc:contexts { - ext:augment-identifier "gpe-entry-identification-ctx-augmentation"; - uses gpe-entry-identification-context-attributes; - } -} \ No newline at end of file diff --git a/lisp/api/src/main/yang/gpe-entry-identification-context@2017-05-17.yang b/lisp/api/src/main/yang/gpe-entry-identification-context@2017-05-17.yang new file mode 100644 index 000000000..8f4d8aceb --- /dev/null +++ b/lisp/api/src/main/yang/gpe-entry-identification-context@2017-05-17.yang @@ -0,0 +1,70 @@ +module gpe-entry-identification-context { + yang-version 1; + namespace "urn:honeycomb:params:xml:ns:yang:gpe:entry:identification:context"; + prefix "gpe-entry-identification-context"; + + description + "This module contains mappings between gpe entry identificator and actual unique combination of + remote/local eid and vni in vpp"; + + revision "2017-05-17" { + description + "Initial revision."; + } + + import lisp {prefix "lisp";} + import ietf-lisp-address-types {prefix "lisp-types";} + import yang-ext {prefix "ext";} + import naming-context { prefix "nc";} + + grouping gpe-entry-identification-context-attributes{ + + container gpe-entry-identification-contexts { + + list gpe-entry-identification { + + key "name"; + + leaf name { + type string; + } + + container mappings{ + list mapping { + + key "id"; + + leaf id { + type string; + description "Id that uniquely identifies gpe entry"; + } + + container gpe-entry-identificator{ + // these three attributes allow to identificated gpe entry + container local-eid { + uses lisp-types:lisp-address; + description "Local EID that must be a local address"; + } + + container remote-eid { + uses lisp-types:lisp-address; + description "Remote EID"; + } + + leaf vni { + type uint32; + mandatory true; + description "Virtual Network Identifier"; + } + } + } + } + } + } + } + + augment /nc:contexts { + ext:augment-identifier "gpe-entry-identification-ctx-augmentation"; + uses gpe-entry-identification-context-attributes; + } +} \ No newline at end of file diff --git a/lisp/api/src/main/yang/gpe-locator-pair-identification-context.yang b/lisp/api/src/main/yang/gpe-locator-pair-identification-context.yang deleted file mode 100644 index 776dbc927..000000000 --- a/lisp/api/src/main/yang/gpe-locator-pair-identification-context.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-locator-pair-identification-context@2017-05-17.yang b/lisp/api/src/main/yang/gpe-locator-pair-identification-context@2017-05-17.yang new file mode 100644 index 000000000..776dbc927 --- /dev/null +++ b/lisp/api/src/main/yang/gpe-locator-pair-identification-context@2017-05-17.yang @@ -0,0 +1,70 @@ +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.yang b/lisp/api/src/main/yang/gpe.yang deleted file mode 100644 index c99d5f26a..000000000 --- a/lisp/api/src/main/yang/gpe.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-05-18.yang b/lisp/api/src/main/yang/gpe@2017-05-18.yang new file mode 100644 index 000000000..c99d5f26a --- /dev/null +++ b/lisp/api/src/main/yang/gpe@2017-05-18.yang @@ -0,0 +1,162 @@ +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/ietf-lisp-address-types.yang b/lisp/api/src/main/yang/ietf-lisp-address-types.yang deleted file mode 100755 index 2a3a1d31d..000000000 --- a/lisp/api/src/main/yang/ietf-lisp-address-types.yang +++ /dev/null @@ -1,677 +0,0 @@ -module ietf-lisp-address-types { - namespace "urn:ietf:params:xml:ns:yang:ietf-lisp-address-types"; - prefix laddr; - import ietf-inet-types { - prefix inet; - revision-date 2013-07-15; - } - import ietf-yang-types { - prefix yang; - revision-date 2013-07-15; - } - organization - "IETF LISP (Locator/ID Separation Protocol) Working Group"; - contact - "lisp@ietf.org"; - description - "This YANG module defines the LISP Canonical Address Formats - (LCAF) for LISP. The module can be extended by vendors to - define vendor-specific parameters. - - Copyright (c) 2014 IETF Trust and the persons identified as - authors of the code. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, is permitted pursuant to, and subject - to the license terms contained in, the Simplified BSD License - set forth in Section 4.c of the IETF Trust's Legal Provisions - Relating to IETF Documents - (http://trustee.ietf.org/license-info). - - This version of this YANG module is part of RFC 6338; see - the RFC itself for full legal notices. - - "; - revision 2015-11-05 { - description - "Initial revision."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10"; - } - identity lisp-address-family { - description - "Base identity from which identities describing LISP address - families are derived."; - } - identity no-address-afi { - base lisp-address-family; - description - "IANA Reserved."; - } - identity ipv4-afi { - base lisp-address-family; - description - "IANA IPv4 address family."; - } - identity ipv4-prefix-afi { - base lisp-address-family; - description - "IANA IPv4 address family prefix."; - } - identity ipv6-afi { - base lisp-address-family; - description - "IANA IPv6 address family."; - } - identity ipv6-prefix-afi { - base lisp-address-family; - description - "IANA IPv6 address family prefix."; - } - identity mac-afi { - base lisp-address-family; - description - "IANA MAC address family."; - } - identity distinguished-name-afi { - base lisp-address-family; - description - "IANA Distinguished Name address family."; - } - identity as-number-afi { - base lisp-address-family; - description - "IANA AS Number address family."; - } - identity lcaf { - base lisp-address-family; - description - "IANA LISP Canonical Address Format address family."; - } - identity null-address-lcaf { - base lcaf; - description - "Null body LCAF type."; - } - identity afi-list-lcaf { - base lcaf; - description - "AFI-List LCAF type."; - } - identity instance-id-lcaf { - base lcaf; - description - "Instance-ID LCAF type."; - } - identity as-number-lcaf { - base lcaf; - description - "AS Number LCAF type."; - } - identity application-data-lcaf { - base lcaf; - description - "Application Data LCAF type."; - } - identity geo-coordinates-lcaf { - base lcaf; - description - "Geo-coordinates LCAF type."; - } - identity opaque-key-lcaf { - base lcaf; - description - "Opaque Key LCAF type."; - } - identity nat-traversal-lcaf { - base lcaf; - description - "NAT-Traversal LCAF type."; - } - identity nonce-locator-lcaf { - base lcaf; - description - "Nonce-Locator LCAF type."; - } - identity multicast-info-lcaf { - base lcaf; - description - "Multicast Info LCAF type."; - } - identity explicit-locator-path-lcaf { - base lcaf; - description - "Explicit Locator Path LCAF type."; - } - identity security-key-lcaf { - base lcaf; - description - "Security Key LCAF type."; - } - identity source-dest-key-lcaf { - base lcaf; - description - "Source/Dest LCAF type."; - } - identity replication-list-lcaf { - base lcaf; - description - "Replication-List LCAF type."; - } - identity json-data-model-lcaf { - base lcaf; - description - "JSON Data Model LCAF type."; - } - identity key-value-address-lcaf { - base lcaf; - description - "Key/Value Address LCAF type."; - } - identity encapsulation-format-lcaf { - base lcaf; - description - "Encapsulation Format LCAF type."; - } - identity service-path-lcaf { - base lcaf; - description - "Service Path LCAF type."; - } - typedef instance-id-type { - type uint32 { - range "0..16777215"; - } - description - "Defines the range of values for an Instance ID."; - } - typedef service-path-id-type { - type uint32 { - range "0..16777215"; - } - description - "Defines the range of values for a Service Path ID."; - } - typedef distinguished-name-type { - type string; - description - "Distinguished Name address."; - reference - "http://www.iana.org/assignments/address-family-numbers/ - address-family-numbers.xhtml"; - } - typedef simple-address { - type union { - type inet:ip-address; - type inet:ip-prefix; - type yang:mac-address; - type distinguished-name-type; - type inet:as-number; - } - description - "Union of address types that can be part of LCAFs."; - } - - typedef lisp-address-family-ref { - type identityref { - base lisp-address-family; - } - description - "LISP address family reference."; - } - typedef lcaf-ref { - type identityref { - base lcaf; - } - description - "LCAF types reference."; - } - - grouping lisp-address { - description - "Generic LISP address."; - leaf address-type { - type lisp-address-family-ref; - mandatory true; - description - "Type of the LISP address."; - } - leaf virtual-network-id { - type instance-id-type; - description - "Virtual Network Identifier (instance-id) of the address."; - } - choice address { - description - "Various LISP address types, including IP, MAC, and LCAF."; - - leaf no-address { - when "../address-type = 'laddr:no-addr-afi'" { - description - "When AFI is 0."; - } - type empty; - description - "No address."; - } - leaf ipv4 { - when "../address-type = 'laddr:ipv4-afi'" { - description - "When AFI is IPv4."; - } - type inet:ipv4-address; - description - "IPv4 address."; - } - leaf ipv4-prefix { - when "../address-type = 'laddr:ipv4-prefix-afi'" { - description - "When AFI is IPv4."; - } - type inet:ipv4-prefix; - description - "IPv4 prefix."; - } - leaf ipv6 { - when "../address-type = 'laddr:ipv6-afi'" { - description - "When AFI is IPv6."; - } - type inet:ipv6-address; - description - "IPv6 address."; - } - leaf ipv6-prefix { - when "../address-type = 'laddr:ipv6-prefix-afi'" { - description - "When AFI is IPv6."; - } - type inet:ipv6-prefix; - description - "IPv6 address."; - } - leaf mac { - when "../address-type = 'laddr:mac-afi'" { - description - "When AFI is MAC."; - } - type yang:mac-address; - description - "MAC address."; - } - leaf distinguished-name { - when "../address-type = 'laddr:distinguished-name-afi'" { - description - "When AFI is distinguished-name."; - } - type distinguished-name-type; - description - "Distinguished Name address."; - } - leaf as-number { - when "../address-type = 'laddr:as-number-afi'" { - description - "When AFI is as-number."; - } - type inet:as-number; - description - "AS Number."; - } - container null-address { - when "../address-type = 'laddr:null-address-lcaf'" { - description - "When LCAF type is null."; - } - description - "Null body LCAF type"; - leaf address { - type empty; - description - "AFI address."; - } - } - container afi-list { - when "../address-type = 'laddr:afi-list-lcaf'" { - description - "When LCAF type is AFI-List."; - } - description - "AFI-List LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.16.1"; - leaf-list address-list { - type simple-address; - description - "List of AFI addresses."; - } - } - container instance-id { - when "../address-type = 'laddr:instance-id-lcaf'" { - description - "When LCAF type is Instance-ID"; - } - description - "Instance ID LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.2"; - leaf iid { - type instance-id-type; - description - "Instance ID value."; - } - leaf mask-length { - type uint8; - description - "Mask length."; - } - leaf address { - type simple-address; - description - "AFI address."; - } - } - container as-number-lcaf { - when "../address-type = 'laddr:as-number-lcaf'" { - description - "When LCAF type is AS-Number."; - } - description - "AS Number LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.3"; - leaf as { - type inet:as-number; - description - "AS number."; - } - leaf address { - type simple-address; - description - "AFI address."; - } - } - container application-data { - when "../address-type = 'laddr:application-data-lcaf'" { - description - "When LCAF type is Application Data."; - } - description - "Application Data LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.4"; - leaf address { - type simple-address; - description - "AFI address."; - } - leaf protocol { - type uint8; - description - "Protocol number."; - } - leaf ip-tos { - type int32; - description - "Type of service field."; - } - leaf local-port-low { - type inet:port-number; - description - "Low end of local port range."; - } - leaf local-port-high { - type inet:port-number; - description - "High end of local port range."; - } - leaf remote-port-low { - type inet:port-number; - description - "Low end of remote port range."; - } - leaf remote-port-high { - type inet:port-number; - description - "High end of remote port range."; - } - } - container geo-coordinates { - when "../address-type = 'laddr:geo-coordinates-lcaf'" { - description - "When LCAF type is Geo-coordinates."; - } - description - "Geo-coordinates LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.5"; - leaf latitude { - type bits { - bit N { - description - "Latitude bit."; - } - } - description - "Bit that selects between North and South latitude."; - } - leaf latitude-degrees { - type uint8 { - range "0 .. 90"; - } - description - "Degrees of latitude."; - } - leaf latitude-minutes { - type uint8 { - range "0..59"; - } - description - "Minutes of latitude."; - } - leaf latitude-seconds { - type uint8 { - range "0..59"; - } - description - "Seconds of latitude."; - } - leaf longitude { - type bits { - bit E { - description - "Longitude bit."; - } - } - description - "Bit that selects between East and West longitude."; - } - leaf longitude-degrees { - type uint16 { - range "0 .. 180"; - } - description - "Degrees of longitude."; - } - leaf longitude-minutes { - type uint8 { - range "0..59"; - } - description - "Minutes of longitude."; - } - leaf longitude-seconds { - type uint8 { - range "0..59"; - } - description - "Seconds of longitude."; - } - leaf altitude { - type int32; - description - "Height relative to sea level in meters."; - } - leaf address { - type simple-address; - description - "AFI address."; - } - } - container nat-traversal { - when "../address-type = 'laddr:nat-traversal-lcaf'" { - description - "When LCAF type is NAT-Traversal."; - } - description - "NAT-Traversal LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.6"; - leaf ms-udp-port { - type uint16; - description - "Map-Server UDP port (set to 4342)."; - } - leaf etr-udp-port { - type uint16; - description - "ETR UDP port."; - } - leaf global-etr-rloc { - type simple-address; - description - "Global ETR RLOC address."; - } - leaf ms-rloc { - type simple-address; - description - "Map-Server RLOC address."; - } - leaf private-etr-rloc { - type simple-address; - description - "Private ETR RLOC address."; - } - leaf-list rtr-rlocs { - type simple-address; - description - "List of RTR RLOC addresses."; - } - } - container explicit-locator-path { - when "../address-type = 'laddr:explicit-locator-path-lcaf'" { - description - "When LCAF type type is Explicit Locator Path."; - } - description - "Explicit Locator Path LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.9"; - list hop { - key "hop-id"; - ordered-by user; - description - "List of locator hops forming the explicit path."; - leaf hop-id { - type string { - length "1..64"; - } - description - "Unique identifier for the hop."; - } - leaf address { - type simple-address; - description - "AFI address."; - } - leaf lrs-bits { - type bits{ - bit lookup { - description - "Lookup bit."; - } - bit rloc-probe { - description - "RLOC-probe bit."; - } - bit strict { - description - "Strict bit."; - } - } - description - "Flag bits per hop."; - } - } - } - container source-dest-key { - when "../address-type = 'laddr:source-dest-key-lcaf'" { - description - "When LCAF type type is Source/Dest."; - } - description - "Source/Dest LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.11"; - leaf source { - type simple-address; - description - "Source address."; - } - leaf dest { - type simple-address; - description - "Destination address."; - } - } - container key-value-address { - when "../address-type = 'laddr:key-value-address-lcaf'" { - description - "When LCAF type type is Key/Value Address."; - } - description - "Key/Value Address LCAF type."; - reference - "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 - #section-4.11"; - leaf key { - type simple-address; - description - "Address as Key."; - } - leaf value { - type simple-address; - description - "Address as Value."; - } - } - container service-path { - when "../address-type = 'laddr:service-path-lcaf'" { - description - "When LCAF type service path identifier."; - } - description - "Service Path LCAF type."; - reference - "http://tools.ietf.org/html/draft-ermagan-lisp-nsh-00"; - leaf service-path-id { - type service-path-id-type; - description - "Service path identifier for the path for NSH header"; - } - leaf service-index { - type uint8; - description - "Service path index for NSH header"; - } - } - } - } -} diff --git a/lisp/api/src/main/yang/ietf-lisp-address-types@2015-11-05.yang b/lisp/api/src/main/yang/ietf-lisp-address-types@2015-11-05.yang new file mode 100755 index 000000000..2a3a1d31d --- /dev/null +++ b/lisp/api/src/main/yang/ietf-lisp-address-types@2015-11-05.yang @@ -0,0 +1,677 @@ +module ietf-lisp-address-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-lisp-address-types"; + prefix laddr; + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + organization + "IETF LISP (Locator/ID Separation Protocol) Working Group"; + contact + "lisp@ietf.org"; + description + "This YANG module defines the LISP Canonical Address Formats + (LCAF) for LISP. The module can be extended by vendors to + define vendor-specific parameters. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6338; see + the RFC itself for full legal notices. + + "; + revision 2015-11-05 { + description + "Initial revision."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10"; + } + identity lisp-address-family { + description + "Base identity from which identities describing LISP address + families are derived."; + } + identity no-address-afi { + base lisp-address-family; + description + "IANA Reserved."; + } + identity ipv4-afi { + base lisp-address-family; + description + "IANA IPv4 address family."; + } + identity ipv4-prefix-afi { + base lisp-address-family; + description + "IANA IPv4 address family prefix."; + } + identity ipv6-afi { + base lisp-address-family; + description + "IANA IPv6 address family."; + } + identity ipv6-prefix-afi { + base lisp-address-family; + description + "IANA IPv6 address family prefix."; + } + identity mac-afi { + base lisp-address-family; + description + "IANA MAC address family."; + } + identity distinguished-name-afi { + base lisp-address-family; + description + "IANA Distinguished Name address family."; + } + identity as-number-afi { + base lisp-address-family; + description + "IANA AS Number address family."; + } + identity lcaf { + base lisp-address-family; + description + "IANA LISP Canonical Address Format address family."; + } + identity null-address-lcaf { + base lcaf; + description + "Null body LCAF type."; + } + identity afi-list-lcaf { + base lcaf; + description + "AFI-List LCAF type."; + } + identity instance-id-lcaf { + base lcaf; + description + "Instance-ID LCAF type."; + } + identity as-number-lcaf { + base lcaf; + description + "AS Number LCAF type."; + } + identity application-data-lcaf { + base lcaf; + description + "Application Data LCAF type."; + } + identity geo-coordinates-lcaf { + base lcaf; + description + "Geo-coordinates LCAF type."; + } + identity opaque-key-lcaf { + base lcaf; + description + "Opaque Key LCAF type."; + } + identity nat-traversal-lcaf { + base lcaf; + description + "NAT-Traversal LCAF type."; + } + identity nonce-locator-lcaf { + base lcaf; + description + "Nonce-Locator LCAF type."; + } + identity multicast-info-lcaf { + base lcaf; + description + "Multicast Info LCAF type."; + } + identity explicit-locator-path-lcaf { + base lcaf; + description + "Explicit Locator Path LCAF type."; + } + identity security-key-lcaf { + base lcaf; + description + "Security Key LCAF type."; + } + identity source-dest-key-lcaf { + base lcaf; + description + "Source/Dest LCAF type."; + } + identity replication-list-lcaf { + base lcaf; + description + "Replication-List LCAF type."; + } + identity json-data-model-lcaf { + base lcaf; + description + "JSON Data Model LCAF type."; + } + identity key-value-address-lcaf { + base lcaf; + description + "Key/Value Address LCAF type."; + } + identity encapsulation-format-lcaf { + base lcaf; + description + "Encapsulation Format LCAF type."; + } + identity service-path-lcaf { + base lcaf; + description + "Service Path LCAF type."; + } + typedef instance-id-type { + type uint32 { + range "0..16777215"; + } + description + "Defines the range of values for an Instance ID."; + } + typedef service-path-id-type { + type uint32 { + range "0..16777215"; + } + description + "Defines the range of values for a Service Path ID."; + } + typedef distinguished-name-type { + type string; + description + "Distinguished Name address."; + reference + "http://www.iana.org/assignments/address-family-numbers/ + address-family-numbers.xhtml"; + } + typedef simple-address { + type union { + type inet:ip-address; + type inet:ip-prefix; + type yang:mac-address; + type distinguished-name-type; + type inet:as-number; + } + description + "Union of address types that can be part of LCAFs."; + } + + typedef lisp-address-family-ref { + type identityref { + base lisp-address-family; + } + description + "LISP address family reference."; + } + typedef lcaf-ref { + type identityref { + base lcaf; + } + description + "LCAF types reference."; + } + + grouping lisp-address { + description + "Generic LISP address."; + leaf address-type { + type lisp-address-family-ref; + mandatory true; + description + "Type of the LISP address."; + } + leaf virtual-network-id { + type instance-id-type; + description + "Virtual Network Identifier (instance-id) of the address."; + } + choice address { + description + "Various LISP address types, including IP, MAC, and LCAF."; + + leaf no-address { + when "../address-type = 'laddr:no-addr-afi'" { + description + "When AFI is 0."; + } + type empty; + description + "No address."; + } + leaf ipv4 { + when "../address-type = 'laddr:ipv4-afi'" { + description + "When AFI is IPv4."; + } + type inet:ipv4-address; + description + "IPv4 address."; + } + leaf ipv4-prefix { + when "../address-type = 'laddr:ipv4-prefix-afi'" { + description + "When AFI is IPv4."; + } + type inet:ipv4-prefix; + description + "IPv4 prefix."; + } + leaf ipv6 { + when "../address-type = 'laddr:ipv6-afi'" { + description + "When AFI is IPv6."; + } + type inet:ipv6-address; + description + "IPv6 address."; + } + leaf ipv6-prefix { + when "../address-type = 'laddr:ipv6-prefix-afi'" { + description + "When AFI is IPv6."; + } + type inet:ipv6-prefix; + description + "IPv6 address."; + } + leaf mac { + when "../address-type = 'laddr:mac-afi'" { + description + "When AFI is MAC."; + } + type yang:mac-address; + description + "MAC address."; + } + leaf distinguished-name { + when "../address-type = 'laddr:distinguished-name-afi'" { + description + "When AFI is distinguished-name."; + } + type distinguished-name-type; + description + "Distinguished Name address."; + } + leaf as-number { + when "../address-type = 'laddr:as-number-afi'" { + description + "When AFI is as-number."; + } + type inet:as-number; + description + "AS Number."; + } + container null-address { + when "../address-type = 'laddr:null-address-lcaf'" { + description + "When LCAF type is null."; + } + description + "Null body LCAF type"; + leaf address { + type empty; + description + "AFI address."; + } + } + container afi-list { + when "../address-type = 'laddr:afi-list-lcaf'" { + description + "When LCAF type is AFI-List."; + } + description + "AFI-List LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.16.1"; + leaf-list address-list { + type simple-address; + description + "List of AFI addresses."; + } + } + container instance-id { + when "../address-type = 'laddr:instance-id-lcaf'" { + description + "When LCAF type is Instance-ID"; + } + description + "Instance ID LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.2"; + leaf iid { + type instance-id-type; + description + "Instance ID value."; + } + leaf mask-length { + type uint8; + description + "Mask length."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + } + container as-number-lcaf { + when "../address-type = 'laddr:as-number-lcaf'" { + description + "When LCAF type is AS-Number."; + } + description + "AS Number LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.3"; + leaf as { + type inet:as-number; + description + "AS number."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + } + container application-data { + when "../address-type = 'laddr:application-data-lcaf'" { + description + "When LCAF type is Application Data."; + } + description + "Application Data LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.4"; + leaf address { + type simple-address; + description + "AFI address."; + } + leaf protocol { + type uint8; + description + "Protocol number."; + } + leaf ip-tos { + type int32; + description + "Type of service field."; + } + leaf local-port-low { + type inet:port-number; + description + "Low end of local port range."; + } + leaf local-port-high { + type inet:port-number; + description + "High end of local port range."; + } + leaf remote-port-low { + type inet:port-number; + description + "Low end of remote port range."; + } + leaf remote-port-high { + type inet:port-number; + description + "High end of remote port range."; + } + } + container geo-coordinates { + when "../address-type = 'laddr:geo-coordinates-lcaf'" { + description + "When LCAF type is Geo-coordinates."; + } + description + "Geo-coordinates LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.5"; + leaf latitude { + type bits { + bit N { + description + "Latitude bit."; + } + } + description + "Bit that selects between North and South latitude."; + } + leaf latitude-degrees { + type uint8 { + range "0 .. 90"; + } + description + "Degrees of latitude."; + } + leaf latitude-minutes { + type uint8 { + range "0..59"; + } + description + "Minutes of latitude."; + } + leaf latitude-seconds { + type uint8 { + range "0..59"; + } + description + "Seconds of latitude."; + } + leaf longitude { + type bits { + bit E { + description + "Longitude bit."; + } + } + description + "Bit that selects between East and West longitude."; + } + leaf longitude-degrees { + type uint16 { + range "0 .. 180"; + } + description + "Degrees of longitude."; + } + leaf longitude-minutes { + type uint8 { + range "0..59"; + } + description + "Minutes of longitude."; + } + leaf longitude-seconds { + type uint8 { + range "0..59"; + } + description + "Seconds of longitude."; + } + leaf altitude { + type int32; + description + "Height relative to sea level in meters."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + } + container nat-traversal { + when "../address-type = 'laddr:nat-traversal-lcaf'" { + description + "When LCAF type is NAT-Traversal."; + } + description + "NAT-Traversal LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.6"; + leaf ms-udp-port { + type uint16; + description + "Map-Server UDP port (set to 4342)."; + } + leaf etr-udp-port { + type uint16; + description + "ETR UDP port."; + } + leaf global-etr-rloc { + type simple-address; + description + "Global ETR RLOC address."; + } + leaf ms-rloc { + type simple-address; + description + "Map-Server RLOC address."; + } + leaf private-etr-rloc { + type simple-address; + description + "Private ETR RLOC address."; + } + leaf-list rtr-rlocs { + type simple-address; + description + "List of RTR RLOC addresses."; + } + } + container explicit-locator-path { + when "../address-type = 'laddr:explicit-locator-path-lcaf'" { + description + "When LCAF type type is Explicit Locator Path."; + } + description + "Explicit Locator Path LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.9"; + list hop { + key "hop-id"; + ordered-by user; + description + "List of locator hops forming the explicit path."; + leaf hop-id { + type string { + length "1..64"; + } + description + "Unique identifier for the hop."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + leaf lrs-bits { + type bits{ + bit lookup { + description + "Lookup bit."; + } + bit rloc-probe { + description + "RLOC-probe bit."; + } + bit strict { + description + "Strict bit."; + } + } + description + "Flag bits per hop."; + } + } + } + container source-dest-key { + when "../address-type = 'laddr:source-dest-key-lcaf'" { + description + "When LCAF type type is Source/Dest."; + } + description + "Source/Dest LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.11"; + leaf source { + type simple-address; + description + "Source address."; + } + leaf dest { + type simple-address; + description + "Destination address."; + } + } + container key-value-address { + when "../address-type = 'laddr:key-value-address-lcaf'" { + description + "When LCAF type type is Key/Value Address."; + } + description + "Key/Value Address LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.11"; + leaf key { + type simple-address; + description + "Address as Key."; + } + leaf value { + type simple-address; + description + "Address as Value."; + } + } + container service-path { + when "../address-type = 'laddr:service-path-lcaf'" { + description + "When LCAF type service path identifier."; + } + description + "Service Path LCAF type."; + reference + "http://tools.ietf.org/html/draft-ermagan-lisp-nsh-00"; + leaf service-path-id { + type service-path-id-type; + description + "Service path identifier for the path for NSH header"; + } + leaf service-index { + type uint8; + description + "Service path index for NSH header"; + } + } + } + } +} diff --git a/lisp/api/src/main/yang/lisp.yang b/lisp/api/src/main/yang/lisp.yang deleted file mode 100755 index 61e321c18..000000000 --- a/lisp/api/src/main/yang/lisp.yang +++ /dev/null @@ -1,476 +0,0 @@ -//TODO mandatory statements -module lisp { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:lisp"; - prefix "lisp"; - import ietf-interfaces { - prefix "if"; - } - import ietf-inet-types { - prefix "inet"; - } - import ietf-lisp-address-types { - prefix "lisp-types"; - } - import v3po { - prefix "v3po"; - } - organization - "FD.io Overlay Forwarding Engine (ONE) project"; - contact - "Florin Coras - Vina Ermagan - ONE list "; - - description - "This YANG module defines the generic configuration and - operational data for LISP in VPP"; - - revision 2017-03-15 { - description - "Excludes lisp-state from config data - Support for Lisp Control Plane Features - - Map request mode - - Multiple map servers - - Petr use - - RLoc probing - - Map Register - - Support for keys in local mappings"; - } - - revision 2016-12-14 { - description - "This revision adds support for L2 features, by adding vrf-subtable/bridge-domain-subtable - containers under vni-table. Both contains mandatory reference to index(vrf-subtable) - or name(bridge-domain-subtable) of respective kind of table."; - - reference - "https://tools.ietf.org/html/rfc6830"; - } - - revision "2016-05-20" { - description - "Initial revision of LISP model"; - reference - "https://tools.ietf.org/html/rfc6830"; - } - - typedef locator-set-ref { - type leafref { - path "/lisp/lisp-feature-data/locator-sets/locator-set/name"; - } - description "Locator-set reference"; - } - - typedef mapping-id { - type string; - description "Mapping ID"; - } - - typedef map-reply-action { - type enumeration { - enum no-action { - value 0; - description - "Mapping is kept alive and no encapsulation occurs."; - } - enum natively-forward { - value 1; - description - "Matching packets are not encapsulated or dropped but - natively forwarded."; - } - enum send-map-request { - value 2; - description - "Matching packets invoke Map-Requests."; - } - enum drop { - value 3; - description - "Matching packets are dropped."; - } - } - description - "Defines the lisp map-cache ACT type"; - reference - "https://tools.ietf.org/html/rfc6830#section-6.1.4"; - } - - typedef map-request-mode { - type enumeration { - enum destination-only { - value 0; - description "Normal map requests"; - } - enum source-destination { - value 1; - description "Source/Destination map requests"; - } - } - } - - typedef hmac-key-type { - type enumeration { - enum no-key { - value 0; - } - enum sha-1-96-key { - value 1; - } - enum sha-256-128-key { - value 2; - } - } - } - - grouping locator-properties-grouping { - description - "Properties of a RLOC"; - leaf priority { - type uint8; - description - "Locator priority."; - } - leaf weight { - type uint8; - description - "Locator weight."; - } - } - - grouping locator-sets-grouping { - // NOTE: to be used only for local locators - // lisp_add_del_locator_set locator-set [del] - // lisp_add_del_locator locator-set iface - // p w [del] - container locator-sets { - list locator-set { - key "name"; - leaf name { - type string; - description "Locator-set name"; - } - list interface { - key "interface-ref"; - leaf interface-ref { - type if:interface-ref; - description "Interface reference"; - } - uses locator-properties-grouping; - description "List of interfaces part of the locator-set"; - } - description "Locator-set"; - } - description "Locator-sets"; - } - description "Grouping for locator-sets"; - } - - grouping hmac-key-grouping { - container hmac-key { - // not mandatory , but when specified, both must be present - // due to presence containers bug, will be checked internaly - - leaf key-type { - type hmac-key-type; - } - - leaf key { - type string; - } - } - } - - grouping adjacencies-grouping { - container adjacencies { - list adjacency { - key "id"; - leaf id { - type string; - description "Adjacency id"; - } - container local-eid { - uses lisp-types:lisp-address; - description "Local EID that must have a local mapping"; - } - container remote-eid { - uses lisp-types:lisp-address; - description "Remote EID that must have a remote mapping"; - } - description "List of adjacencies"; - } - description "Adjacencies programmed into the data plane"; - } - description "Adjacencies grouping"; - } - - grouping dp-subtable-grouping { - // Once both vni and table-id are set: - // lisp_eid_table_add_del_map - container local-mappings { - list local-mapping { - key "id"; - leaf id { - type mapping-id; - description "Id that uniquely identifies a mapping"; - } - container eid { - uses lisp-types:lisp-address; - description "EID address"; - } - leaf locator-set { - type locator-set-ref; - description "Locator-set"; - } - uses hmac-key-grouping; - description "Local mapping"; - } - description "Local EID to locator-set mappings"; - } - // lisp_add_del_local_eid eid locator-set - // [del] - // lisp_add_del_remote_mapping vni eid seid - // [action ] rloc - // [rloc ..] - // NOTE: 1.lisp_add_del_remote_mapping seid is used to build - // src/dst mappings. Rlocs have p/w in them - container remote-mappings { - list remote-mapping { - key "id"; - leaf id { - type mapping-id; - description "Id that uniquely identifies a mapping"; - } - container eid { - description "Remote EID address"; - uses lisp-types:lisp-address; - } - leaf ttl { - type uint32; - description "Mapping validity period."; - } - leaf authoritative { - type bits { - bit A { - description "Authoritative bit."; - } - } - description - "Bit that indicates if mapping comes from an - authoritative source."; - } - choice locator-list { - description - "list of locators are either negative, or positive."; - case negative-mapping { - //NOTE - Wrapped in container to prevent leaf map-reply-action enforcing impresence of rlocs - container map-reply{ - leaf map-reply-action { - type map-reply-action; - description - "Forwarding action for a negative mapping."; - } - } - } - case positive-mapping { - // NOTE if container is not needed to encapsulate - // locator list, remove it - container rlocs { - list locator { - key "address"; - leaf address { - type inet:ip-address; - description "Locator address"; - } - uses locator-properties-grouping; - description "Remote locator"; - } - description - "List of locators for a positive mapping."; - } - } - } - uses adjacencies-grouping; - description "List of remote mappings"; - } - description "Map-cache/remote mappings cache"; - } - description "Data path subtable (VRF/bridge domain) grouping"; - } - - grouping eid-table-grouping { - container eid-table { - list vni-table { - key "virtual-network-identifier"; - leaf virtual-network-identifier { - type uint32; - description "vni"; - } - container vrf-subtable { - presence "Enable L3 mapping"; - leaf table-id { - type uint32; - description "table-id"; - // TODO - HC2VPP-73 - commented due to ODL Boron issues - //mandatory true; - } - - uses dp-subtable-grouping; - description "VRF subtable"; - } - container bridge-domain-subtable { - presence "Enable L2 mapping"; - leaf bridge-domain-ref { - type v3po:bridge-domain-ref; - description "Reference to existing bridge domain"; - // TODO - HC2VPP-73 - commented due to ODL Boron issues - // mandatory true; - } - - uses dp-subtable-grouping; - description "Bridge domain subtable"; - } - description "VNI tables"; - } - description "EID table"; - } - description "EID table grouping"; - } - grouping map-resolvers-grouping { - container map-resolvers { - // lisp_add_del_map_resolver - list map-resolver { - key ip-address; - leaf ip-address { - type inet:ip-address; - description "Map-resolver IP address"; - } - description "List of map-resolvers"; - } - description "Map-resolvers configured"; - } - description "Map-Resolver grouping"; - } - grouping map-servers-grouping { - container map-servers { - //lisp_add_del_map_server - list map-server { - key ip-address; - leaf ip-address { - type inet:ip-address; - description "Map-server IP address"; - } - description "List of map-servers"; - } - } - } - - grouping pitr-cfg-grouping { - // lisp_pitr_set_locator_set - container pitr-cfg { - leaf locator-set { - type locator-set-ref; - default "N/A"; - description "Locator-set reference"; - } - description "Proxy-ITR configuration"; - } - description "PITR configuration grouping"; - } - - grouping use-petr-cfg-grouping { - // lisp_use_petr - container petr-cfg { - leaf petr-address { - type inet:ip-address; - description "PETR address"; - } - } - } - - grouping rloc-probing-grouping { - // lisp_rloc_probe_enable_disable - container rloc-probe { - leaf enabled { - type boolean; - default "false"; - description "Enabled/disable RLOC probing"; - } - } - } - - grouping map-register-grouping { - // lisp_map_register_enable_disable - container map-register { - leaf enabled { - type boolean; - default "false"; - description "Enabled/disable RLOC probing"; - } - } - } - - grouping map-request-mode-grouping { - // lisp_map_request_mode - container map-request-mode { - leaf mode { - type map-request-mode; - default "destination-only"; - } - } - } - - grouping itr-remote-locator-sets-grouping{ - container itr-remote-locator-set{ - // lisp_add_del_map_request_itr_rlocs add/del - // lisp_get_map_request_itr_rlocs - leaf remote-locator-set-name{ - type locator-set-ref; - description "Locators to be used in map-requests"; - } - } - } - - grouping lisp-feature-data-grouping{ - //aggregation of all lisp data, restricted by Lisp beeing enabled - - container lisp-feature-data{ - when "../lisp:enable = 'true'"; - - uses locator-sets-grouping; - uses eid-table-grouping; - uses map-resolvers-grouping; - uses map-servers-grouping; - uses pitr-cfg-grouping; - uses use-petr-cfg-grouping; - uses rloc-probing-grouping; - uses map-register-grouping; - uses map-request-mode-grouping; - uses itr-remote-locator-sets-grouping; - } - } - - // ref https://wiki.fd.io/view/ONE/Command-line_Interface_CLI_Guide - container lisp { - - // lisp_enable_disable / lisp_enable_disable_status_dump - leaf enable { - type boolean; - description "Enable/disable LISP feature"; - } - uses lisp-feature-data-grouping; - description "LISP configuration"; - } - - container lisp-state { - config "false"; - // lisp_enable_disable / lisp_enable_disable_status_dump - leaf enable { - type boolean; - description "Enable/disable LISP feature"; - } - uses lisp-feature-data-grouping; - description "LISP state"; - } -} diff --git a/lisp/api/src/main/yang/lisp@2017-03-15.yang b/lisp/api/src/main/yang/lisp@2017-03-15.yang new file mode 100755 index 000000000..61e321c18 --- /dev/null +++ b/lisp/api/src/main/yang/lisp@2017-03-15.yang @@ -0,0 +1,476 @@ +//TODO mandatory statements +module lisp { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:lisp"; + prefix "lisp"; + import ietf-interfaces { + prefix "if"; + } + import ietf-inet-types { + prefix "inet"; + } + import ietf-lisp-address-types { + prefix "lisp-types"; + } + import v3po { + prefix "v3po"; + } + organization + "FD.io Overlay Forwarding Engine (ONE) project"; + contact + "Florin Coras + Vina Ermagan + ONE list "; + + description + "This YANG module defines the generic configuration and + operational data for LISP in VPP"; + + revision 2017-03-15 { + description + "Excludes lisp-state from config data + Support for Lisp Control Plane Features + - Map request mode + - Multiple map servers + - Petr use + - RLoc probing + - Map Register + - Support for keys in local mappings"; + } + + revision 2016-12-14 { + description + "This revision adds support for L2 features, by adding vrf-subtable/bridge-domain-subtable + containers under vni-table. Both contains mandatory reference to index(vrf-subtable) + or name(bridge-domain-subtable) of respective kind of table."; + + reference + "https://tools.ietf.org/html/rfc6830"; + } + + revision "2016-05-20" { + description + "Initial revision of LISP model"; + reference + "https://tools.ietf.org/html/rfc6830"; + } + + typedef locator-set-ref { + type leafref { + path "/lisp/lisp-feature-data/locator-sets/locator-set/name"; + } + description "Locator-set reference"; + } + + typedef mapping-id { + type string; + description "Mapping ID"; + } + + typedef map-reply-action { + type enumeration { + enum no-action { + value 0; + description + "Mapping is kept alive and no encapsulation occurs."; + } + enum natively-forward { + value 1; + description + "Matching packets are not encapsulated or dropped but + natively forwarded."; + } + enum send-map-request { + value 2; + description + "Matching packets invoke Map-Requests."; + } + enum drop { + value 3; + description + "Matching packets are dropped."; + } + } + description + "Defines the lisp map-cache ACT type"; + reference + "https://tools.ietf.org/html/rfc6830#section-6.1.4"; + } + + typedef map-request-mode { + type enumeration { + enum destination-only { + value 0; + description "Normal map requests"; + } + enum source-destination { + value 1; + description "Source/Destination map requests"; + } + } + } + + typedef hmac-key-type { + type enumeration { + enum no-key { + value 0; + } + enum sha-1-96-key { + value 1; + } + enum sha-256-128-key { + value 2; + } + } + } + + grouping locator-properties-grouping { + description + "Properties of a RLOC"; + leaf priority { + type uint8; + description + "Locator priority."; + } + leaf weight { + type uint8; + description + "Locator weight."; + } + } + + grouping locator-sets-grouping { + // NOTE: to be used only for local locators + // lisp_add_del_locator_set locator-set [del] + // lisp_add_del_locator locator-set iface + // p w [del] + container locator-sets { + list locator-set { + key "name"; + leaf name { + type string; + description "Locator-set name"; + } + list interface { + key "interface-ref"; + leaf interface-ref { + type if:interface-ref; + description "Interface reference"; + } + uses locator-properties-grouping; + description "List of interfaces part of the locator-set"; + } + description "Locator-set"; + } + description "Locator-sets"; + } + description "Grouping for locator-sets"; + } + + grouping hmac-key-grouping { + container hmac-key { + // not mandatory , but when specified, both must be present + // due to presence containers bug, will be checked internaly + + leaf key-type { + type hmac-key-type; + } + + leaf key { + type string; + } + } + } + + grouping adjacencies-grouping { + container adjacencies { + list adjacency { + key "id"; + leaf id { + type string; + description "Adjacency id"; + } + container local-eid { + uses lisp-types:lisp-address; + description "Local EID that must have a local mapping"; + } + container remote-eid { + uses lisp-types:lisp-address; + description "Remote EID that must have a remote mapping"; + } + description "List of adjacencies"; + } + description "Adjacencies programmed into the data plane"; + } + description "Adjacencies grouping"; + } + + grouping dp-subtable-grouping { + // Once both vni and table-id are set: + // lisp_eid_table_add_del_map + container local-mappings { + list local-mapping { + key "id"; + leaf id { + type mapping-id; + description "Id that uniquely identifies a mapping"; + } + container eid { + uses lisp-types:lisp-address; + description "EID address"; + } + leaf locator-set { + type locator-set-ref; + description "Locator-set"; + } + uses hmac-key-grouping; + description "Local mapping"; + } + description "Local EID to locator-set mappings"; + } + // lisp_add_del_local_eid eid locator-set + // [del] + // lisp_add_del_remote_mapping vni eid seid + // [action ] rloc + // [rloc ..] + // NOTE: 1.lisp_add_del_remote_mapping seid is used to build + // src/dst mappings. Rlocs have p/w in them + container remote-mappings { + list remote-mapping { + key "id"; + leaf id { + type mapping-id; + description "Id that uniquely identifies a mapping"; + } + container eid { + description "Remote EID address"; + uses lisp-types:lisp-address; + } + leaf ttl { + type uint32; + description "Mapping validity period."; + } + leaf authoritative { + type bits { + bit A { + description "Authoritative bit."; + } + } + description + "Bit that indicates if mapping comes from an + authoritative source."; + } + choice locator-list { + description + "list of locators are either negative, or positive."; + case negative-mapping { + //NOTE - Wrapped in container to prevent leaf map-reply-action enforcing impresence of rlocs + container map-reply{ + leaf map-reply-action { + type map-reply-action; + description + "Forwarding action for a negative mapping."; + } + } + } + case positive-mapping { + // NOTE if container is not needed to encapsulate + // locator list, remove it + container rlocs { + list locator { + key "address"; + leaf address { + type inet:ip-address; + description "Locator address"; + } + uses locator-properties-grouping; + description "Remote locator"; + } + description + "List of locators for a positive mapping."; + } + } + } + uses adjacencies-grouping; + description "List of remote mappings"; + } + description "Map-cache/remote mappings cache"; + } + description "Data path subtable (VRF/bridge domain) grouping"; + } + + grouping eid-table-grouping { + container eid-table { + list vni-table { + key "virtual-network-identifier"; + leaf virtual-network-identifier { + type uint32; + description "vni"; + } + container vrf-subtable { + presence "Enable L3 mapping"; + leaf table-id { + type uint32; + description "table-id"; + // TODO - HC2VPP-73 - commented due to ODL Boron issues + //mandatory true; + } + + uses dp-subtable-grouping; + description "VRF subtable"; + } + container bridge-domain-subtable { + presence "Enable L2 mapping"; + leaf bridge-domain-ref { + type v3po:bridge-domain-ref; + description "Reference to existing bridge domain"; + // TODO - HC2VPP-73 - commented due to ODL Boron issues + // mandatory true; + } + + uses dp-subtable-grouping; + description "Bridge domain subtable"; + } + description "VNI tables"; + } + description "EID table"; + } + description "EID table grouping"; + } + grouping map-resolvers-grouping { + container map-resolvers { + // lisp_add_del_map_resolver + list map-resolver { + key ip-address; + leaf ip-address { + type inet:ip-address; + description "Map-resolver IP address"; + } + description "List of map-resolvers"; + } + description "Map-resolvers configured"; + } + description "Map-Resolver grouping"; + } + grouping map-servers-grouping { + container map-servers { + //lisp_add_del_map_server + list map-server { + key ip-address; + leaf ip-address { + type inet:ip-address; + description "Map-server IP address"; + } + description "List of map-servers"; + } + } + } + + grouping pitr-cfg-grouping { + // lisp_pitr_set_locator_set + container pitr-cfg { + leaf locator-set { + type locator-set-ref; + default "N/A"; + description "Locator-set reference"; + } + description "Proxy-ITR configuration"; + } + description "PITR configuration grouping"; + } + + grouping use-petr-cfg-grouping { + // lisp_use_petr + container petr-cfg { + leaf petr-address { + type inet:ip-address; + description "PETR address"; + } + } + } + + grouping rloc-probing-grouping { + // lisp_rloc_probe_enable_disable + container rloc-probe { + leaf enabled { + type boolean; + default "false"; + description "Enabled/disable RLOC probing"; + } + } + } + + grouping map-register-grouping { + // lisp_map_register_enable_disable + container map-register { + leaf enabled { + type boolean; + default "false"; + description "Enabled/disable RLOC probing"; + } + } + } + + grouping map-request-mode-grouping { + // lisp_map_request_mode + container map-request-mode { + leaf mode { + type map-request-mode; + default "destination-only"; + } + } + } + + grouping itr-remote-locator-sets-grouping{ + container itr-remote-locator-set{ + // lisp_add_del_map_request_itr_rlocs add/del + // lisp_get_map_request_itr_rlocs + leaf remote-locator-set-name{ + type locator-set-ref; + description "Locators to be used in map-requests"; + } + } + } + + grouping lisp-feature-data-grouping{ + //aggregation of all lisp data, restricted by Lisp beeing enabled + + container lisp-feature-data{ + when "../lisp:enable = 'true'"; + + uses locator-sets-grouping; + uses eid-table-grouping; + uses map-resolvers-grouping; + uses map-servers-grouping; + uses pitr-cfg-grouping; + uses use-petr-cfg-grouping; + uses rloc-probing-grouping; + uses map-register-grouping; + uses map-request-mode-grouping; + uses itr-remote-locator-sets-grouping; + } + } + + // ref https://wiki.fd.io/view/ONE/Command-line_Interface_CLI_Guide + container lisp { + + // lisp_enable_disable / lisp_enable_disable_status_dump + leaf enable { + type boolean; + description "Enable/disable LISP feature"; + } + uses lisp-feature-data-grouping; + description "LISP configuration"; + } + + container lisp-state { + config "false"; + // lisp_enable_disable / lisp_enable_disable_status_dump + leaf enable { + type boolean; + description "Enable/disable LISP feature"; + } + uses lisp-feature-data-grouping; + description "LISP state"; + } +} -- cgit 1.2.3-korg