Define custom simpletype

How to define a new simpletype? I need to define a custom simpletype that I want to use in my confd.cli file. Right now I am limited to what is already defined

In clispec file you can use also any type defined in a YANG data model. So if you need new type, create one in YANG, using typedef and then use it in clispec.

E.g.:

YANG:

   namespace "http://tail-f.com/ns/example";
...
   typedef iface-name {
        type string {
            length "1..255";
        }
        description "WORD (1-255)";
    }

CLISPEC

<simpleType
          namespace="http://tail-f.com/ns/example"
          name="iface-name">
...
</simpleType>
1 Like