summaryrefslogtreecommitdiffstats
path: root/routing/routing-api
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-12-01 18:15:52 +0100
committerJan Srnicek <jsrnicek@cisco.com>2016-12-01 18:16:47 +0100
commit32aa07e5517fba7f78ae79d2ba83b56f72a53293 (patch)
tree26256f30f2dc5c3521403ef3fcd2e038b2f9bca6 /routing/routing-api
parent9c9935c83ce9869ca36cbde7865423ef02f19db8 (diff)
HONEYCOMB-58 - Routing Plugin Structure
Read/Write support for ipv4/6 static routes. Restriction due to vpp implementation described in readme. Change-Id: I328f406a9b7cb8781f8becf98eca293cebe66859 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'routing/routing-api')
-rw-r--r--routing/routing-api/src/main/yang/ietf-ipv4-unicast-routing.yang4
-rw-r--r--routing/routing-api/src/main/yang/ietf-ipv6-unicast-routing.yang4
-rw-r--r--routing/routing-api/src/main/yang/vpp-routing.yang55
3 files changed, 35 insertions, 28 deletions
diff --git a/routing/routing-api/src/main/yang/ietf-ipv4-unicast-routing.yang b/routing/routing-api/src/main/yang/ietf-ipv4-unicast-routing.yang
index ed320fd2d..49052c16a 100644
--- a/routing/routing-api/src/main/yang/ietf-ipv4-unicast-routing.yang
+++ b/routing/routing-api/src/main/yang/ietf-ipv4-unicast-routing.yang
@@ -228,7 +228,7 @@ module ietf-ipv4-unicast-routing {
//TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
container vpp-ipv4-route-state{
- uses vpp-r:vpp-routing-state-attributes;
+ uses vpp-r:vpp-route-attributes;
}
}
}
@@ -348,7 +348,7 @@ module ietf-ipv4-unicast-routing {
//TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
container vpp-ipv4-route{
- uses vpp-r:vpp-routing-attributes;
+ uses vpp-r:vpp-route-attributes;
}
}
}
diff --git a/routing/routing-api/src/main/yang/ietf-ipv6-unicast-routing.yang b/routing/routing-api/src/main/yang/ietf-ipv6-unicast-routing.yang
index 93de395d6..9c6ce4db4 100644
--- a/routing/routing-api/src/main/yang/ietf-ipv6-unicast-routing.yang
+++ b/routing/routing-api/src/main/yang/ietf-ipv6-unicast-routing.yang
@@ -632,7 +632,7 @@ module ietf-ipv6-unicast-routing {
//TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
container vpp-ipv6-route-state{
- uses vpp-r:vpp-routing-state-attributes;
+ uses vpp-r:vpp-route-attributes;
}
}
}
@@ -749,7 +749,7 @@ module ietf-ipv6-unicast-routing {
//TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
container vpp-ipv6-route{
- uses vpp-r:vpp-routing-attributes;
+ uses vpp-r:vpp-route-attributes;
}
}
}
diff --git a/routing/routing-api/src/main/yang/vpp-routing.yang b/routing/routing-api/src/main/yang/vpp-routing.yang
index 1979db9e1..49884adac 100644
--- a/routing/routing-api/src/main/yang/vpp-routing.yang
+++ b/routing/routing-api/src/main/yang/vpp-routing.yang
@@ -4,7 +4,7 @@ module vpp-routing{
prefix "vpp-routing";
description "General extensions for routes to be able to use VPP route defining apis";
- revision 2016-10-18 {
+ revision 2016-12-14 {
description "Initial revision.";
}
@@ -15,26 +15,17 @@ module vpp-routing{
import vpp-classifier {
prefix "classifier";
}
+
+ import ietf-routing {
+ prefix "ietf-r";
+ }
typedef vni-reference{
type uint32;
description "Vrf index reference";
}
- grouping vpp-routing-attributes{
- //vrf_id
- leaf primary-vrf{
- type vni-reference;
- mandatory true;
- description "Main vrf associated to route";
- }
-
- leaf auto-create-vrf{
- type boolean;
- default false;
- description "If referenced primary vrf not exists,create while creating route";
- }
-
+ grouping vpp-route-attributes {
//lookup_in_vrf
leaf secondary-vrf{
type vni-reference;
@@ -42,18 +33,34 @@ module vpp-routing{
}
leaf classify-table{
- // classify_table_index + is_classify flag
+ // classify_table_index + is_classify flag
type classifier:classify-table-ref;
description "Optional reference to classify table";
}
}
- grouping vpp-routing-state-attributes{
- //vrf_id
- leaf primary-vrf{
- type vni-reference;
- mandatory true;
- description "Main vrf associated to route";
- }
- }
+ grouping vpp-routing-protocol-attributes{
+ //vrf_id
+ leaf primary-vrf{
+ type vni-reference;
+ mandatory true;
+ description "Main vrf associated to route";
+ }
+ }
+
+ augment /ietf-r:routing/ietf-r:routing-instance/ietf-r:routing-protocols/ietf-r:routing-protocol{
+ ext:augment-identifier "routing-protocol-vpp-attr";
+ container vpp-protocol-attributes {
+ presence "Config attributes";
+ uses vpp-routing-protocol-attributes;
+ }
+ }
+
+ augment /ietf-r:routing-state/ietf-r:routing-instance/ietf-r:routing-protocols/ietf-r:routing-protocol{
+ ext:augment-identifier "routing-protocol-state-vpp-attr";
+ container vpp-protocol-state-attributes {
+ presence "Operational attributes";
+ uses vpp-routing-protocol-attributes;
+ }
+ }
} \ No newline at end of file