- Improved debugs for native restconf config reads
- Docker: restconf native added nghttp2
This commit is contained in:
parent
ba45d6d2a1
commit
d6c175e76e
5 changed files with 17 additions and 10 deletions
|
|
@ -1733,7 +1733,7 @@ restconf_clixon_init(clicon_handle h,
|
|||
if (clicon_nsctx_global_set(h, nsctx_global) < 0)
|
||||
goto done;
|
||||
if (inline_config != NULL && strlen(inline_config)){
|
||||
clicon_debug(1, "%s using restconf inline config", __FUNCTION__);
|
||||
clicon_debug(1, "%s reading from inline config", __FUNCTION__);
|
||||
if ((ret = clixon_xml_parse_string(inline_config, YB_MODULE, yspec, &xrestconf, &xerr)) < 0)
|
||||
goto done;
|
||||
if (ret == 0){
|
||||
|
|
@ -1755,6 +1755,7 @@ restconf_clixon_init(clicon_handle h,
|
|||
goto done;
|
||||
}
|
||||
else if (clicon_option_bool(h, "CLICON_BACKEND_RESTCONF_PROCESS") == 0){
|
||||
clicon_debug(1, "%s reading from clixon config", __FUNCTION__);
|
||||
/* If not read from backend, try to get restconf config from local config-file */
|
||||
if ((xrestconf = clicon_conf_restconf(h)) != NULL){
|
||||
/*! Basic config init, set auth-type, pretty, etc ret 0 means disabled */
|
||||
|
|
@ -1772,6 +1773,7 @@ restconf_clixon_init(clicon_handle h,
|
|||
/* If no local config, or it is disabled, try to query backend of config.
|
||||
*/
|
||||
else {
|
||||
clicon_debug(1, "%s reading from backend datastore config", __FUNCTION__);
|
||||
if ((ret = restconf_clixon_backend(h, xrestconfp)) < 0)
|
||||
goto done;
|
||||
if (ret == 0)
|
||||
|
|
|
|||
|
|
@ -41,10 +41,12 @@ RUN apk add --update git make build-base gcc flex bison curl-dev
|
|||
# Create a directory to hold source-code, dependencies etc
|
||||
RUN mkdir /clixon
|
||||
|
||||
# evhtp
|
||||
# dependencies
|
||||
# evhtp dependencies
|
||||
RUN apk add --update libevent libevent-dev
|
||||
|
||||
# nghttp2 dependencies
|
||||
RUN apk add --update nghttp2
|
||||
|
||||
# clone libevhtp
|
||||
WORKDIR /clixon
|
||||
|
||||
|
|
@ -68,14 +70,14 @@ RUN ./configure --prefix=/clixon/build
|
|||
RUN make
|
||||
RUN make install
|
||||
|
||||
# Need to add www user manually
|
||||
RUN adduser -D -H -G www-data www-data
|
||||
|
||||
# Copy Clixon from local dir
|
||||
RUN mkdir /clixon/clixon
|
||||
WORKDIR /clixon/clixon
|
||||
COPY clixon .
|
||||
|
||||
# Need to add www user manually
|
||||
RUN adduser -D -H -G www-data www-data
|
||||
|
||||
# Configure, build and install clixon
|
||||
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --enable-optyangs --with-restconf=native --enable-nghttp2 --enable-evhtp
|
||||
|
||||
|
|
@ -117,6 +119,9 @@ RUN adduser -D -H -G www-data www-data
|
|||
# for libevtp
|
||||
RUN apk add --update openssl libevent
|
||||
|
||||
# nghttp2 dependencies
|
||||
RUN apk add --update nghttp2
|
||||
|
||||
# Test-specific (for test scripts)
|
||||
RUN apk add --update sudo curl procps grep make bash # iproute2 # contains ip - but CAP_SYS_ADMIN isssue
|
||||
|
||||
|
|
@ -135,5 +140,5 @@ RUN mkdir /www-data
|
|||
RUN chown clicon /www-data
|
||||
RUN chgrp clicon /www-data
|
||||
|
||||
# Log to stderr.
|
||||
# Start the backend and restconf deamons
|
||||
CMD /usr/local/bin/startsystem.sh
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
<CLICON_CLI_GENMODEL_COMPLETION>1</CLICON_CLI_GENMODEL_COMPLETION>
|
||||
<CLICON_CLI_GENMODEL_TYPE>VARS</CLICON_CLI_GENMODEL_TYPE>
|
||||
<CLICON_CLI_AUTOCLI_EXCLUDE>clixon-restconf</CLICON_CLI_AUTOCLI_EXCLUDE>
|
||||
<CLICON_XMLDB_DIR>/usr/local/var/example</CLICON_XMLDB_DIR>
|
||||
<CLICON_CLI_LINESCROLLING>0</CLICON_CLI_LINESCROLLING>
|
||||
<CLICON_CLI_TAB_MODE>0</CLICON_CLI_TAB_MODE>
|
||||
<CLICON_XMLDB_DIR>/usr/local/var/example</CLICON_XMLDB_DIR>
|
||||
<CLICON_STARTUP_MODE>init</CLICON_STARTUP_MODE>
|
||||
<CLICON_NACM_MODE>disabled</CLICON_NACM_MODE>
|
||||
<CLICON_STREAM_DISCOVERY_RFC5277>true</CLICON_STREAM_DISCOVERY_RFC5277>
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ xmldb_empty_get(clicon_handle h,
|
|||
return de->de_empty;
|
||||
}
|
||||
|
||||
/*! Get modified flag from datastore
|
||||
/*! Set modified flag from datastore
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] db Database name
|
||||
* @param[in] value 0 or 1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# Advanced union types and generated code
|
||||
# and enum w values
|
||||
# The test is run twice, first with dbcache turned on, then turned off.
|
||||
# The test is run three times, with dbcache turned on, cache off and zero-copy
|
||||
# It is the only test with dbcache off.
|
||||
|
||||
# Magic line must be first in script (see README.md)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue