Blob Blame History Raw
module mod4 {

    prefix abc;
    namespace "urn:cesnet:mod4";

    typedef name {
        type string;
        description "new type without restrictions";
    }

    typedef name2 {
        type name1 {
            pattern '[A-Ca-z]+';
            length "1..3";
        }
        default "AcB";
    }

    typedef cislo {
        type int16 {
            range "1..100 | 200..512";
        }
        default "255";
    }

    typedef cislo2 {
        type cislo {
            range "220 .. 254";
        }
    }

    typedef name1 {
        type name {
            pattern '[a-zA-Z]+';
        }
        default 'XaBc';
    }

    container login {
        leaf login {
            type name {
                length "1..255";
            }
            default "abc";
        }

        leaf hostname {
            type name1;
        }
    }

    leaf cc {
        type cislo;
    }
}