summaryrefslogtreecommitdiffstats
path: root/lisp/api/src
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-10-04 16:44:47 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-10-05 11:52:37 +0000
commit5d1054b26f144948be321f30204b4b2a7cbbc03e (patch)
tree2104b21d9a2e728b8275d5d9f2a554c414db8c31 /lisp/api/src
parent512143ddd9995d16d9bb055481721fa276ccfa01 (diff)
HONEYCOMB-138 - Lisp L2 Support
Change-Id: Idff4776a64a88be2e0a45ab1927978e40876ea92 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/api/src')
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java1
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java1
-rwxr-xr-xlisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java1
-rw-r--r--lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java11
-rwxr-xr-xlisp/api/src/main/yang/lisp.yang287
5 files changed, 166 insertions, 135 deletions
diff --git a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
index 55f0ec907..1e70fe1aa 100755
--- a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv4Matcher.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
diff --git a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
index 947088f8f..74d9c2be8 100755
--- a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/Ipv6Matcher.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
diff --git a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
index 663f4ff22..ac58622f0 100755
--- a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/MacMatcher.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
import java.util.List;
diff --git a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
index 681e87277..aad92c053 100644
--- a/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
+++ b/lisp/api/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/lisp/address/types/rev151105/SimpleAddressBuilder.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105;
@@ -24,12 +25,12 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
/**
- * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
- * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
+ * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string
+ * representation. In some cases it is very difficult to automate it since there can be unions such as (uint32 -
+ * uint16), or (string - uint32).
* <p/>
- * The reason behind putting it under src/main/java is:
- * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
- * loss of user code.
+ * The reason behind putting it under src/main/java is: This class is generated in form of a stub and needs to be
+ * finished by the user. This class is generated only once to prevent loss of user code.
*/
public final class SimpleAddressBuilder {
diff --git a/lisp/api/src/main/yang/lisp.yang b/lisp/api/src/main/yang/lisp.yang
index 4f64ca28a..d7aad651c 100755
--- a/lisp/api/src/main/yang/lisp.yang
+++ b/lisp/api/src/main/yang/lisp.yang
@@ -31,7 +31,7 @@ module lisp {
typedef locator-set-ref {
type leafref {
- path "/lisp/locator-sets/locator-set/name";
+ path "/lisp/lisp-feature-data/locator-sets/locator-set/name";
}
description "Locator-set reference";
}
@@ -91,7 +91,6 @@ module lisp {
// lisp_add_del_locator locator-set <ls_name> iface <iface_name>
// p <val> w <val> [del]
container locator-sets {
- when "../lisp:enable = 'true'";
list locator-set {
key "name";
leaf name {
@@ -114,126 +113,147 @@ module lisp {
description "Grouping for locator-sets";
}
- grouping eid-table-grouping {
- container eid-table {
- when "../lisp:enable = 'true'";
- list vni-table {
- key "virtual-network-identifier";
- leaf virtual-network-identifier {
- type uint32;
- description "vni";
+ grouping adjacencies-grouping {
+ container adjacencies {
+ list adjacency {
+ key "id";
+ leaf id {
+ type string;
+ description "Adjacency id";
}
- leaf table-id {
- type uint32;
- description "table-id/vrf";
+ container local-eid {
+ uses lisp-types:lisp-address;
+ description "Local EID that must have a local mapping";
}
- // Once both vni and table-id are set:
- // lisp_eid_table_add_del_map <vni> <vrf>
- 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";
- }
- description "Local mapping";
- }
- description "Local EID to locator-set mappings";
+ 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 <vni> <dp_table>
+ 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";
}
+ description "Local mapping";
+ }
+ description "Local EID to locator-set mappings";
+ }
// lisp_add_del_local_eid eid <ip-address/mask> locator-set
// <ls-name> [del]
- // lisp_add_del_remote_mapping vni <vni> eid <ip-pref> seid
- // <ip-pref> [action <action>] rloc
+ // lisp_add_del_remote_mapping vni <vni> eid <eid> seid
+ // <seid> [action <action>] rloc
// <ip-addr> [rloc <ip-addr> ..]
- // NOTE: 1.lisp_add_del_remote_mapping needs updating, right now
- // it expects both seid and deid, but this will be
- // simplified to just eid
- // 2.priority/weight not yet part of API, patch under
- // review
- 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.";
+ // 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.";
}
- choice locator-list {
- description
- "list of locators are either negative, or positive.";
- case negative-mapping {
- //NOTE if this is enclosed in container,there can be a dedicated writer/reader
- //for setting/reading this node
+ }
+ 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";
}
- case positive-mapping {
- 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.";
- }
- }
+ description
+ "List of locators for a positive mapping.";
}
- description "List of remote mappings";
}
- description "Map-cache/remote mappings cache";
}
+ uses adjacencies-grouping;
+ description "List of remote mappings";
+ }
+ description "Map-cache/remote mappings cache";
+ }
+ description "Data path subtable (VRF/bridge domain) 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";
+ 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 {
+ leaf table-id {
+ type uint32;
+ description "table-id";
}
- description "Adjacencies programmed into the data plane";
+
+ uses dp-subtable-grouping;
+ description "VRF subtable";
+ }
+ container bridge-domain-subtable {
+ leaf bridge-domain-ref {
+ type string;
+ description "Name reference to existing bridge domain";
+ }
+
+ uses dp-subtable-grouping;
+ description "Bridge domain subtable";
}
description "VNI tables";
}
@@ -244,7 +264,6 @@ module lisp {
grouping map-resolvers-grouping {
container map-resolvers {
// lisp_add_del_map_resolver <ip>
- when "../lisp:enable = 'true'";
list map-resolver {
key ip-address;
leaf ip-address {
@@ -260,52 +279,60 @@ module lisp {
grouping pitr-cfg-grouping {
// lisp_pitr_set_locator_set <ip>
container pitr-cfg {
- when "../lisp:enable = 'true'";
leaf locator-set {
type locator-set-ref;
description "Locator-set reference";
}
description "Proxy-ITR configuration";
}
- description "";
+ description "PITR configuration grouping";
+ }
+
+ grouping itr-remote-locator-sets-grouping{
+ container itr-remote-locator-set{
+ // lisp_add_del_map_request_itr_rlocs add/del <ls_name>
+ // 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 pitr-cfg-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";
}
- // lisp_add_del_map_request_itr_rlocs add/del <ls_name>
- leaf itr-rlocs {
- type locator-set-ref;
- description "Locators to be used in map-requests";
- }
- uses locator-sets-grouping;
- uses eid-table-grouping;
- uses map-resolvers-grouping;
- uses pitr-cfg-grouping;
-
- // lisp_pitr_set_locator_set <ip>
+ 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 "LISP status";
- }
- leaf itr-rlocs {
- type locator-set-ref;
- description "Locators to be used in map-requests";
+ description "Enable/disable LISP feature";
}
- uses locator-sets-grouping;
- uses eid-table-grouping;
- uses map-resolvers-grouping;
- uses pitr-cfg-grouping;
-
+ uses lisp-feature-data-grouping;
description "LISP state";
}
-} \ No newline at end of file
+}