diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:23:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 04:23:18 +0000 |
commit | 16527d165de55f2727f55b752b30d44a7e61e927 (patch) | |
tree | 0840ee6e0e109a9e85f0d80ff36f92587c6a5538 /tests/yanglint/data | |
parent | Releasing progress-linux version 2.1.30-2.1~progress7.99u1. (diff) | |
download | libyang2-16527d165de55f2727f55b752b30d44a7e61e927.tar.xz libyang2-16527d165de55f2727f55b752b30d44a7e61e927.zip |
Merging upstream version 2.1.148.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/yanglint/data')
42 files changed, 255 insertions, 0 deletions
diff --git a/tests/yanglint/data/modaction.xml b/tests/yanglint/data/modaction.xml new file mode 100644 index 0000000..37faa2d --- /dev/null +++ b/tests/yanglint/data/modaction.xml @@ -0,0 +1,8 @@ +<con xmlns="urn:yanglint:modaction"> + <ls> + <lfkey>kv</lfkey> + <act> + <lfi>some_input</lfi> + </act> + </ls> +</con> diff --git a/tests/yanglint/data/modaction_ds.xml b/tests/yanglint/data/modaction_ds.xml new file mode 100644 index 0000000..a5a1727 --- /dev/null +++ b/tests/yanglint/data/modaction_ds.xml @@ -0,0 +1,5 @@ +<con xmlns="urn:yanglint:modaction"> + <ls> + <lfkey>kv</lfkey> + </ls> +</con> diff --git a/tests/yanglint/data/modaction_nc.xml b/tests/yanglint/data/modaction_nc.xml new file mode 100644 index 0000000..a74b6bf --- /dev/null +++ b/tests/yanglint/data/modaction_nc.xml @@ -0,0 +1,13 @@ +<rpc message-id="101" + xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> + <action xmlns="urn:ietf:params:xml:ns:yang:1"> + <con xmlns="urn:yanglint:modaction"> + <ls> + <lfkey>kv</lfkey> + <act> + <lfi>some_input</lfi> + </act> + </ls> + </con> + </action> +</rpc> diff --git a/tests/yanglint/data/modaction_reply.xml b/tests/yanglint/data/modaction_reply.xml new file mode 100644 index 0000000..7d6532d --- /dev/null +++ b/tests/yanglint/data/modaction_reply.xml @@ -0,0 +1,8 @@ +<con xmlns="urn:yanglint:modaction"> + <ls> + <lfkey>kv</lfkey> + <act> + <lfo>-56</lfo> + </act> + </ls> +</con> diff --git a/tests/yanglint/data/modaction_reply_nc.xml b/tests/yanglint/data/modaction_reply_nc.xml new file mode 100644 index 0000000..f7c3b8f --- /dev/null +++ b/tests/yanglint/data/modaction_reply_nc.xml @@ -0,0 +1,4 @@ +<rpc-reply message-id="101" + xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> + <lfo xmlns="urn:yanglint:modaction">-56</lfo> +</rpc-reply> diff --git a/tests/yanglint/data/modconfig.xml b/tests/yanglint/data/modconfig.xml new file mode 100644 index 0000000..f8a03a9 --- /dev/null +++ b/tests/yanglint/data/modconfig.xml @@ -0,0 +1,4 @@ +<mcc xmlns="urn:yanglint:modconfig"> + <lft>rw</lft> + <lff>ro</lff> +</mcc> diff --git a/tests/yanglint/data/modconfig2.xml b/tests/yanglint/data/modconfig2.xml new file mode 100644 index 0000000..c96e344 --- /dev/null +++ b/tests/yanglint/data/modconfig2.xml @@ -0,0 +1,3 @@ +<mcc xmlns="urn:yanglint:modconfig"> + <lft>rw</lft> +</mcc> diff --git a/tests/yanglint/data/modconfig_ctx.xml b/tests/yanglint/data/modconfig_ctx.xml new file mode 100644 index 0000000..124989c --- /dev/null +++ b/tests/yanglint/data/modconfig_ctx.xml @@ -0,0 +1,13 @@ +<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set> + <name>main-set</name> + <module> + <name>modconfig</name> + <namespace>urn:yanglint:modconfig</namespace> + </module> + </module-set> + <content-id>1</content-id> +</yang-library> +<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set-id>1</module-set-id> +</modules-state> diff --git a/tests/yanglint/data/moddatanodes.xml b/tests/yanglint/data/moddatanodes.xml new file mode 100644 index 0000000..8ae6e97 --- /dev/null +++ b/tests/yanglint/data/moddatanodes.xml @@ -0,0 +1,17 @@ +<dnc xmlns="urn:yanglint:moddatanodes"> + <lf>x</lf> + <lfl>1</lfl> + <lfl>2</lfl> + <con> + <lt> + <kalf>ka1</kalf> + <kblf>kb1</kblf> + <vlf>v1</vlf> + </lt> + <lt> + <kalf>ka2</kalf> + <kblf>kb2</kblf> + <vlf>v2</vlf> + </lt> + </con> +</dnc> diff --git a/tests/yanglint/data/moddefault.xml b/tests/yanglint/data/moddefault.xml new file mode 100644 index 0000000..00f3a9d --- /dev/null +++ b/tests/yanglint/data/moddefault.xml @@ -0,0 +1,4 @@ +<mdc xmlns="urn:yanglint:moddefault"> + <lf>0</lf> + <di>5</di> +</mdc> diff --git a/tests/yanglint/data/modimp_type_ctx.xml b/tests/yanglint/data/modimp_type_ctx.xml new file mode 100644 index 0000000..e6d158a --- /dev/null +++ b/tests/yanglint/data/modimp_type_ctx.xml @@ -0,0 +1,13 @@ +<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set> + <name>main-set</name> + <module> + <name>modimp-type</name> + <namespace>urn:yanglint:modimp-type</namespace> + </module> + </module-set> + <content-id>1</content-id> +</yang-library> +<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set-id>1</module-set-id> +</modules-state> diff --git a/tests/yanglint/data/modleaf.djson b/tests/yanglint/data/modleaf.djson new file mode 100644 index 0000000..25af218 --- /dev/null +++ b/tests/yanglint/data/modleaf.djson @@ -0,0 +1,3 @@ +{ + "modleaf:lfl": 7 +} diff --git a/tests/yanglint/data/modleaf.dxml b/tests/yanglint/data/modleaf.dxml new file mode 100644 index 0000000..408936a --- /dev/null +++ b/tests/yanglint/data/modleaf.dxml @@ -0,0 +1 @@ +<lfl xmlns="urn:yanglint:modleaf">7</lfl> diff --git a/tests/yanglint/data/modleaf.xml b/tests/yanglint/data/modleaf.xml new file mode 100644 index 0000000..408936a --- /dev/null +++ b/tests/yanglint/data/modleaf.xml @@ -0,0 +1 @@ +<lfl xmlns="urn:yanglint:modleaf">7</lfl> diff --git a/tests/yanglint/data/modleafref.xml b/tests/yanglint/data/modleafref.xml new file mode 100644 index 0000000..c9fb147 --- /dev/null +++ b/tests/yanglint/data/modleafref.xml @@ -0,0 +1,2 @@ +<lfl xmlns="urn:yanglint:modleaf">7</lfl> +<lfr xmlns="urn:yanglint:modleafref">7</lfr> diff --git a/tests/yanglint/data/modleafref2.xml b/tests/yanglint/data/modleafref2.xml new file mode 100644 index 0000000..3946daf --- /dev/null +++ b/tests/yanglint/data/modleafref2.xml @@ -0,0 +1,2 @@ +<lfl xmlns="urn:yanglint:modleaf">7</lfl> +<lfr xmlns="urn:yanglint:modleafref">10</lfr> diff --git a/tests/yanglint/data/modmandatory.xml b/tests/yanglint/data/modmandatory.xml new file mode 100644 index 0000000..108cb2a --- /dev/null +++ b/tests/yanglint/data/modmandatory.xml @@ -0,0 +1,3 @@ +<mmc xmlns="urn:yanglint:modmandatory"> + <lft>9</lft> +</mmc> diff --git a/tests/yanglint/data/modmandatory_invalid.xml b/tests/yanglint/data/modmandatory_invalid.xml new file mode 100644 index 0000000..de71895 --- /dev/null +++ b/tests/yanglint/data/modmandatory_invalid.xml @@ -0,0 +1,3 @@ +<mmc xmlns="urn:yanglint:modmandatory"> + <lff>9</lff> +</mmc> diff --git a/tests/yanglint/data/modmerge.xml b/tests/yanglint/data/modmerge.xml new file mode 100644 index 0000000..b52eff5 --- /dev/null +++ b/tests/yanglint/data/modmerge.xml @@ -0,0 +1,4 @@ +<mmc xmlns="urn:yanglint:modmerge"> + <en>one</en> + <lm>4</lm> +</mmc> diff --git a/tests/yanglint/data/modmerge2.xml b/tests/yanglint/data/modmerge2.xml new file mode 100644 index 0000000..e7f17c4 --- /dev/null +++ b/tests/yanglint/data/modmerge2.xml @@ -0,0 +1,3 @@ +<mmc xmlns="urn:yanglint:modmerge"> + <en>zero</en> +</mmc> diff --git a/tests/yanglint/data/modmerge3.xml b/tests/yanglint/data/modmerge3.xml new file mode 100644 index 0000000..6ef857e --- /dev/null +++ b/tests/yanglint/data/modmerge3.xml @@ -0,0 +1,3 @@ +<mmc xmlns="urn:yanglint:modmerge"> + <lf>str</lf> +</mmc> diff --git a/tests/yanglint/data/modnotif.xml b/tests/yanglint/data/modnotif.xml new file mode 100644 index 0000000..81cab21 --- /dev/null +++ b/tests/yanglint/data/modnotif.xml @@ -0,0 +1,5 @@ +<con xmlns="urn:yanglint:modnotif"> + <nfn> + <lf>nested</lf> + </nfn> +</con> diff --git a/tests/yanglint/data/modnotif2.xml b/tests/yanglint/data/modnotif2.xml new file mode 100644 index 0000000..fc75b57 --- /dev/null +++ b/tests/yanglint/data/modnotif2.xml @@ -0,0 +1,3 @@ +<nfg xmlns="urn:yanglint:modnotif"> + <lf>top</lf> +</nfg> diff --git a/tests/yanglint/data/modnotif2_nc.xml b/tests/yanglint/data/modnotif2_nc.xml new file mode 100644 index 0000000..c87cfa0 --- /dev/null +++ b/tests/yanglint/data/modnotif2_nc.xml @@ -0,0 +1,6 @@ +<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> + <eventTime>2010-12-06T08:00:01Z</eventTime> + <nfg xmlns="urn:yanglint:modnotif"> + <lf>top</lf> + </nfg> +</notification> diff --git a/tests/yanglint/data/modnotif_ds.xml b/tests/yanglint/data/modnotif_ds.xml new file mode 100644 index 0000000..efd835b --- /dev/null +++ b/tests/yanglint/data/modnotif_ds.xml @@ -0,0 +1 @@ +<con xmlns="urn:yanglint:modnotif"></con> diff --git a/tests/yanglint/data/modnotif_nc.xml b/tests/yanglint/data/modnotif_nc.xml new file mode 100644 index 0000000..39a3440 --- /dev/null +++ b/tests/yanglint/data/modnotif_nc.xml @@ -0,0 +1,8 @@ +<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> + <eventTime>2010-12-06T08:00:01Z</eventTime> + <con xmlns="urn:yanglint:modnotif"> + <nfn> + <lf>nested</lf> + </nfn> + </con> +</notification> diff --git a/tests/yanglint/data/modoper_leafref_action.xml b/tests/yanglint/data/modoper_leafref_action.xml new file mode 100644 index 0000000..7ccf29f --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_action.xml @@ -0,0 +1,8 @@ +<cond xmlns="urn:yanglint:modoper-leafref"> + <list> + <klf>key_val</klf> + <act> + <lfi>rw</lfi> + </act> + </list> +</cond> diff --git a/tests/yanglint/data/modoper_leafref_action_reply.xml b/tests/yanglint/data/modoper_leafref_action_reply.xml new file mode 100644 index 0000000..39ec672 --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_action_reply.xml @@ -0,0 +1,8 @@ +<cond xmlns="urn:yanglint:modoper-leafref"> + <list> + <klf>key_val</klf> + <act> + <lfo>rw</lfo> + </act> + </list> +</cond> diff --git a/tests/yanglint/data/modoper_leafref_ds.xml b/tests/yanglint/data/modoper_leafref_ds.xml new file mode 100644 index 0000000..f934b9b --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_ds.xml @@ -0,0 +1,9 @@ +<mcc xmlns="urn:yanglint:modconfig"> + <lft>rw</lft> + <lff>ro</lff> +</mcc> +<cond xmlns="urn:yanglint:modoper-leafref"> + <list> + <klf>key_val</klf> + </list> +</cond> diff --git a/tests/yanglint/data/modoper_leafref_notif.xml b/tests/yanglint/data/modoper_leafref_notif.xml new file mode 100644 index 0000000..2c56b67 --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_notif.xml @@ -0,0 +1,3 @@ +<notifg xmlns="urn:yanglint:modoper-leafref"> + <lfr>rw</lfr> +</notifg> diff --git a/tests/yanglint/data/modoper_leafref_notif2.xml b/tests/yanglint/data/modoper_leafref_notif2.xml new file mode 100644 index 0000000..466697c --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_notif2.xml @@ -0,0 +1,8 @@ +<cond xmlns="urn:yanglint:modoper-leafref"> + <list> + <klf>key_val</klf> + <notif> + <lfn>rw</lfn> + </notif> + </list> +</cond> diff --git a/tests/yanglint/data/modoper_leafref_notif_err.xml b/tests/yanglint/data/modoper_leafref_notif_err.xml new file mode 100644 index 0000000..1622ded --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_notif_err.xml @@ -0,0 +1,7 @@ +<mcc xmlns="urn:yanglint:modconfig"> + <lft>rw</lft> + <lff>ro</lff> +</mcc> +<notifg xmlns="urn:yanglint:modoper-leafref"> + <lf>rw</lf> +</notifg> diff --git a/tests/yanglint/data/modoper_leafref_rpc.xml b/tests/yanglint/data/modoper_leafref_rpc.xml new file mode 100644 index 0000000..b294544 --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_rpc.xml @@ -0,0 +1,3 @@ +<rpcg xmlns="urn:yanglint:modoper-leafref"> + <lfi>rw</lfi> +</rpcg> diff --git a/tests/yanglint/data/modoper_leafref_rpc_reply.xml b/tests/yanglint/data/modoper_leafref_rpc_reply.xml new file mode 100644 index 0000000..e8f7af3 --- /dev/null +++ b/tests/yanglint/data/modoper_leafref_rpc_reply.xml @@ -0,0 +1,5 @@ +<rpcg xmlns="urn:yanglint:modoper-leafref"> + <cono> + <lfo>rw</lfo> + </cono> +</rpcg> diff --git a/tests/yanglint/data/modrpc.xml b/tests/yanglint/data/modrpc.xml new file mode 100644 index 0000000..a4f924d --- /dev/null +++ b/tests/yanglint/data/modrpc.xml @@ -0,0 +1,3 @@ +<rpc xmlns="urn:yanglint:modrpc"> + <lfi>some_input</lfi> +</rpc> diff --git a/tests/yanglint/data/modrpc_nc.xml b/tests/yanglint/data/modrpc_nc.xml new file mode 100644 index 0000000..78d3149 --- /dev/null +++ b/tests/yanglint/data/modrpc_nc.xml @@ -0,0 +1,6 @@ +<rpc message-id="101" + xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> + <rpc xmlns="urn:yanglint:modrpc"> + <lfi>some_input</lfi> + </rpc> +</rpc> diff --git a/tests/yanglint/data/modrpc_reply.xml b/tests/yanglint/data/modrpc_reply.xml new file mode 100644 index 0000000..632971c --- /dev/null +++ b/tests/yanglint/data/modrpc_reply.xml @@ -0,0 +1,5 @@ +<rpc xmlns="urn:yanglint:modrpc"> + <con> + <lfo>-56</lfo> + </con> +</rpc> diff --git a/tests/yanglint/data/modrpc_reply_nc.xml b/tests/yanglint/data/modrpc_reply_nc.xml new file mode 100644 index 0000000..da2a01c --- /dev/null +++ b/tests/yanglint/data/modrpc_reply_nc.xml @@ -0,0 +1,6 @@ +<rpc-reply message-id="101" + xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> + <con xmlns="urn:yanglint:modrpc"> + <lfo>-56</lfo> + </con> +</rpc-reply> diff --git a/tests/yanglint/data/modsm.xml b/tests/yanglint/data/modsm.xml new file mode 100644 index 0000000..bb0793c --- /dev/null +++ b/tests/yanglint/data/modsm.xml @@ -0,0 +1,3 @@ +<root xmlns="urn:yanglint:modsm"> + <lfl xmlns="urn:yanglint:modleaf">7</lfl> +</root> diff --git a/tests/yanglint/data/modsm2.xml b/tests/yanglint/data/modsm2.xml new file mode 100644 index 0000000..ff6f103 --- /dev/null +++ b/tests/yanglint/data/modsm2.xml @@ -0,0 +1,4 @@ +<root xmlns="urn:yanglint:modsm"> + <lfl xmlns="urn:yanglint:modleaf">7</lfl> + <alf xmlns="urn:yanglint:modsm-augment">str</alf> +</root> diff --git a/tests/yanglint/data/modsm_ctx_ext.xml b/tests/yanglint/data/modsm_ctx_ext.xml new file mode 100644 index 0000000..e80141a --- /dev/null +++ b/tests/yanglint/data/modsm_ctx_ext.xml @@ -0,0 +1,20 @@ +<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set> + <name>test-set</name> + <module> + <name>modleaf</name> + <namespace>urn:yanglint:modleaf</namespace> + </module> + </module-set> + <content-id>1</content-id> +</yang-library> +<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set-id>1</module-set-id> +</modules-state> +<schema-mounts xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"> + <mount-point> + <module>modsm</module> + <label>root</label> + <inline></inline> + </mount-point> +</schema-mounts> diff --git a/tests/yanglint/data/modsm_ctx_main.xml b/tests/yanglint/data/modsm_ctx_main.xml new file mode 100644 index 0000000..5405d4d --- /dev/null +++ b/tests/yanglint/data/modsm_ctx_main.xml @@ -0,0 +1,17 @@ +<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set> + <name>main-set</name> + <module> + <name>modsm</name> + <namespace>urn:yanglint:modsm</namespace> + </module> + <module> + <name>modsm-augment</name> + <namespace>urn:yanglint:modsm-augment</namespace> + </module> + </module-set> + <content-id>1</content-id> +</yang-library> +<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"> + <module-set-id>1</module-set-id> +</modules-state> |