From bda8bf51f84cc9fb7a2d875c1f35540e0b4a3db4 Mon Sep 17 00:00:00 2001 From: Pavel Kotucek Date: Mon, 15 Apr 2019 14:10:15 +0200 Subject: ACL yang models Added ACL openconfig yang models. Change-Id: If8075def912bfa5f980101221d781b4857d4ca45 Signed-off-by: Pavel Kotucek --- test/util.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'test') diff --git a/test/util.py b/test/util.py index 6fe5427..c31439d 100644 --- a/test/util.py +++ b/test/util.py @@ -22,25 +22,14 @@ def ping(ip): subprocess.run("ping -c 4 " + ip, shell=True) def import_yang_modules(): - print("Import YANG modules to sysrepo.") + print("Import YANG models to sysrepo.") directory = '/root/src/sweetcomb/' - os.chdir(directory + "src/plugins/yang/ietf/") - subprocess.run(["sysrepoctl", "--install", "-S", ".", - "--yang=./ietf-interfaces.yang"]) - - os.chdir(directory + "src/plugins/yang/openconfig/") - subprocess.run(["sysrepoctl", "--install", "-S", ".", - "--yang=./openconfig-interfaces.yang"]) - subprocess.run(["sysrepoctl", "--install", "-S", ".", - "--yang=./openconfig-if-ip.yang"]) - subprocess.run(["sysrepoctl", "--install", "-S", ".", - "--yang=./openconfig-local-routing.yang"]) - - time.sleep(5) + os.chdir(directory) + subprocess.run(["make", "uninstall-models"]) + subprocess.run(["make", "install-models"]) os.chdir(directory + "test/conf/") - print("Import configuration to sysrepo datastore.") subprocess.run(["sysrepocfg", "--import=ietf-interfaces.xml", "--datastore=startup", "--format=xml", "--leve=0", @@ -49,4 +38,4 @@ def import_yang_modules(): "--datastore=running", "--format=xml", "--leve=0", "ietf-interfaces"]) os.chdir(directory) - time.sleep(2) + time.sleep(2) \ No newline at end of file -- cgit 1.2.3-korg