Renamed custom constant to better reflect usage, fixed some vagrant problems

This commit is contained in:
Olof hagsand 2023-07-28 16:56:08 +02:00
parent 7577245077
commit 836ec5dde5
4 changed files with 19 additions and 14 deletions

View file

@ -158,16 +158,25 @@
#define PRETTYPRINT_INDENT 3 #define PRETTYPRINT_INDENT 3
/*! Autocli uses/grouping references for top-level /*! Autocli uses/grouping references for top-level
* Exception of expand-grouping in clixon-autocli.yang *
* Exception of expand-grouping=true in clixon-autocli.yang
* If enabled do not expand-grouping if a yang uses is directly under module or submodule * If enabled do not expand-grouping if a yang uses is directly under module or submodule
* Disabled does not work today and is temporary and for documentation * Disabled does not work today and is temporary and for documentation
*/ */
#define AUTOCLI_GROUPING_TOPLEVEL_SKIP #define AUTOCLI_GROUPING_TOPLEVEL_SKIP
/*! Autocli uses/grouping references for augment/uses /*! Skip uses/grouping references for augment
* Exception of expand-grouping in clixon-autocli.yang *
* If enabled do not expand-grouping if a yang uses is directly under augment * Consider YANG constructs such as:
* Disabled does not work today and is temporary and for documentation * augment x{
* it is also a "layering vilation" since the grouping/augment code is in cli-independent libs * uses y;
* <nodes>
* }
* If enabled, do not include "uses y" in the augmentation at "x" AND mark all nodes with
* YANG_FLAG_GROUPING
* If disabled, include "uses y" in the augmentation AND do NOT mark expaneded nodes with
* YANG_FLAG_GROUPING.
* This affects the AUTOCLI expand-grouping=true behavior.
* Disabled does not work
*/ */
#define AUTOCLI_GROUPING_AUGMENT_SKIP #define YANG_GROUPING_AUGMENT_SKIP

View file

@ -279,7 +279,7 @@ yang_augment_node(clicon_handle h,
childkey = yang_keyword_get(yc0); childkey = yang_keyword_get(yc0);
/* Only shemanodes and extensions */ /* Only shemanodes and extensions */
if (!yang_schemanode(yc0) && childkey != Y_UNKNOWN if (!yang_schemanode(yc0) && childkey != Y_UNKNOWN
#ifndef AUTOCLI_GROUPING_AUGMENT_SKIP #ifndef YANG_GROUPING_AUGMENT_SKIP
&& childkey != Y_USES && childkey != Y_USES
#endif #endif
) )
@ -349,7 +349,7 @@ yang_augment_node(clicon_handle h,
} }
if ((yc = ys_dup(yc0)) == NULL) if ((yc = ys_dup(yc0)) == NULL)
goto done; goto done;
#ifdef AUTOCLI_GROUPING_AUGMENT_SKIP #ifdef YANG_GROUPING_AUGMENT_SKIP
/* cornercase: always expand uses under augment */ /* cornercase: always expand uses under augment */
yang_flag_reset(yc, YANG_FLAG_GROUPING); yang_flag_reset(yc, YANG_FLAG_GROUPING);
#endif #endif

View file

@ -309,7 +309,7 @@ $sshcmd sudo ./yangmodels.sh
# Run tests # Run tests
$sshcmd "(cd src/cligen/test; ./sum.sh)" $sshcmd "(cd src/cligen/test; ./sum.sh)"
$sshcmd "(cd src/clixon/test; detail=true ./sum.sh)" $sshcmd "(cd src/clixon/test; bash -c 'detail=true ./sum.sh')"
# destroy vm # destroy vm
#if $destroy; then #if $destroy; then

View file

@ -235,7 +235,6 @@ main(int argc,
struct sockaddr from = {0,}; struct sockaddr from = {0,};
socklen_t len; socklen_t len;
size_t sin_len; size_t sin_len;
int dbg = 0;
uint16_t port = NETCONF_CH_SSH; uint16_t port = NETCONF_CH_SSH;
int ss = -1; /* server socket */ int ss = -1; /* server socket */
int s = -1; /* accepted session socket */ int s = -1; /* accepted session socket */
@ -247,9 +246,6 @@ main(int argc,
case 'h': case 'h':
usage(argv[0]); usage(argv[0]);
break; break;
case 'D':
dbg++; /* not used */
break;
case 'f': case 'f':
family = optarg; family = optarg;
break; break;