summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
5d511ac)
Signed-off-by: wahidw <abdulwahid.w@nokia.com>
Change-Id: Iafbdcb048a18514a476ba2be87567e10677cb0ce
#----------------------------------------------------------
FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 AS o1mediator-build
#----------------------------------------------------------
FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 AS o1mediator-build
+RUN apt update && apt install --reinstall -y \
+ ca-certificates \
+ && \
+ update-ca-certificates
+
RUN apt-get update -y && apt-get install -y jq \
git \
cmake \
build-essential \
vim \
supervisor \
RUN apt-get update -y && apt-get install -y jq \
git \
cmake \
build-essential \
vim \
supervisor \
pkg-config \
libavl-dev \
libev-dev \
pkg-config \
libavl-dev \
libev-dev \
# libyang
RUN \
cd /opt/dev && \
# libyang
RUN \
cd /opt/dev && \
- git clone https://github.com/CESNET/libyang.git && \
+ git clone -b libyang1 https://github.com/CESNET/libyang.git && \
cd libyang && mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \
make -j2 && \
cd libyang && mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \
make -j2 && \
# sysrepo
RUN \
cd /opt/dev && \
# sysrepo
RUN \
cd /opt/dev && \
- git clone https://github.com/sysrepo/sysrepo.git && \
+ git clone -b libyang1 https://github.com/sysrepo/sysrepo.git && \
cd sysrepo && sed -i -e 's/2000/30000/g;s/5000/30000/g' src/common.h.in && \
mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo .. && \
cd sysrepo && sed -i -e 's/2000/30000/g;s/5000/30000/g' src/common.h.in && \
mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo .. && \
# libnetconf2
RUN \
cd /opt/dev && \
# libnetconf2
RUN \
cd /opt/dev && \
- git clone https://github.com/CESNET/libnetconf2.git && \
+ git clone -b libyang1 https://github.com/CESNET/libnetconf2.git && \
cd libnetconf2 && mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \
make -j2 && \
cd libnetconf2 && mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DENABLE_BUILD_TESTS=OFF .. && \
make -j2 && \
# netopeer2
RUN \
cd /opt/dev && \
# netopeer2
RUN \
cd /opt/dev && \
- git clone https://github.com/CESNET/Netopeer2.git && \
+ git clone -b libyang1 https://github.com/CESNET/Netopeer2.git && \
cd Netopeer2 && mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DNP2SRV_DATA_CHANGE_TIMEOUT=30000 -DNP2SRV_DATA_CHANGE_WAIT=ON .. && \
make -j2 && \
cd Netopeer2 && mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DNP2SRV_DATA_CHANGE_TIMEOUT=30000 -DNP2SRV_DATA_CHANGE_WAIT=ON .. && \
make -j2 && \
supervisor \
openssl \
python-pip \
supervisor \
openssl \
python-pip \
pkg-config \
libavl-dev \
libev-dev \
pkg-config \
libavl-dev \
libev-dev \
sr_val_t *val = NULL;
char *json_str = NULL;
struct lyd_node *root = NULL;
sr_val_t *val = NULL;
char *json_str = NULL;
struct lyd_node *root = NULL;
- struct lyd_node *node = NULL;
rc = sr_get_changes_iter(session, "//." , &it);
if (rc != SR_ERR_OK) {
rc = sr_get_changes_iter(session, "//." , &it);
if (rc != SR_ERR_OK) {
val = oper == SR_OP_CREATED ? new_value : old_value;
char *leaf = sr_val_to_str(val);
if (root) {
val = oper == SR_OP_CREATED ? new_value : old_value;
char *leaf = sr_val_to_str(val);
if (root) {
- lyd_new_path(root, NULL, val->xpath, (void *) leaf, LYD_NEW_PATH_UPDATE, &node);
+ lyd_new_path(root, NULL, val->xpath, (void *) leaf, 0, 1);
- lyd_new_path(NULL, sr_get_context(sr_session_get_connection(session)), val->xpath, (void *) leaf, LYD_NEW_PATH_UPDATE, &root);
+ root = lyd_new_path(NULL, sr_get_context(sr_session_get_connection(session)), val->xpath, (void *) leaf, 0, 1);
}
sr_free_val(old_value);
}
sr_free_val(old_value);
- lyd_print_mem(&json_str, root, LYD_JSON, LYD_PRINT_WITHSIBLINGS);
+ lyd_print_mem(&json_str, root, LYD_JSON, LYP_WITHSIBLINGS | LYP_FORMAT);
printf("\n%s\n", json_str);
}
printf("\n%s\n", json_str);
}
- lyd_print_mem(&json_str, data, LYD_JSON, LYD_PRINT_WITHSIBLINGS);
+ lyd_print_mem(&json_str, data, LYD_JSON, LYP_WITHSIBLINGS | LYP_FORMAT);
void create_new_path(sr_session_ctx_t *session, char **parent, char *key, char *value) {
struct lyd_node **p = (struct lyd_node **)parent;
void create_new_path(sr_session_ctx_t *session, char **parent, char *key, char *value) {
struct lyd_node **p = (struct lyd_node **)parent;
- lyd_new_path(NULL, sr_get_context(sr_session_get_connection(session)), key, value, LYD_NEW_PATH_UPDATE, &node);
+ *p = lyd_new_path(NULL, sr_get_context(sr_session_get_connection(session)), key, value, 0, 0);
- lyd_new_path(*p, sr_get_context(sr_session_get_connection(session)), key, value, LYD_NEW_PATH_UPDATE, &node);
+ lyd_new_path(*p, sr_get_context(sr_session_get_connection(session)), key, value, 0, 0);