Open DDavisZhou opened 1 month ago
To parse mounted data, you need to provide operational data of ietf-yang-schema-mount
in sysrepo. You need to understand all the details from the RFC, which is arguably not simple at all but that is no fault of mine. In short, you can use pull oper data (look at examples/oper_data_pull_example
) to provide /ietf-yang-schema-mount:schema-mounts/mount-point
. You can also look at the test that performs this.
Thank you very much for your response.
What do you mean is that
(1) After installing the _3gpp-common-subnetwork
modules and before importing the default configuration of _3gpp-common-subnetwork
, I need to ensure that there is operational data of ietf-yang-schema-mount
in sysrepo;
(2) I can generate it by examples/oper_data_pull_example
;
?
Thank you again for your reply.
I still feel a bit confused about how to generate operational data of 'ietf-yang-schema-mount
' in sysrepo. Should I prepare an ietf-yang-schema-mount.xml file as follows and apply it to the operational data store using a command, or are there other methods I should consider?
ietf-yang-schema-mount.xml:
<schema-mounts xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount">
<namespace>
<prefix>subnet3gpp</prefix>
<uri>urn:3gpp:sa5:_3gpp-common-subnetwork</uri>
</namespace>
<mount-point>
<module>_3gpp-common-subnetwork</module>
<label>children-of-SubNetwork</label>
<config>true</config>
<inline></inline>
<shared-schema>
<parent-reference>/subnet3gpp:SubNetwork/ExternalGNBCUCPFunction</parent-reference>
</shared-schema>
</mount-point>
</schema-mounts>
Additionally, before upgrading to the latest version, I used the following versions: libyang v2.0.7 sysrepo v2.0.1 libnetconf2 v2.0.1 Netopeer2 v2.0.0 In that process(install 3gpp-common-subnetwork.yang and then import configuration), I did not encounter similar issues. Could this be related to the upgrades made to the versions?
I still feel a bit confused about how to generate operational data of 'ietf-yang-schema-mount' in sysrepo.
That is why I have referenced the documentation, I am not going to explain in detail how to populate operational data when it is quite well explained, I think, in the text.
Could this be related to the upgrades made to the versions?
Yes because I do not think the version you have used supported schema-mount
at all so the relevant YANG parts were simply silently skipped. I understand that you are confused but these issues are here to provide help with our projects, not with understanding YANG RFCs.
That is why I have referenced the documentation, I am not going to explain in detail how to populate operational data when it is quite well explained, I think, in the text.
Thank you, I will further study the document you referenced.
By the way, may I ask if there is a switch to prevent parsing mounted data if only the yang-schema-mount
node is defined in the yang file, but the relevant point is not used in the actual configuration?
I believe this is how it works, the data should not be requested unless they are required. But they are not needed only when parsing data with a mount point. I could tell you more only if you provided all the YANGs and data files so I can reproduce it and learn the details of your use-case.
I could tell you more only if you provided all the YANGs and data files so I can reproduce it and learn the details of your use-case.
Hello, I have prepared the _3gpp_common-subnetwork.xml file that I installed when I encountered a problem, and it is here. In fact, I have already installed the required yang module and imported other XML files; However, when importing the _3gpp_common-subnetwork.xml file, the following error was encountered:
[INF] Connection 194 created.
[ERR] No "ietf-yang-schema-mount" operational data set needed for parsing mounted data.
libyang error: Ext plugin "ly2 schema mount v1": Callback for getting ext data failed.
sysrepocfg error: Data parsing failed
[INF] Connection 194 destroyed.
Workflow: Install yang modules; Enable related features; Install configuration XML file;
I would greatly appreciate it if you could provide more information to help me understand and resolve the issues I am encountering.
Firstly, I am sorry but I must repeat what I said before, I will not be explaining how Schema Mount works in detail because to explain it is the purpose of its RFC. Also, you will have to understand it to use it, anyway, despite even YANG veterans struggling with it. What you need to do exactly is actually mentioned in the docs and it is what I have told you before so I am not sure what else to do.
Hello, after upgrading to the specified version:
I encountered the following issue when installing 3gpp-common-subnetwork.yang:
I referred to "https://github.com/CESNET/netopeer2/issues/1651" to resolve this issue successfully (by using the current libyang development version).
However, when importing the configuration from the XML file, I encountered the following error again:
Following YANG modules have already been installed or imported successfully.
Could you please advise on what actions I can take to resolve this issue?