Conversation
Unfortunately, sysrepo considers it an error to load a module that is already loaded, ruling out using `sr_install_modules`. Therefore, provide `require_modules` instead, which ensures that a given set of modules are loaded, or loads them otherwise.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Prevent // in new srx_require_module() when composing module PATH. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
It started its life as a copy of systemf() anyway, time to clean up. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Note: new API, srx_get_bool() returns -1 on error, leaving 0 and 1 as false and true, respectively. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
All value functions, except the new srx_enabled(), now return clear error indication, with the value as a separate argument. The srx_enabled() predicate function is for cases where the default value is disabled and code checks enable a subsystem or flag. I.e., when an error can safely be returned as 'false'. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Some users still prefer the old netmask style to set up an interface. This patch enables the corresponding model feature and checks for a netmask only if prefix-length is unset. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Calling sr_get_time() for an xpath that has no data causes sysrepo to always log the access as an error. With sr_get_items() it is left to the callee to determine if the missing data should cause an error. This patch is a refactor that silences the syslog message and also fixes one or tow memory leaks. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
We now have our own srx_set_item() that hides a lot of the complexity. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
troglobit
approved these changes
Apr 16, 2023
Contributor
There was a problem hiding this comment.
Your part looks great! I've extended upon it a bit, and in retrospect, that's not what one should do. GitHub gets confused about who's who.
Maybe you can have a look at it @wkz and we can merge it together in the morning? Next step after this is to add libnl support to get ifflags, etc. as well as ethtool to fetch counters.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Instead of having to rely on the kernel command line, we convert all the kernel functionality in question into modules and rely on the auto-load feature in the kernel and modprobe to add options at load time. The fb_tunnels setting is a net core setting, for that we use sysctl. This commit also syncs the kernel config between our two main archs, disabling DRM and SOUND for the Amd64 build as a spin-off. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The per-interface and per-af setting in the ietf-ip yang module allow the user to enable a more granular forwarding between interfaces, which is disabled by default. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
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.