From 4a43e8b580e7634e62bfc0a2437377f349834049 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 21 Aug 2018 15:57:27 +0200 Subject: examples/ncclient: example of bridge domain configuration Change-Id: I66bf46a953ff40a6937fa77bfe58fa3ee179ed24 Signed-off-by: Marek Gradzki --- examples/ncclient/Readme.adoc | 15 +++++++++++ examples/ncclient/bd/config_bd.xml | 41 +++++++++++++++++++++++++++++ examples/ncclient/bd/expected_config_bd.xml | 41 +++++++++++++++++++++++++++++ examples/ncclient/bd/test_bd.sh | 18 +++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 examples/ncclient/bd/config_bd.xml create mode 100644 examples/ncclient/bd/expected_config_bd.xml create mode 100755 examples/ncclient/bd/test_bd.sh (limited to 'examples/ncclient') diff --git a/examples/ncclient/Readme.adoc b/examples/ncclient/Readme.adoc index ec856c6a3..f2a97eb72 100644 --- a/examples/ncclient/Readme.adoc +++ b/examples/ncclient/Readme.adoc @@ -93,13 +93,28 @@ You can disable this behaviour using config/honeycomb.json. == examples === ACL + +Example configuration of ACLs on loopback interface. + [source] ---- ./acl/test_acl.sh ./acl/test_acl_updates.sh ---- +=== Bridge Domain + +Example configuration of loopback interface and bridge domain assignment. + +[source] +---- +./bd/test_bd.sh +---- + === NAT + +Example configuration of NAT on loopback interface. + [source] ---- ./acl/test_nat.sh diff --git a/examples/ncclient/bd/config_bd.xml b/examples/ncclient/bd/config_bd.xml new file mode 100644 index 000000000..d7512239f --- /dev/null +++ b/examples/ncclient/bd/config_bd.xml @@ -0,0 +1,41 @@ + + + + + + 0 + + 0 + + + + + + + local0 + x:ethernetCsmacd + false + + + loop1 + x:loopback + + 00:ff:ff:ff:ff:ff + + + test_bd + + + + + + test_bd + + + diff --git a/examples/ncclient/bd/expected_config_bd.xml b/examples/ncclient/bd/expected_config_bd.xml new file mode 100644 index 000000000..98632159b --- /dev/null +++ b/examples/ncclient/bd/expected_config_bd.xml @@ -0,0 +1,41 @@ + + + + + + 0 + + 0 + + + + + + + local0 + x:ethernetCsmacd + false + + + loop1 + x:loopback + + 00:ff:ff:ff:ff:ff + + + test_bd + + + + + + test_bd + + + diff --git a/examples/ncclient/bd/test_bd.sh b/examples/ncclient/bd/test_bd.sh new file mode 100755 index 000000000..6b3ac8fe2 --- /dev/null +++ b/examples/ncclient/bd/test_bd.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Copyright (c) 2018 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +DIR_NAME=$(dirname $0) + +${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_bd.xml ${DIR_NAME}/expected_config_bd.xml -- cgit 1.2.3-korg