Disabled key-value datastore; Removed mandatory requirements for BACKEND, NETCONF, RESTCONF and CLI dirs

This commit is contained in:
Olof hagsand 2017-11-19 18:04:23 +01:00
parent 13377da34e
commit 548ffd2da6
21 changed files with 64 additions and 55 deletions

View file

@ -400,12 +400,6 @@ main(int argc, char **argv)
if (yang_spec_main(h, stdout, printspec) < 0)
goto done;
/* Check plugin directory */
if (clicon_cli_dir(h) == NULL){
clicon_err(OE_PLUGIN, 0, "clicon_cli_dir not defined");
goto done;
}
/* Create tree generated from dataspec. If no other trees exists, this is
* the only one.
*/

View file

@ -366,7 +366,9 @@ done:
/*! Load plugins within a directory
*/
static int
cli_plugin_load_dir(clicon_handle h, char *dir, cli_syntax_t *stx)
cli_plugin_load_dir(clicon_handle h,
char *dir,
cli_syntax_t *stx)
{
int i;
int ndp;
@ -452,10 +454,7 @@ cli_syntax_load (clicon_handle h)
return 0;
/* Format plugin directory path */
if ((plugin_dir = clicon_cli_dir(h)) == NULL){
clicon_err(OE_FATAL, 0, "clicon_cli_dir not set");
goto quit;
}
plugin_dir = clicon_cli_dir(h);
clispec_dir = clicon_clispec_dir(h);
clispec_file = clicon_option_str(h, "CLICON_CLISPEC_FILE");
@ -474,7 +473,7 @@ cli_syntax_load (clicon_handle h)
goto quit;
/* Then load application plugins */
if (cli_plugin_load_dir(h, plugin_dir, stx) < 0)
if (plugin_dir && cli_plugin_load_dir(h, plugin_dir, stx) < 0)
goto quit;
if (clispec_file){