From 1da3b4fd5bc3ecbd0c866d439771a3c7bf981a37 Mon Sep 17 00:00:00 2001 From: Max Rottenkolber Date: Fri, 25 Jan 2019 21:21:04 +0100 Subject: [PATCH] vita: fix bugs in schema --- src/program/vita/vita-esp-gateway.yang | 9 ++++----- src/program/vita/vita-gentest.yang | 13 ++++--------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/program/vita/vita-esp-gateway.yang b/src/program/vita/vita-esp-gateway.yang index 11a8af32f9..cd61d9e376 100644 --- a/src/program/vita/vita-esp-gateway.yang +++ b/src/program/vita/vita-esp-gateway.yang @@ -29,9 +29,9 @@ module vita-esp-gateway { leaf preshared-key { type key32; mandatory true; } } - choice router { - case v4-over-v4 { - container private-interface4 { uses interface4; } + container private-interface4 { uses interface4; } + choice public-router { + case over-v4 { container public-interface4 { uses interface4; } list route4 { key id; unique "net-cidr4"; unique "preshared-key"; unique "spi"; uses route; @@ -39,8 +39,7 @@ module vita-esp-gateway { leaf gw-ip4 { type inet:ipv4-address-no-zone; } } } - case v4-over-v6 { - container private-interface4 { uses interface4; } + case over-v6 { container public-interface6 { uses interface6; } list route46 { key id; unique "net-cidr4"; unique "preshared-key"; unique "spi"; uses route; diff --git a/src/program/vita/vita-gentest.yang b/src/program/vita/vita-gentest.yang index df276884b8..ce279a40a5 100644 --- a/src/program/vita/vita-gentest.yang +++ b/src/program/vita/vita-gentest.yang @@ -4,15 +4,10 @@ module vita-gentest { import vita-esp-gateway { prefix vita; } - choice router { - case v4-over-v4 { - container private-interface4 { uses vita:interface4; } - container public-interface4 { uses vita:interface4; } - } - case v4-over-v6 { - container private-interface4 { uses vita:interface4; } - container public-interface6 { uses vita:interface6; } - } + container private-interface4 { uses vita:interface4; } + choice public-router { + container public-interface4 { uses vita:interface4; } + container public-interface6 { uses vita:interface6; } } leaf negotiation-ttl { type vita:time-to-live; }