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,
char *db,
int lock,
int id
)
int id)
{
int retval = -1;

View file

@ -454,7 +454,7 @@ netconf_input_cb(int s,
frame_size = 0;
else
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)
goto done;
p = buf;
@ -602,7 +602,7 @@ netconf_terminate(clixon_handle h)
/*! Setup signal handlers
*/
static int
netconf_signal_init (clixon_handle h)
netconf_signal_init(clixon_handle h)
{
int retval = -1;

View file

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

View file

@ -204,10 +204,12 @@ restconf_native_handle_set(clixon_handle h,
return 0;
}
/* util function to append log string
/*! util function to append log string
*/
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 */
}

View file

@ -159,7 +159,6 @@ api_data_get2(clixon_handle h,
goto ok;
}
/* Ad-hoc method to determine json pagination request:
* 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
# The second step skips the development environment and builds a runtime system
FROM alpine
MAINTAINER Olof Hagsand <olof@hagsand.se>
LABEL maintainer="Olof Hagsand <olof@hagsand.se>"
# For clixon and cligen
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
# 3.20
FROM alpine:latest
MAINTAINER Olof Hagsand <olof@hagsand.se>
LABEL maintainer="Olof Hagsand <olof@hagsand.se>"
# For clixon and cligen
RUN apk add --update flex bison openssl

View file

@ -546,6 +546,7 @@ xml2ns(cxobj *x,
/*! Recursively check prefix / namespaces (and populate ns cache)
*
* @param[in] xt XML node
* @retval 1 OK
* @retval 0 (Some) prefix not found
* @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"); }
;
/* length-stmt */
length_stmt : K_LENGTH string ';' /* XXX length-arg-str */
{ if (ysp_add(_yy, Y_LENGTH, $2, NULL) == NULL) _YYERROR("length_stmt");

View file

@ -160,8 +160,8 @@ module clixon-restconf {
leaf debug {
description
"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;
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-monitoring@2010-10-04.yang
# in draft-ietf-netconf-list-pagination-04.html
YANGSPECS += ietf-list-pagination@2024-07-08.yang
# in draft-ietf-netconf-list-pagination-nc-04
YANGSPECS += ietf-list-pagination-nc@2024-07-08.yang
# IETF list-pagination drafts
YANGSPECS += ietf-list-pagination@2024-10-21.yang
YANGSPECS += ietf-list-pagination-nc@2024-10-21.yang
all: