diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd4563d..0f77e025 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ Developers may need to change their code ### Corrected Bugs +* Fixed: [state showing error in cli with CLICON_STREAM_DISCOVERY_RFC8040 #191](https://github.com/clicon/clixon/issues/191) * Fixed: [yang submodule show error in modules-state #190](yang submodule show error in modules-state #190) * Fixed: [Backend can not read datastore with container named "config" #147](https://github.com/clicon/clixon/issues/147) * Fixed: [The config false leaf shouldn't be configed in startup stage #189](https://github.com/clicon/clixon/issues/189) diff --git a/apps/backend/backend_main.c b/apps/backend/backend_main.c index ad0c3299..7b81e252 100644 --- a/apps/backend/backend_main.c +++ b/apps/backend/backend_main.c @@ -817,14 +817,6 @@ main(int argc, /* Load yang restconf module */ if (yang_spec_parse_module(h, "ietf-restconf", NULL, yspec)< 0) goto done; - /* Load yang Restconf stream discovery */ - if (clicon_option_bool(h, "CLICON_STREAM_DISCOVERY_RFC8040") && - yang_spec_parse_module(h, "ietf-restconf-monitoring", NULL, yspec)< 0) - goto done; - /* Load yang Netconf stream discovery */ - if (clicon_option_bool(h, "CLICON_STREAM_DISCOVERY_RFC5277") && - yang_spec_parse_module(h, "clixon-rfc5277", NULL, yspec)< 0) - goto done; /* Load yang YANG module state */ if (clicon_option_bool(h, "CLICON_XMLDB_MODSTATE") && yang_spec_parse_module(h, "ietf-yang-library", NULL, yspec)< 0) diff --git a/lib/src/clixon_netconf_lib.c b/lib/src/clixon_netconf_lib.c index 8762bbfc..b93adf93 100644 --- a/lib/src/clixon_netconf_lib.c +++ b/lib/src/clixon_netconf_lib.c @@ -1372,9 +1372,14 @@ netconf_module_load(clicon_handle h) /* Load yang spec */ if (yang_spec_parse_module(h, "ietf-netconf", NULL, yspec)< 0) goto done; + /* Load yang Netconf stream discovery */ if (clicon_option_bool(h, "CLICON_STREAM_DISCOVERY_RFC5277")) if (yang_spec_parse_module(h, "clixon-rfc5277", NULL, yspec)< 0) goto done; + /* Load yang Restconf stream discovery */ + if (clicon_option_bool(h, "CLICON_STREAM_DISCOVERY_RFC8040") && + yang_spec_parse_module(h, "ietf-restconf-monitoring", NULL, yspec)< 0) + goto done; /* YANG module revision change management */ if (clicon_option_bool(h, "CLICON_XML_CHANGELOG")) if (yang_spec_parse_module(h, "clixon-xml-changelog", NULL, yspec)< 0)