From 4496913a8651b919a80995944614aae40685a3a7 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 9 Jun 2021 10:54:38 +0200 Subject: [PATCH] Add yang-ext:mount extension We are gratiously refering to yang-ext:mount all over the place, without the construct being actually defined. Add a proper definition so that our data/schema processing can be correctly hooked into it. JIRA: MDSAL-665 Change-Id: Ib6076060d693955be236d548e07fca1c88016b5f Signed-off-by: Robert Varga --- model/yang-ext/src/main/yang/yang-ext.yang | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/model/yang-ext/src/main/yang/yang-ext.yang b/model/yang-ext/src/main/yang/yang-ext.yang index 2d89e616b5..f53148adc8 100644 --- a/model/yang-ext/src/main/yang/yang-ext.yang +++ b/model/yang-ext/src/main/yang/yang-ext.yang @@ -42,6 +42,39 @@ module yang-ext { argument "identifier"; } + // Mount point marker + + extension mount { + description + "YANG language extension which marks a place where a semantic mount + point can be present. This extension can only be used in a container or + a list statement, for example: + + module foo { + container foo { + leaf bar { + type string; + } + + ext:mount; + } + } + + In this example, container foo can contain a local leaf bar and some + mounted data. From addressing perspective, the extension use acts as + a container with yang-ext's namespace, i.e. it looks as though as this + (yang-ext) module contained the following construct: + + import foo { prefix foo; } + + augment /foo:foo { + container mount; + } + + From data lifecycle perspective, this container should never be + automatically included in the datastore content for 'container foo', unless + specifically explicitly requested."; + } // Context-aware RPCs -- 2.36.6