On Fri, Jan 13, 2023 at 9:31 AM Michael Richardson <m...@sandelman.ca> wrote:
> > Andy Bierman <a...@yumaworks.com> wrote: > >> Fengchong (frank) <frank.fengch...@huawei.com> wrote: > >> > Hi Michael, > >> > You can use augment-structure to extend a yang structure. > >> > >> You can't use augment-structure to extend in-place an existing yang > >> structure > >> Augment-structure produces a new structure with a new name that has > been > >> extended. > > > No. It just adds nodes to the specified parent, the same as a regular > > augment. > > I think that you are mixing up my terminology, which is probably my fault: > > from > https://mailarchive.ietf.org/arch/msg/yang-doctors/rsstdJegAaDPIhHdgXNfCwOCwgo/ > > module: example-module structure address-book: +-- address* [last first] +-- last string +-- first string +-- street? string +-- city? string +-- state? string module: example-module-aug augment-structure /exm:address-book/exm:address: +-- county? string +-- zipcode? string Result: exm:address-book exm:address exm:last exm:first exm:street exm:city exm:state exma:county exma:zipcode The SID generation works as expected. The SIDs for county and zipcode will be assigned in the example-module-aug file. There is only one /address-book/address structure in the 'exn' namespace. Only the added leafs are in the 'exma' namespace. Andy > From: Andy Bierman <a...@yumaworks.com> > > > But, I think that sx:augment-structure, if done by "B", and then done in > a > > different document by "C" would result in duplicate data nodes if "D" > were > > to > > import both. > > There is nothing in YANG that does what you want, which (I think) is to > add schema nodes to the module A namespace from module B. >
_______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod