Skip to content

Fix identityref namespace binding in config-path-info XML#649

Merged
olofhagsand merged 1 commit intoclicon:masterfrom
yamontv:fix/yang_identityref
Jan 28, 2026
Merged

Fix identityref namespace binding in config-path-info XML#649
olofhagsand merged 1 commit intoclicon:masterfrom
yamontv:fix/yang_identityref

Conversation

@yamontv
Copy link
Contributor

@yamontv yamontv commented Jan 25, 2026

Bind YANG on CLI edit-config XML before sending RPC and add missing xmlns for identityref values. Extend identityref namespace helper to cover leaf-lists and allow yspec fallback.

@olofhagsand
Copy link
Member

I am unsure, did you do this patch after the new series of commits that move yang-dependent functionality from the cli client to the backend I did friday, see eg 046886a ?

With these commits, the YANG is not present in the client and the identityref adds should be done by the backend.
With those I am not sure this bind + apply is needed in cli_dbxml(), instead the call is in the previous rpc in from_client_config_path_info().

However, I see the patch in identityref_add_ns() is needed to run the new openconfig test case.

If I am right then with my new commits on friday, it should be enough with the identityref_add_ns patch and not the cli_dbxml patch to run your openconfig testcase.

Does that make sense?

@yamontv
Copy link
Contributor Author

yamontv commented Jan 27, 2026

I just retested on the latest master my test case fails without my changes

@yamontv
Copy link
Contributor Author

yamontv commented Jan 27, 2026

The patch you referenced doesn’t touch the edit‑config payload, so the prefix is still missing when validation runs. That’s why the CLI‑side bind+apply is effective (and also why a backend‑side fix must be placed in the edit‑config processing path, not in config‑path‑info). Do you strongly prefer backend-only fix?

@yamontv yamontv force-pushed the fix/yang_identityref branch 2 times, most recently from 0fb4f7a to 287be96 Compare January 27, 2026 14:42
@yamontv yamontv changed the title Fix cli identityref namespace binding in edit-config Fix identityref namespace binding in config-path-info XML Jan 27, 2026
@yamontv
Copy link
Contributor Author

yamontv commented Jan 27, 2026

Binding YANG on CLI indeed is not needed.

@olofhagsand
Copy link
Member

Can you please make the test executable?
Also, I think a validate would make the test more complete (before) commit, so it exercises the identityref validation code
Further, it would be nice to have a RESTCONF test as well

Ensure identityref values with prefixed QNames get the correct xmlns binding
@yamontv yamontv force-pushed the fix/yang_identityref branch from 287be96 to 335a18f Compare January 28, 2026 11:09
@yamontv
Copy link
Contributor Author

yamontv commented Jan 28, 2026

Sorry, my bad again with +x. Added validate and RESTCONF tests

@olofhagsand olofhagsand merged commit 0619555 into clicon:master Jan 28, 2026
6 checks passed
@yamontv yamontv deleted the fix/yang_identityref branch January 28, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants