Creating a list of grouping from an existing module in yang

asked 2014-12-21 23:08:22 -0700

Srijit Nair gravatar image

Hi,

I am trying to reuse the ipv4-packet-fields from L2switch. I want to create a list of such objects and save to my container. I am trying this

container tcp{
      presence
          "Indicates the service is available";
      list tcpinfo-list{
          leaf-list tcpinfo{
              uses ipv4pack:ipv4-packet-fields;
          }
      }
  }

I am trying to create a list of ipv4 packet fields, but yang throws an error

     Failed to parse yang data: mismatched input 'uses' expecting
> {'}', 'when', 'units', 'type',
> 'status', 'reference', 'ordered-by',
> 'must', 'min-elements',
> 'max-elements', 'if-feature',
> 'description', 'config', IDENTIFIER}:
> InputMismatchException -> [Help 1]

Please let me know how I can achieve this.

Thanking you, Srijit

edit retag flag offensive close merge delete