From 6fede8a03bbdf7334b0d06b929aa514616c88489 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Mon, 11 Sep 2017 10:30:21 +0200 Subject: HC2VPP-191 - One transport protocol api Change-Id: I8ecff45d095b3fbffc5ebf4c09cf1496289e5498 Signed-off-by: Jan Srnicek --- lisp/api/src/main/yang/lisp@2017-08-08.yang | 496 -------------------------- lisp/api/src/main/yang/lisp@2017-09-11.yang | 519 ++++++++++++++++++++++++++++ 2 files changed, 519 insertions(+), 496 deletions(-) delete mode 100755 lisp/api/src/main/yang/lisp@2017-08-08.yang create mode 100755 lisp/api/src/main/yang/lisp@2017-09-11.yang (limited to 'lisp/api/src') diff --git a/lisp/api/src/main/yang/lisp@2017-08-08.yang b/lisp/api/src/main/yang/lisp@2017-08-08.yang deleted file mode 100755 index f8edf1077..000000000 --- a/lisp/api/src/main/yang/lisp@2017-08-08.yang +++ /dev/null @@ -1,496 +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-08-08 { - description - "Map register fallback threshold support"; - } - - revision 2017-08-03 { - description - "Map register TTL registration support"; - } - - 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"; - } - - leaf ttl { - type uint32; - description "Mapping validity period."; - } - - leaf fallback-threshold { - type uint32; - description "Map register fallback threshold"; - } - } - } - - 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-09-11.yang b/lisp/api/src/main/yang/lisp@2017-09-11.yang new file mode 100755 index 000000000..c733ffe23 --- /dev/null +++ b/lisp/api/src/main/yang/lisp@2017-09-11.yang @@ -0,0 +1,519 @@ +//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-09-11 { + description + "One transport protocol support"; + } + + revision 2017-08-08 { + description + "Map register fallback threshold support"; + } + + revision 2017-08-03 { + description + "Map register TTL registration support"; + } + + 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"; + } + + leaf ttl { + type uint32; + description "Mapping validity period."; + } + + leaf fallback-threshold { + type uint32; + description "Map register fallback threshold"; + } + } + } + + 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 transport-protocol-grouping { + container transport-protocol { + leaf protocol-type { + type enumeration { + enum UDP { + value 1; + } + enum Binary { + value 2; + } + } + description "ONE transport protocol"; + default UDP; + } + } + } + + 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; + uses transport-protocol-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