Non-key list now not accepted in edit-config (before only on validation)
This commit is contained in:
parent
4e23864acd
commit
06e6ef80d1
25 changed files with 620 additions and 71 deletions
|
|
@ -188,6 +188,9 @@ transaction_clen(transaction_data td)
|
|||
return ((transaction_data_t *)td)->td_clen;
|
||||
}
|
||||
|
||||
/*! Print transaction on FILE for debug
|
||||
* @see transaction_log
|
||||
*/
|
||||
int
|
||||
transaction_print(FILE *f,
|
||||
transaction_data th)
|
||||
|
|
@ -218,3 +221,50 @@ transaction_print(FILE *f,
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
transaction_log(clicon_handle h,
|
||||
transaction_data th,
|
||||
int level,
|
||||
const char *op)
|
||||
{
|
||||
cxobj *xn;
|
||||
int i;
|
||||
transaction_data_t *td;
|
||||
cbuf *cb = NULL;
|
||||
|
||||
td = (transaction_data_t *)th;
|
||||
if ((cb = cbuf_new()) == NULL){
|
||||
clicon_err(OE_CFG, errno, "cbuf_new");
|
||||
goto done;
|
||||
}
|
||||
for (i=0; i<td->td_dlen; i++){
|
||||
xn = td->td_dvec[i];
|
||||
clicon_xml2cbuf(cb, xn, 0, 0);
|
||||
}
|
||||
if (i)
|
||||
clicon_log(level, "%s %" PRIu64 " %s del: %s",
|
||||
__FUNCTION__, td->td_id, op, cbuf_get(cb));
|
||||
cbuf_reset(cb);
|
||||
for (i=0; i<td->td_alen; i++){
|
||||
xn = td->td_avec[i];
|
||||
clicon_xml2cbuf(cb, xn, 0, 0);
|
||||
}
|
||||
if (i)
|
||||
clicon_log(level, "%s %" PRIu64 " %s add: %s", __FUNCTION__, td->td_id, op, cbuf_get(cb));
|
||||
cbuf_reset(cb);
|
||||
for (i=0; i<td->td_clen; i++){
|
||||
if (td->td_scvec){
|
||||
xn = td->td_scvec[i];
|
||||
clicon_xml2cbuf(cb, xn, 0, 0);
|
||||
}
|
||||
xn = td->td_tcvec[i];
|
||||
clicon_xml2cbuf(cb, xn, 0, 0);
|
||||
}
|
||||
if (i)
|
||||
clicon_log(level, "%s %" PRIu64 " %s change: %s", __FUNCTION__, td->td_id, op, cbuf_get(cb));
|
||||
done:
|
||||
if (cb)
|
||||
cbuf_free(cb);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue