+ grouping constraint-instance {\r
+ description\r
+ "Specific a instance of constraint whose metadata has been filled in.";\r
+\r
+ list constraint-segment {\r
+ description\r
+ "The segment entities will be composed into a whole constraint entity.\r
+ Each segment will be a sub expression of the constraint.";\r
+\r
+ key "constraint-segment-id";\r
+ leaf constraint-segment-id {\r
+ description\r
+ "A unique ID for a constraint segment.";\r
+ type nemo-common:constraint-segment-id;\r
+ mandatory true;\r
+ }\r
+\r
+ leaf constraint-parameter-name {\r
+ description\r
+ "A name for a constraint parameter.";\r
+ type nemo-common:constraint-parameter-name;\r
+ }\r
+\r
+ leaf constraint-parameter-match-pattern {\r
+ description\r
+ "The operator for the constraint parameter and it's target value.";\r
+ type enumeration {\r
+ enum less-than;\r
+ enum not-less-than;\r
+ enum equal;\r
+ enum not-equal;\r
+ enum greater-than;\r
+ enum not-greater-than;\r
+ enum between;\r
+ enum periodical;\r
+ }\r
+ }\r
+\r
+ container constraint-parameter-target-value {\r
+ description\r
+ "The target value of constraint parameter.";\r
+\r
+ leaf string-value {\r
+ type string;\r
+ }\r
+\r
+ leaf int-value {\r
+ type int64;\r
+ }\r
+\r
+ container range-value {\r
+ leaf min {\r
+ type int64;\r
+ mandatory true;\r
+ }\r
+\r
+ leaf max {\r
+ type int64;\r
+ mandatory true;\r
+ }\r
+\r
+ }\r
+ }\r
+\r
+ leaf precursor-relation-operator {\r
+ description\r
+ "The logical operator between current segment and the next segment.";\r
+ type enumeration {\r
+ enum none;\r
+ enum and;\r
+ enum or;\r
+ enum not;\r
+ }\r
+ }\r
+\r
+ leaf order {\r
+ description\r
+ "The order of the segment in the whole constraint entity.";\r
+ type uint32;\r
+ }\r
+ }\r
+ }\r
+\r