X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-docgen%2Fsrc%2Ftest%2Fresources%2Fyang%2Fstring-types.yang;fp=restconf%2Fsal-rest-docgen%2Fsrc%2Ftest%2Fresources%2Fyang%2Fstring-types.yang;h=0000000000000000000000000000000000000000;hb=efa78a3a92d6d8162d0524467eacf2a0356396d7;hp=3283b1d6fd944e8ddb6be0669cc88c3a03ce8381;hpb=6b9d2cd4cea8044bfc83ce62ef93826a3430388a;p=netconf.git diff --git a/restconf/sal-rest-docgen/src/test/resources/yang/string-types.yang b/restconf/sal-rest-docgen/src/test/resources/yang/string-types.yang deleted file mode 100644 index 3283b1d6fd..0000000000 --- a/restconf/sal-rest-docgen/src/test/resources/yang/string-types.yang +++ /dev/null @@ -1,94 +0,0 @@ -module string-types { - yang-version 1; - namespace "urn:ietf:params:xml:ns:yang:test:string:types"; - prefix "str-tp"; - - typedef DisplayString { - type string { - length "0..255"; - pattern "((\p{IsBasicLatin}{0,255}))"; - } - } - - typedef PhysAddress { - type string { - pattern "((([0-9A-Fa-f]{2}){1}):)"; - } - } - - typedef MacAddress { - type string { - length "6"; - pattern "((([0-9A-Fa-f]{2}){1}):)"; - } - } - - typedef DateAndTime { - type string { - length "8|11"; - pattern "((0|[1-9](([0-9]){0,4}))-(0|[1-9](([0-9]){0,2}))-(0|[1-9](([0-9]){0,2})),(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]){0,2})).(0|[1-9](([0-9]){0,2})),((\p{IsBasicLatin}{1})(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]){0,2})))?)"; - } - } - - typedef Arrows { - type string { - length "10"; - pattern "((\p{IsArrows}{5,255}))"; - } - } - - typedef Thai { - type string { - length "10"; - pattern "((\p{IsThai}{8,255}))"; - } - } - - typedef BraillePatterns { - type string { - length "10"; - pattern "((\p{IsBraillePatterns}{4,255}))"; - } - } - - typedef MathematicalOperators { - type string { - length "10"; - pattern "((\p{IsMathematicalOperators}{4,255}))"; - } - } - - container test { - description "Tests various combinations of regex expressions found in snmp yang models, - which are causing problems because of isBasicLatin expression. - - According to https://unicode.org/charts/PDF/U0000.pdf basic latin characters are in range - 0x00-0x7F ([\x00-\xFF] or [\u0000-\u00FF]). This means it should be safe to replace isBasicLatin - in regex expressions for characters in this range."; - - leaf display-string { - type DisplayString; - } - leaf phys-address { - type PhysAddress; - } - leaf mac-address { - type MacAddress; - } - leaf date-and-time { - type DateAndTime; - } - leaf arrows { - type Arrows; - } - leaf thai { - type Thai; - } - leaf braille-patterns { - type BraillePatterns; - } - leaf mathematical-operators { - type MathematicalOperators; - } - } -} \ No newline at end of file