Removed obsolete config yang handler

Added base netconf as default namespace in canonical nsctx
This commit is contained in:
Olof hagsand 2019-11-16 16:49:40 +01:00
parent 52629d7b35
commit d0e97ee338
8 changed files with 7 additions and 50 deletions

View file

@ -113,6 +113,10 @@ clicon_dbspec_yang_set(clicon_handle h,
* Canonical: use prefix and namespace specified in the yang modules.
* @param[in] h Clicon handle
* @retval nsctx Namespace context (malloced)
* @code
* cvec *nsctx;
* nsctx = clicon_nsctx_global_get(h);
* @endcode
*/
cvec *
clicon_nsctx_global_get(clicon_handle h)
@ -186,41 +190,6 @@ clicon_nacm_ext_set(clicon_handle h,
return 0;
}
#if 1 /* Temporary function until "Top-level Yang symbol cannot be called "config"" is fixed */
/*! Get YANG specification for clixon config
* Must use hash functions directly since they are not strings.
*/
yang_stmt *
clicon_config_yang(clicon_handle h)
{
clicon_hash_t *cdat = clicon_data(h);
size_t len;
void *p;
if ((p = clicon_hash_value(cdat, "control_yang", &len)) != NULL)
return *(yang_stmt **)p;
return NULL;
}
/*! Set yang specification for control
* ys must be a malloced pointer
*/
int
clicon_config_yang_set(clicon_handle h,
yang_stmt *ys)
{
clicon_hash_t *cdat = clicon_data(h);
/* It is the pointer to ys that should be copied by hash,
so we send a ptr to the ptr to indicate what to copy.
*/
if (clicon_hash_add(cdat, "control_yang", &ys, sizeof(ys)) == NULL)
return -1;
return 0;
}
#endif
/*! Get YANG specification for Clixon system options and features
* Must use hash functions directly since they are not strings.
* Example: features are typically accessed directly in the config tree.