aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPavel Kotucek <pavel.kotucek@pantheon.tech>2019-04-15 14:10:15 +0200
committerHongjun Ni <hongjun.ni@intel.com>2019-04-25 13:01:35 +0000
commitbda8bf51f84cc9fb7a2d875c1f35540e0b4a3db4 (patch)
tree45a8d0a2d7e60295c01c0089d4147bb403f40da5 /test
parent29d2d586b9dfdd7776e42fefbe2b049de49dc009 (diff)
ACL yang models
Added ACL openconfig yang models. Change-Id: If8075def912bfa5f980101221d781b4857d4ca45 Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
Diffstat (limited to 'test')
-rw-r--r--test/util.py21
1 files changed, 5 insertions, 16 deletions
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