Hi,

Vojtech Vilimek <[email protected]> writes:

> Dear netmod WG,
>
> Let's say I am implementing a server, the server consists of two
> components from different vendors, first vendor has module A,
> second has module B. Both of them depend on a module D but
> vendor with module A depends on newer revision of D.
>
>    A -> D@2
>    B -> D@1
>
> (The module D is import-only, otherwise this does not work.)
>
> Is is possible to decode this information from a YANG Library?
> Is following YANG Library valid, does it describe this situation?

It is valid, multiple revisions of the same import-only module may coexist in a 
module set. That's why the "import-only-module" list has name & revision as its 
key.

Lada

>
> {
>    "ietf-yang-library:yang-library": {
>      "module-set": [
>        {
>       "name": "unioned",
>       "module": [
>         {
>           "name": "A",
>           "namespace": "http://example.com/a";
>         },
>         {
>           "name": "B",
>           "namespace": "http://example.com/b";
>         }
>       ],
>       "import-only-module": [
>         {
>           "name": "D",
>           "namespace": "http://example.com/d";,
>           "revision": "2001-01-01"
>         },
>         {
>           "name": "D",
>           "namespace": "http://example.com/d";,
>           "revision": "2002-02-02"
>         }
>       ]
>        }
>      ],
>      "schema": [
>        {
>       "name": "oper-schema",
>       "module-set": ["unioned"]
>        }
>      ],
>      "datastore": [
>        "name": "ietf-datastores:operational",
>        "schema": "oper-schema"
>      ]
>    }
> }
>
>
> Is alternative YANG Library solving these issues?
>
> {
>    "ietf-yang-library:yang-library": {
>      "module-set": [
>        {
>       "name": "mod-set-A",
>       "module": [
>         {
>           "name": "A",
>           "namespace": "http://example.com/a";
>         }
>       ],
>       "import-only-module": [
>         {
>           "name": "D",
>           "namespace": "http://example.com/d";,
>           "revision": "2002-02-02"
>         }
>       ]
>        },
>        {
>       "name": "mod-set-B",
>       "module": [
>         {
>           "name": "B",
>           "namespace": "http://example.com/b";
>         }
>       ],
>       "import-only-module": [
>         {
>           "name": "D",
>           "namespace": "http://example.com/d";,
>           "revision": "2001-01-01"
>         }
>       ]
>        }
>      ],
>      "schema": [
>        {
>       "name": "oper-schema",
>       "module-set": ["mod-set-A", "mod-set-B"]
>        }
>      ],
>      "datastore": [
>        "name": "ietf-datastores:operational",
>        "schema": "oper-schema"
>      ]
>    }
> }
>
>
> Have a nice day!
>
> Best regards,
> Vojtech Vilimek
>
> _______________________________________________
> netmod mailing list -- [email protected]
> To unsubscribe send an email to [email protected]

-- 
Ladislav Lhotka <[email protected]>
PGP Key ID: 0xB8F92B08A9F76C67

_______________________________________________
netmod mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to