ConfD User Community

How to augment list from one module to another and add leafs

Suppose I have two modules, I would like to extend one list with new leafs.

module A {
    list deviceList {
        key name;
        leaf name{

        }
        leaf hostname{

        }
    }
}

and I would like to augment it to another leaf

module B {
    list generalInfo{
        key customerName;
        leaf customerName{
            type string;
        }
        augment moduleA:deviceList {
            leaf ipAddress{
                
            }
        }
}

I have done it using grouping and container and list inside but this completely changes our existing structure, I would like to ommit container and grouping if thats possible.

Question has been answered here https://stackoverflow.com/a/64471437/6504337