From 0443951623b23abd9257876ab942443822427c57 Mon Sep 17 00:00:00 2001 From: Andrej Kozemcak Date: Thu, 24 Jan 2019 07:34:58 +0100 Subject: 1: Create Test enviroment. Change-Id: I79ea8d85312876af7fd389b4776f764c21345ff2 Signed-off-by: Andrej Kozemcak --- test/test_ietf_interfaces.py | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 test/test_ietf_interfaces.py (limited to 'test/test_ietf_interfaces.py') diff --git a/test/test_ietf_interfaces.py b/test/test_ietf_interfaces.py new file mode 100644 index 0000000..55ef029 --- /dev/null +++ b/test/test_ietf_interfaces.py @@ -0,0 +1,80 @@ +# +# Copyright (c) 2019 PANTHEON.tech. +# +# 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. +# + +import unittest + +import util +from framewrok import SweetcombTestCase + +class TestIetfInterfaces(SweetcombTestCase): + + def setUp(self): + super(TestIetfInterfaces, self).setUp() + + self.create_topoly() + + def tearDown(self): + super(TestIetfInterfaces, self).setUp() + + self.topology.close_topology() + + def test_interface_up(self): + + self.vpp.show_interface() + + self.netopeer_cli.get("/ietf-interfaces:*") + ts = ''' + + local0 + true + + + host-vpp1 + true + +''' + + self.netopeer_cli.edit_config(ts) + self.netopeer_cli.get("/ietf-interfaces:*") + + self.vpp.show_interface() + + def test_ip_addr(self): + self.vpp.show_address() + self.netopeer_cli.get("/ietf-interfaces:*") + + util.ping('192.168.0.1') + + ts = ''' + + host-vpp1 + true + + true + + 192.168.0.1 + 24 + + + +''' + + self.netopeer_cli.edit_config(ts) + self.netopeer_cli.get("/ietf-interfaces:*") + + self.vpp.show_address() + + util.ping('192.168.0.1') -- cgit 1.2.3-korg