Open
Conversation
b101bf4 to
bec425b
Compare
michalvasko
requested changes
Apr 24, 2026
| } | ||
|
|
||
| if (lyd_parse_data_path(ctx, config_file, LYD_XML, LYD_PARSE_ONLY | LYD_PARSE_OPAQ, 0, &config)) { | ||
| if (lyd_parse_data_path(ctx, config_file, LYD_XML, LYD_PARSE_ONLY, 0, &config)) { |
Member
There was a problem hiding this comment.
Data can be validated now, so remove LYD_PARSE_ONLY and add the validation flag LYD_PARSE_PRESENT. So when you know the data are valid, some later checks can be skipped.
| /* <netconf-client> -> <searchpath> */ | ||
| opts.config_editor = strdup(lyd_get_value(match)); | ||
| } | ||
| match = NULL; |
Member
There was a problem hiding this comment.
Redundant, it does not have to be initialized for lyd_find_path(), at other places, too.
| lyd_find_path(auth_pref, "knownhost-mode", 0, &match); | ||
| if (match) { | ||
| mode = lyd_get_value(match); | ||
| if (!strcmp(mode, "accept")) { |
Member
There was a problem hiding this comment.
Seems like a good opportunity for a str2knownhosts_mode() function.
|
|
||
| /* knownhost-mode */ | ||
| if (opts.knownhosts_mode) { | ||
| if (opts.knownhosts_mode == NC_SSH_KNOWNHOSTS_ACCEPT) { |
Member
There was a problem hiding this comment.
Similarly, reverse function knownhosts_mode2str() should be used.
| module netopeer2-cli { | ||
| yang-version 1.1; | ||
| namespace "urn:cesnet:netopeer2:cli"; | ||
| prefix "cli"; |
Member
There was a problem hiding this comment.
Add common module metadata similarly to netopeer-notifications such as yang-version, organization, contact, or revision.
| } | ||
| } | ||
| } | ||
| } No newline at end of file |
bec425b to
da25e32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.