Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgmtd: add support for native 'edit' operation #15468

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

idryzhov
Copy link
Contributor

@idryzhov idryzhov commented Mar 3, 2024

This operation basically implements support for RESTCONF operations. It receives an xpath and a data tree in JSON/XML format, instead of a list of (xpath, value) tuples as required by the current protobuf interface.

@frrbot frrbot bot added the mgmt FRR Management Infra label Mar 3, 2024
@idryzhov idryzhov mentioned this pull request Mar 3, 2024
@idryzhov idryzhov force-pushed the mgmt-native-edit branch 2 times, most recently from fc45f09 to 5ce038c Compare March 7, 2024 12:54
@github-actions github-actions bot added the rebase PR needs rebase label Mar 7, 2024
@frrbot frrbot bot added the tests Topotests, make check, etc label Mar 12, 2024
@github-actions github-actions bot added size/XXL and removed size/XL labels Mar 12, 2024
@idryzhov idryzhov force-pushed the mgmt-native-edit branch 2 times, most recently from 387d0d0 to 9048226 Compare March 13, 2024 13:36
This operation basically implements support for RESTCONF operations. It
receives an xpath and a data tree in JSON/XML format, instead of a list
of (xpath, value) tuples as required by the current protobuf interface.

Signed-off-by: Igor Ryzhov <[email protected]>
@choppsv1 choppsv1 self-requested a review April 21, 2024 23:13
lyd_insert_sibling(candidate->dnode,
existing,
&candidate->dnode);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is somewhat tricky to understand at first; maybe adding a comment will improve the clarity? Also a small format change...

			if (root)
				candidate->dnode = existing;
			else if (ex_parent)
				lyd_insert_child(ex_parent, existing);
			else
				/*
				 * replaced a root level node, this makes sure
				 * candidate->dnode linkage is updated
				 */
				lyd_insert_sibling(candidate->dnode, existing,
						   &candidate->dnode);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider making this change after rebasing #15594

@choppsv1 choppsv1 merged commit 7f7bcb1 into FRRouting:master Apr 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master mgmt FRR Management Infra rebase PR needs rebase size/XXL tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants