diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-08-04 13:25:29 +0200 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2017-08-14 07:59:38 +0000 |
commit | cb46f2dd3509a39fe762318a1ee32caaf95978b4 (patch) | |
tree | 874581e4781146a8b2941c2019de0d79609b9fd0 /nat/nat-api/src/main | |
parent | ad36e69cd836040e633c22fbaa2931ec77b240ff (diff) |
HC2VPP-105: update NAT models to support Nat64
Nat api in VPP (https://wiki.fd.io/view/VPP/SNAT#API_3)
uses different api calls for nat44 and nat64.
While ietf-nat model allows to distinguish between
static nat44 and nat64 mappings,
external-ip-address-pool needs to be augmented
with nat pool type.
Change-Id: I2ce1fa3a8241c337c617bcbb77ec5eb2a33044e4
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'nat/nat-api/src/main')
-rw-r--r-- | nat/nat-api/src/main/yang/vpp-nat@2017-08-04.yang | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/nat/nat-api/src/main/yang/vpp-nat@2017-08-04.yang b/nat/nat-api/src/main/yang/vpp-nat@2017-08-04.yang new file mode 100644 index 000000000..7a2e2342a --- /dev/null +++ b/nat/nat-api/src/main/yang/vpp-nat@2017-08-04.yang @@ -0,0 +1,47 @@ +module vpp-nat { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vpp:nat"; + prefix "vpp-nat"; + + revision "2017-08-04" { + description "Initial revision of vpp-nat model."; + } + + import ietf-nat { + prefix "nat"; + } + import yang-ext { + prefix "ext"; + } + + description "Augmentations to ietf-nat model providing vpp specific attributes."; + + typedef nat-pool-type { + type enumeration { + enum "nat44"; + enum "nat64"; + } + } + + grouping external-ip-address-pool-vpp-attributes { + leaf pool-type { + type nat-pool-type; + description + "Indicates whether the pool is designated to be used for nat44 or nat64."; + reference + "https://git.fd.io/vpp/tree/src/plugins/snat/snat.api"; + } + } + + augment /nat:nat-config/nat:nat-instances/nat:nat-instance/nat:external-ip-address-pool { + ext:augment-identifier "external-ip-address-pool-config-augmentation"; + + uses external-ip-address-pool-vpp-attributes; + } + + augment /nat:nat-state/nat:nat-instances/nat:nat-instance/nat:nat-current-config/nat:external-ip-address-pool { + ext:augment-identifier "external-ip-address-pool-state-augmentation"; + + uses external-ip-address-pool-vpp-attributes; + } +}
\ No newline at end of file |