You can use tailf:display-when to control what leaf elements to display next based on the value of module. Following is a partial example of your command requirements:
leaf counter {
type uint32;
}
leaf pyld-idle-bytes {
type uint32;
tailf:display-when "../module = 'gmac-downstream'";
}
leaf fec-corrupted-cw {
type uint32;
tailf:display-when "../module = 'gmac-upstream'";
}
leaf host-local-omci-rx {
type uint32;
tailf:display-when "../module = 'host-local-counter'";
}
leaf ne-port-id-octets {
type uint32;
tailf:display-when "../module = 'packet-processor-downstream'";
}
leaf fec-corrupted-cw {
type uint32;
tailf:display-when “…/module = ‘gmac-upstream’”;
}
If “fec-corrupted-cw” is the last argument then it was fine but still i have to get
parameter-type, onu-id, parameter-index then value for only parameter-index.
i don’t need any value for fec-corrupted-cw, parameter-type, onu-id.
By showing just the CLI command, it isn’t clear what all the data types are for each of the arguments. It makes it difficult to come up with any suggestions.
Again, without knowing the data types of the rest of your arguments, you can also consider using the custom show output feature as described in Chapter 16.21.6 & Chapter 16.21.7 in the ConfD User Guide as necessary.