diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-03-22 10:49:59 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-03-22 10:49:59 +0100 |
commit | ddb2f0660239bcf201285c79bb7ce7568046c230 (patch) | |
tree | 4c2097ff6a9181771449881588c123e0f8f27d2b /nat | |
parent | bcd09ec33c69235f7ee204e2994473b8ee7f1973 (diff) |
nat: fix issues found by pyang
Change-Id: Ic4375e85684a035323499963172e59042b0f3dcf
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'nat')
4 files changed, 26 insertions, 29 deletions
diff --git a/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang b/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang index 421d03944..d8791c3a4 100644 --- a/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang +++ b/nat/nat-api/src/main/yang/interface-nat@2017-08-16.yang @@ -3,6 +3,15 @@ module interface-nat { namespace "urn:opendaylight:params:xml:ns:yang:interface:nat"; prefix "ifc-nat"; + import ietf-interfaces { + prefix "if"; + } + import yang-ext { + prefix "ext"; + } + + description "Augmentations to interfaces model to connect interfaces with nat configuration."; + revision "2017-08-16" { description "Added support for NAT64."; } @@ -15,25 +24,13 @@ module interface-nat { description "Initial revision of interface-nat model."; } - import ietf-interfaces { - prefix "if"; - } - import ietf-nat { - prefix "nat"; - } - import yang-ext { - prefix "ext"; - } - - description "Augmentations to interfaces model to connect interfaces with nat configuration."; - grouping interface-nat-vpp-feature-attributes { leaf post-routing { type boolean; default false; description "Indicates whether NAT translation should be applied after routing. - If true, nat_interface_add_del_output_feature message is used to enable NAT. + If true, nat_interface_anatdd_del_output_feature message is used to enable NAT. By default nat_interface_add_del_feature is used."; reference "https://git.fd.io/vpp/tree/src/plugins/nat/nat.api"; diff --git a/nat/nat-api/src/main/yang/nat-context@2016-12-14.yang b/nat/nat-api/src/main/yang/nat-context@2016-12-14.yang index dd17ed58c..cb8bb8348 100644 --- a/nat/nat-api/src/main/yang/nat-context@2016-12-14.yang +++ b/nat/nat-api/src/main/yang/nat-context@2016-12-14.yang @@ -1,13 +1,7 @@ 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."; - } + prefix "nat-ctx"; import ietf-inet-types { prefix "inet"; @@ -21,6 +15,12 @@ module nat-context { prefix "ext"; } + description "Context for nat mapping"; + + revision "2016-12-14" { + description "Initial revision."; + } + grouping mapping-entry-context-attributes { container nat-mapping-entry-context { list nat-instance { diff --git a/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang b/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang index 03773ab5f..0de8afc71 100644 --- a/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang +++ b/nat/nat-api/src/main/yang/subinterface-nat@2017-06-15.yang @@ -1,11 +1,7 @@ module subinterface-nat { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:subinterface:nat"; - prefix "ifc-nat"; - - revision "2017-06-15" { - description "Initial revision of subinterface-nat model"; - } + prefix "sub-ifc-nat"; import ietf-interfaces { prefix "if"; @@ -22,6 +18,10 @@ module subinterface-nat { description "Augmentations to subinterfaces model to connect subinterfaces with nat configuration"; + revision "2017-06-15" { + description "Initial revision of subinterface-nat model"; + } + augment /if:interfaces/if:interface/vpp-vlan:sub-interfaces/vpp-vlan:sub-interface { ext:augment-identifier "nat-subinterface-augmentation"; 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 index e085c24b7..b0f7ea381 100644 --- 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 @@ -3,10 +3,6 @@ module vpp-nat { 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"; } @@ -16,6 +12,10 @@ module vpp-nat { description "Augmentations to ietf-nat model providing vpp specific attributes."; + revision "2017-08-04" { + description "Initial revision of vpp-nat model."; + } + typedef nat-pool-type { type enumeration { enum "nat44"; |