Formatting, whitespace

This commit is contained in:
Olof hagsand 2025-03-16 17:28:11 +01:00
parent f26ea043c7
commit 411f509fd8
19 changed files with 288 additions and 288 deletions

View file

@ -457,8 +457,7 @@ int
clixon_plugin_lockdb_all(clixon_handle h, clixon_plugin_lockdb_all(clixon_handle h,
char *db, char *db,
int lock, int lock,
int id int id)
)
{ {
int retval = -1; int retval = -1;

View file

@ -454,7 +454,7 @@ netconf_input_cb(int s,
frame_size = 0; frame_size = 0;
else else
frame_size = i32; frame_size = i32;
/* Read input data from socket and append to cbbuf */ /* Read input data from socket and append to cbuf */
if ((len = netconf_input_read2(s, buf, buflen, &eof)) < 0) if ((len = netconf_input_read2(s, buf, buflen, &eof)) < 0)
goto done; goto done;
p = buf; p = buf;
@ -602,7 +602,7 @@ netconf_terminate(clixon_handle h)
/*! Setup signal handlers /*! Setup signal handlers
*/ */
static int static int
netconf_signal_init (clixon_handle h) netconf_signal_init(clixon_handle h)
{ {
int retval = -1; int retval = -1;

View file

@ -77,7 +77,7 @@
* <rpc [attributes]> * <rpc [attributes]>
<!- - tag elements in a request from a client application - -> <!- - tag elements in a request from a client application - ->
</rpc> </rpc>
*/ */
static int static int
netconf_get_config_subtree(clixon_handle h, netconf_get_config_subtree(clixon_handle h,
@ -100,7 +100,7 @@ netconf_get_config_subtree(clixon_handle h,
NETCONF_BASE_NAMESPACE NETCONF_BASE_NAMESPACE
); );
} }
ok: ok:
retval = 0; retval = 0;
// done: // done:
return retval; return retval;
@ -156,7 +156,7 @@ ok:
<rpc><get-config><source><candidate/></source><filter type="subtree"><configuration><interfaces><interface><ipv4><enabled/></ipv4></interface></interfaces></configuration></filter></get-config></rpc>]]>]]> <rpc><get-config><source><candidate/></source><filter type="subtree"><configuration><interfaces><interface><ipv4><enabled/></ipv4></interface></interfaces></configuration></filter></get-config></rpc>]]>]]>
* filter xpath + select: * filter xpath + select:
<rpc><get-config><source><candidate/></source><filter type="xpath" select="/interfaces/interface/ipv4"/></get-config></rpc>]]>]]> <rpc><get-config><source><candidate/></source><filter type="xpath" select="/interfaces/interface/ipv4"/></get-config></rpc>]]>]]>
*/ */
static int static int
netconf_get_config(clixon_handle h, netconf_get_config(clixon_handle h,
cxobj *xn, cxobj *xn,
@ -305,7 +305,7 @@ get_edit_opts(cxobj *xn,
<test-option>(set | test-then-set | test-only)</test-option> <test-option>(set | test-then-set | test-only)</test-option>
<edit-config> <edit-config>
CLIXON addition: CLIXON addition:
<filter type="restconf" select="/data/profile=a" /> <filter type="restconf" select="/data/profile=a" />
* *
@ -597,8 +597,8 @@ netconf_application_rpc(clixon_handle h,
cxobj *xerr = NULL; cxobj *xerr = NULL;
cbuf *cb = NULL; cbuf *cb = NULL;
cbuf *cbret = NULL; cbuf *cbret = NULL;
int ret;
int nr = 0; int nr = 0;
int ret;
/* First check system / netconf RPC:s */ /* First check system / netconf RPC:s */
if ((cb = cbuf_new()) == NULL){ if ((cb = cbuf_new()) == NULL){
@ -782,4 +782,5 @@ netconf_rpc_dispatch(clixon_handle h,
if ((xa = xml_find(xn, "username")) != NULL) if ((xa = xml_find(xn, "username")) != NULL)
xml_purge(xa); xml_purge(xa);
return retval; return retval;
} }

View file

@ -204,10 +204,12 @@ restconf_native_handle_set(clixon_handle h,
return 0; return 0;
} }
/* util function to append log string /*! util function to append log string
*/ */
static int static int
print_cb(const char *str, size_t len, void *cb) print_cb(const char *str,
size_t len,
void *cb)
{ {
return cbuf_append_str((cbuf*)cb, (char*)str); /* Assume string */ return cbuf_append_str((cbuf*)cb, (char*)str); /* Assume string */
} }

View file

@ -159,7 +159,6 @@ api_data_get2(clixon_handle h,
goto ok; goto ok;
} }
/* Ad-hoc method to determine json pagination request: /* Ad-hoc method to determine json pagination request:
* address list and one of "item/offset/.." is defined * address list and one of "item/offset/.." is defined
*/ */

View file

@ -127,7 +127,7 @@ RUN git clone https://github.com/clicon/mib-yangs.git /usr/local/share/mib-yangs
# Stage 2 # Stage 2
# The second step skips the development environment and builds a runtime system # The second step skips the development environment and builds a runtime system
FROM alpine FROM alpine
MAINTAINER Olof Hagsand <olof@hagsand.se> LABEL maintainer="Olof Hagsand <olof@hagsand.se>"
# For clixon and cligen # For clixon and cligen
RUN apk add --update flex bison fcgi-dev RUN apk add --update flex bison fcgi-dev

View file

@ -127,7 +127,7 @@ RUN git clone https://github.com/clicon/mib-yangs.git /usr/local/share/mib-yangs
# The second step skips the development environment and builds a runtime system # The second step skips the development environment and builds a runtime system
# 3.20 # 3.20
FROM alpine:latest FROM alpine:latest
MAINTAINER Olof Hagsand <olof@hagsand.se> LABEL maintainer="Olof Hagsand <olof@hagsand.se>"
# For clixon and cligen # For clixon and cligen
RUN apk add --update flex bison openssl RUN apk add --update flex bison openssl

View file

@ -546,6 +546,7 @@ xml2ns(cxobj *x,
/*! Recursively check prefix / namespaces (and populate ns cache) /*! Recursively check prefix / namespaces (and populate ns cache)
* *
* @param[in] xt XML node
* @retval 1 OK * @retval 1 OK
* @retval 0 (Some) prefix not found * @retval 0 (Some) prefix not found
* @retval -1 Error * @retval -1 Error

View file

@ -812,7 +812,6 @@ meta_stmt : organization_stmt { _PARSE_DEBUG("meta-stmt -> organization-s
| reference_stmt { _PARSE_DEBUG("meta-stmt -> reference-stmt"); } | reference_stmt { _PARSE_DEBUG("meta-stmt -> reference-stmt"); }
; ;
/* length-stmt */ /* length-stmt */
length_stmt : K_LENGTH string ';' /* XXX length-arg-str */ length_stmt : K_LENGTH string ';' /* XXX length-arg-str */
{ if (ysp_add(_yy, Y_LENGTH, $2, NULL) == NULL) _YYERROR("length_stmt"); { if (ysp_add(_yy, Y_LENGTH, $2, NULL) == NULL) _YYERROR("length_stmt");

View file

@ -160,8 +160,8 @@ module clixon-restconf {
leaf debug { leaf debug {
description description
"Set debug level of restconf daemon. "Set debug level of restconf daemon.
0 is no debug, 1 is debugging, more is detailed debug. Debug logs will be directed to log-destination with LOG_DEBUG level (for syslog)
Debug logs will be directed to log-destination with LOG_DEBUG level (for syslog)"; Note: must be decimal";
type uint32; type uint32;
default 0; default 0;
} }

View file

@ -67,10 +67,9 @@ YANGSPECS += ietf-origin@2018-02-14.yang
YANGSPECS += ietf-netconf-with-defaults@2011-06-01.yang YANGSPECS += ietf-netconf-with-defaults@2011-06-01.yang
YANGSPECS += ietf-netconf-monitoring@2010-10-04.yang YANGSPECS += ietf-netconf-monitoring@2010-10-04.yang
# in draft-ietf-netconf-list-pagination-04.html # IETF list-pagination drafts
YANGSPECS += ietf-list-pagination@2024-07-08.yang YANGSPECS += ietf-list-pagination@2024-10-21.yang
# in draft-ietf-netconf-list-pagination-nc-04 YANGSPECS += ietf-list-pagination-nc@2024-10-21.yang
YANGSPECS += ietf-list-pagination-nc@2024-07-08.yang
all: all: