summaryrefslogtreecommitdiffstats
path: root/examples/ncclient/bd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ncclient/bd')
-rw-r--r--examples/ncclient/bd/config_bd.xml41
-rw-r--r--examples/ncclient/bd/expected_config_bd.xml41
-rwxr-xr-xexamples/ncclient/bd/test_bd.sh18
3 files changed, 100 insertions, 0 deletions
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 @@
+<!--
+ ~ Copyright (c) 2018 Cisco Systems, Inc. and others. All rights reserved.
+ ~
+ ~ This program and the accompanying materials are made available under the
+ ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ ~ and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+<config>
+ <nat xmlns="urn:ietf:params:xml:ns:yang:ietf-nat">
+ <instances>
+ <instance>
+ <id>0</id>
+ <policy>
+ <id>0</id>
+ </policy>
+ </instance>
+ </instances>
+ </nat>
+ <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
+ <interface>
+ <name>local0</name>
+ <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
+ <enabled>false</enabled>
+ </interface>
+ <interface>
+ <name>loop1</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:v3po">x:loopback</type>
+ <loopback xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
+ <mac>00:ff:ff:ff:ff:ff</mac>
+ </loopback>
+ <l2 xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
+ <bridge-domain>test_bd</bridge-domain>
+ </l2>
+ </interface>
+ </interfaces>
+ <bridge-domains xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
+ <bridge-domain>
+ <name>test_bd</name>
+ </bridge-domain>
+ </bridge-domains>
+</config>
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 @@
+<!--
+ ~ Copyright (c) 2018 Cisco Systems, Inc. and others. All rights reserved.
+ ~
+ ~ This program and the accompanying materials are made available under the
+ ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ ~ and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <nat xmlns="urn:ietf:params:xml:ns:yang:ietf-nat">
+ <instances>
+ <instance>
+ <id>0</id>
+ <policy>
+ <id>0</id>
+ </policy>
+ </instance>
+ </instances>
+ </nat>
+ <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
+ <interface>
+ <name>local0</name>
+ <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
+ <enabled>false</enabled>
+ </interface>
+ <interface>
+ <name>loop1</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:v3po">x:loopback</type>
+ <loopback xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
+ <mac>00:ff:ff:ff:ff:ff</mac>
+ </loopback>
+ <l2 xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
+ <bridge-domain>test_bd</bridge-domain>
+ </l2>
+ </interface>
+ </interfaces>
+ <bridge-domains xmlns="urn:opendaylight:params:xml:ns:yang:v3po">
+ <bridge-domain>
+ <name>test_bd</name>
+ </bridge-domain>
+ </bridge-domains>
+</data>
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