summaryrefslogtreecommitdiffstats
path: root/nat/nat-api/src/main/yang/nat-context.yang
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-10-05 15:03:33 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-10-14 05:42:54 +0000
commit0c5820220a4e7ebc3245259085d00551d2687e32 (patch)
treea36bee0753035be5d68f97130bf016feaeb9d2c0 /nat/nat-api/src/main/yang/nat-context.yang
parentc54ae4ac74d6b8ab71c7e166f10ca6b080ffa558 (diff)
HONEYCOMB-229 Introduce NAT to HC
Reflects SNAT from VPP: - 1:1 Static IPv4 mapping - interface in/out NAT feature management Bonus: - Support presence containers in infra Change-Id: Ieb38526f83edbae5e605d5c7e39bb22bbafc50e5 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'nat/nat-api/src/main/yang/nat-context.yang')
-rw-r--r--nat/nat-api/src/main/yang/nat-context.yang64
1 files changed, 64 insertions, 0 deletions
diff --git a/nat/nat-api/src/main/yang/nat-context.yang b/nat/nat-api/src/main/yang/nat-context.yang
new file mode 100644
index 000000000..dd17ed58c
--- /dev/null
+++ b/nat/nat-api/src/main/yang/nat-context.yang
@@ -0,0 +1,64 @@
+module nat-context {
+ yang-version 1;
+ namespace "urn:honeycomb:params:xml:ns:yang:nat:context";
+ prefix "nc";
+
+ description "Context for nat mapping";
+
+ revision "2016-12-14" {
+ description "Initial revision.";
+ }
+
+ import ietf-inet-types {
+ prefix "inet";
+ }
+
+ import naming-context {
+ prefix "nc";
+ }
+
+ import yang-ext {
+ prefix "ext";
+ }
+
+ grouping mapping-entry-context-attributes {
+ container nat-mapping-entry-context {
+ list nat-instance {
+ key "id";
+
+ leaf id {
+ type uint32;
+ description "ID of the NAT instance from ietf-nat. Maps to VRF-ID in VPP";
+ }
+
+ container mapping-table {
+ list mapping-entry {
+
+ key "internal external";
+ unique "index";
+
+ leaf internal {
+ type inet:ip-address;
+ description "Local IP address set in VPP";
+ }
+
+ leaf external {
+ type inet:ip-address;
+ description "Extarnal IP address set in VPP";
+ }
+
+ leaf index {
+ type uint32;
+ description "ID of the NAT's mapping entry from ietf-nat";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ augment /nc:contexts {
+ ext:augment-identifier "nat-mapping-entry-ctx-augmentation";
+ uses mapping-entry-context-attributes;
+ }
+} \ No newline at end of file