pyapi CHANGE reflect libyang python module renaming
libyang python module is now just yang instead of libyang
diff --git a/python/examples/editconfig.py b/python/examples/editconfig.py
index 802dc15..cc8a960 100755
--- a/python/examples/editconfig.py
+++ b/python/examples/editconfig.py
@@ -4,7 +4,7 @@
import os
import getpass
import json
-import libyang as ly
+import yang
import netconf2 as nc
def interactive_auth(name, instruct, prompt, data):
@@ -50,7 +50,7 @@
# prepare config content as string or data tree
tm = session.context.get_module("turing-machine")
# config = "<turing-machine xmlns=\"http://example.net/turing-machine\"><transition-function><delta><label>left summand</label><input><state>0</state></input></delta></transition-function></turing-machine>"
-config = ly.Data_Node(session.context, "/turing-machine:turing-machine/transition-function/delta[label='left summand']/input/state", "5", 0, 0)
+config = yang.Data_Node(session.context, "/turing-machine:turing-machine/transition-function/delta[label='left summand']/input/state", "5", 0, 0)
# perform <edit-config> and print result
try:
diff --git a/python/examples/get.py b/python/examples/get.py
index 9ccfb73..b69cfbb 100755
--- a/python/examples/get.py
+++ b/python/examples/get.py
@@ -3,7 +3,7 @@
import sys
import os
import getpass
-import libyang as ly
+import yang
import netconf2 as nc
def interactive_auth(name, instruct, prompt, data):
@@ -56,4 +56,4 @@
print(json.dumps(reply))
sys.exit(1)
-print(data.print_mem(ly.LYD_XML, ly.LYP_FORMAT | ly.LYP_WITHSIBLINGS))
+print(data.print_mem(yang.LYD_XML, yang.LYP_FORMAT | yang.LYP_WITHSIBLINGS))
diff --git a/python/netconf.c b/python/netconf.c
index 5b990fc..6f5d37e 100644
--- a/python/netconf.c
+++ b/python/netconf.c
@@ -175,7 +175,7 @@
PyObject *nc;
/* import libyang Python module to have it available */
- if (!PyImport_ImportModule("libyang")) {
+ if (!PyImport_ImportModule("yang")) {
return NULL;
}
diff --git a/python/rpc.c b/python/rpc.c
index 4d0edd6..450bdb9 100644
--- a/python/rpc.c
+++ b/python/rpc.c
@@ -120,9 +120,9 @@
}
((struct nc_reply_data*)reply)->data = NULL;
- module = PyImport_ImportModule("libyang");
+ module = PyImport_ImportModule("yang");
if (module == NULL) {
- PyErr_SetString(libnetconf2Error, "Could not import libyang module");
+ PyErr_SetString(libnetconf2Error, "Could not import libyang python module");
goto error;
}
diff --git a/python/session.c b/python/session.c
index e11b033..3b2545b 100644
--- a/python/session.c
+++ b/python/session.c
@@ -434,9 +434,9 @@
goto error;
}
- module = PyImport_ImportModule("libyang");
+ module = PyImport_ImportModule("yang");
if (module == NULL) {
- PyErr_SetString(libnetconf2Error, "Could not import libyang module");
+ PyErr_SetString(libnetconf2Error, "Could not import libyang python module");
goto error;
}