fixed fcgi notification, genmodel

This commit is contained in:
Olof hagsand 2021-03-10 14:45:18 +01:00
parent 5692072d36
commit f01efaf02a
5 changed files with 19 additions and 20 deletions

View file

@ -56,7 +56,6 @@ struct client_entry{
clicon_handle ce_handle; /* clicon config handle (all clients have same?) */
};
/*
* Prototypes
*/

View file

@ -353,7 +353,7 @@ yang2cli_var_pattern(clicon_handle h,
}
/* Forward */
static int yang2cli_stmt(clicon_handle h, yang_stmt *ys, enum genmodel_type gt,
static int yang2cli_stmt(clicon_handle h, yang_stmt *ys, genmodel_type gt,
int level, int state, int show_tree,
cbuf *cb);
@ -652,7 +652,7 @@ yang2cli_var(clicon_handle h,
static int
yang2cli_leaf(clicon_handle h,
yang_stmt *ys,
enum genmodel_type gt,
genmodel_type gt,
int level,
int callback,
int show_tree,
@ -729,7 +729,7 @@ yang2cli_leaf(clicon_handle h,
static int
yang2cli_container(clicon_handle h,
yang_stmt *ys,
enum genmodel_type gt,
genmodel_type gt,
int level,
int state,
int show_tree,
@ -785,13 +785,13 @@ yang2cli_container(clicon_handle h,
* @param[out] cb Buffer where cligen code is written
*/
static int
yang2cli_list(clicon_handle h,
yang_stmt *ys,
enum genmodel_type gt,
int level,
int state,
int show_tree,
cbuf *cb)
yang2cli_list(clicon_handle h,
yang_stmt *ys,
genmodel_type gt,
int level,
int state,
int show_tree,
cbuf *cb)
{
yang_stmt *yc;
yang_stmt *yd;
@ -903,7 +903,7 @@ yang2cli_list(clicon_handle h,
static int
yang2cli_choice(clicon_handle h,
yang_stmt *ys,
enum genmodel_type gt,
genmodel_type gt,
int level,
int state,
int show_tree,
@ -946,7 +946,7 @@ yang2cli_choice(clicon_handle h,
static int
yang2cli_stmt(clicon_handle h,
yang_stmt *ys,
enum genmodel_type gt,
genmodel_type gt,
int level,
int state,
int show_tree,
@ -1009,11 +1009,11 @@ yang2cli(clicon_handle h,
int show_tree,
parse_tree *pt)
{
int retval = -1;
cbuf *cb = NULL;
yang_stmt *yc;
cvec *globals; /* global variables from syntax */
enum genmodel_type gt;
int retval = -1;
cbuf *cb = NULL;
yang_stmt *yc;
cvec *globals; /* global variables from syntax */
genmodel_type gt;
if (pt == NULL){
clicon_err(OE_YANG, EINVAL, "pt is NULL");

View file

@ -55,7 +55,6 @@
#include <ctype.h>
#include <time.h>
#include <limits.h>
#include <signal.h>
#include <pwd.h>
#include <sys/time.h>
#include <sys/wait.h>

View file

@ -78,6 +78,7 @@ enum genmodel_type{
GT_ALL, /* Keywords on all variables */
GT_HIDE, /* Keywords on all variables and hide container around lists */
};
typedef enum genmodel_type genmodel_type;
/*! See clixon-config.yang type startup_mode */
enum startup_mode_t{

View file

@ -141,7 +141,7 @@ if [ $RC -ne 0 ]; then
fi
new "netconf event stream discovery RFC8040 Sec 6.2"
expecteof "$clixon_netconf -D $DBG -qf $cfg" 0 "<rpc $DEFAULTNS><get><filter type=\"xpath\" select=\"r:restconf-state/r:streams\" xmlns:r=\"urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring\"/></get></rpc>]]>]]>" "<rpc-reply $DEFAULTNS><data><restconf-state xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring\"><streams><stream><name>EXAMPLE</name><description>Example event stream</description><replay-support>true</replay-support><access><encoding>xml</encoding><location>https://localhost/streams/EXAMPLE</location></access></stream></streams></restconf-state></data></rpc-reply>]]>]]>"
expecteof "$clixon_netconf -D $DBG -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><get><filter type=\"xpath\" select=\"r:restconf-state/r:streams\" xmlns:r=\"urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring\"/></get></rpc>]]>]]>" "<rpc-reply $DEFAULTNS><data><restconf-state xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring\"><streams><stream><name>EXAMPLE</name><description>Example event stream</description><replay-support>true</replay-support><access><encoding>xml</encoding><location>https://localhost/streams/EXAMPLE</location></access></stream></streams></restconf-state></data></rpc-reply>]]>]]>"
#
# 1.2 Netconf stream subscription