9a522942bc3bb028ebb88aafd3cae3fcbe52c580
[sdc.git] / catalog-be / src / test / resources / types / datatypes / constraintTest.json
1 {
2   "string": {
3     "derivedFrom": {
4       "name": "tosca.datatypes.Root",
5       "uniqueId": "tosca.datatypes.Root.datatype",
6       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
7       "creationTime": 1550136563278,
8       "modificationTime": 1550136563278,
9       "toscaPresentation": {}
10     },
11     "name": "string",
12     "uniqueId": "string.datatype",
13     "derivedFromName": "tosca.datatypes.Root",
14     "creationTime": 1550136564103,
15     "modificationTime": 1550136564103,
16     "toscaPresentation": {}
17   },
18   "org.openecomp.datatypes.heat.network.neutron.Subnet": {
19     "derivedFrom": {
20       "name": "tosca.datatypes.Root",
21       "uniqueId": "tosca.datatypes.Root.datatype",
22       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
23       "creationTime": 1550136563278,
24       "modificationTime": 1550136563278,
25       "toscaPresentation": {}
26     },
27     "properties": [
28       {
29         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.tenant_id",
30         "type": "string",
31         "required": false,
32         "definition": false,
33         "description": "The ID of the tenant who owns the network",
34         "password": false,
35         "name": "tenant_id",
36         "hidden": false,
37         "immutable": false,
38         "toscaPresentation": {}
39       },
40       {
41         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.enable_dhcp",
42         "type": "boolean",
43         "required": false,
44         "definition": false,
45         "defaultValue": "true",
46         "description": "Set to true if DHCP is enabled and false if DHCP is disabled",
47         "password": false,
48         "name": "enable_dhcp",
49         "hidden": false,
50         "immutable": false,
51         "toscaPresentation": {}
52       },
53       {
54         "constraints": [
55           {
56             "validValues": [
57               "dhcpv6-stateful",
58               "dhcpv6-stateless",
59               "slaac"
60             ]
61           }
62         ],
63         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.ipv6_address_mode",
64         "type": "string",
65         "required": false,
66         "definition": false,
67         "description": "IPv6 address mode",
68         "password": false,
69         "name": "ipv6_address_mode",
70         "hidden": false,
71         "immutable": false,
72         "toscaPresentation": {}
73       },
74       {
75         "constraints": [
76           {
77             "validValues": [
78               "dhcpv6-stateful",
79               "dhcpv6-stateless",
80               "slaac"
81             ]
82           }
83         ],
84         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.ipv6_ra_mode",
85         "type": "string",
86         "required": false,
87         "definition": false,
88         "description": "IPv6 RA (Router Advertisement) mode",
89         "password": false,
90         "name": "ipv6_ra_mode",
91         "hidden": false,
92         "immutable": false,
93         "toscaPresentation": {}
94       },
95       {
96         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.value_specs",
97         "type": "map",
98         "required": false,
99         "definition": false,
100         "defaultValue": "{}",
101         "description": "Extra parameters to include in the request",
102         "schema": {
103           "property": {
104             "constraints": [
105               {
106                 "validValues": [
107                   "dhcpv6-stateful",
108                   "dhcpv6-stateless",
109                   "slaac"
110                 ]
111               }
112             ],
113             "type": "string",
114             "required": true,
115             "definition": false,
116             "password": false,
117             "hidden": false,
118             "immutable": false,
119             "toscaPresentation": {}
120           },
121           "toscaPresentation": {}
122         },
123         "password": false,
124         "name": "value_specs",
125         "hidden": false,
126         "immutable": false,
127         "toscaPresentation": {}
128       },
129       {
130         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.allocation_pools",
131         "type": "list",
132         "required": false,
133         "definition": false,
134         "description": "The start and end addresses for the allocation pools",
135         "schema": {
136           "property": {
137             "type": "string",
138             "required": true,
139             "definition": false,
140             "password": false,
141             "hidden": false,
142             "immutable": false,
143             "toscaPresentation": {}
144           },
145           "toscaPresentation": {}
146         },
147         "password": false,
148         "name": "allocation_pools",
149         "hidden": false,
150         "immutable": false,
151         "toscaPresentation": {}
152       },
153       {
154         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.subnetpool",
155         "type": "string",
156         "required": false,
157         "definition": false,
158         "description": "The name or ID of the subnet pool",
159         "password": false,
160         "name": "subnetpool",
161         "hidden": false,
162         "immutable": false,
163         "toscaPresentation": {}
164       },
165       {
166         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.dns_nameservers",
167         "type": "list",
168         "required": false,
169         "definition": false,
170         "defaultValue": "[]",
171         "description": "A specified set of DNS name servers to be used",
172         "schema": {
173           "property": {
174             "type": "string",
175             "required": true,
176             "definition": false,
177             "password": false,
178             "hidden": false,
179             "immutable": false,
180             "toscaPresentation": {}
181           },
182           "toscaPresentation": {}
183         },
184         "password": false,
185         "name": "dns_nameservers",
186         "hidden": false,
187         "immutable": false,
188         "toscaPresentation": {}
189       },
190       {
191         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.host_routes",
192         "type": "list",
193         "required": false,
194         "definition": false,
195         "description": "The gateway IP address",
196         "schema": {
197           "property": {
198             "type": "org.openecomp.datatypes.heat.network.subnet.HostRoute",
199             "required": true,
200             "definition": false,
201             "password": false,
202             "hidden": false,
203             "immutable": false,
204             "toscaPresentation": {}
205           },
206           "toscaPresentation": {}
207         },
208         "password": false,
209         "name": "host_routes",
210         "hidden": false,
211         "immutable": false,
212         "toscaPresentation": {}
213       },
214       {
215         "constraints": [
216           {
217             "validValues": [
218               "4",
219               "6"
220             ]
221           }
222         ],
223         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.ip_version",
224         "type": "integer",
225         "required": false,
226         "definition": false,
227         "defaultValue": "4",
228         "description": "The gateway IP address",
229         "password": false,
230         "name": "ip_version",
231         "hidden": false,
232         "immutable": false,
233         "toscaPresentation": {}
234       },
235       {
236         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.name",
237         "type": "string",
238         "required": false,
239         "definition": false,
240         "description": "The name of the subnet",
241         "password": false,
242         "name": "name",
243         "hidden": false,
244         "immutable": false,
245         "toscaPresentation": {}
246       },
247       {
248         "constraints": [
249           {
250             "greaterOrEqual": "0"
251           },
252           {
253             "validValues": [
254               "4",
255               "6"
256             ]
257           }
258         ],
259         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.prefixlen",
260         "type": "integer",
261         "required": false,
262         "definition": false,
263         "description": "Prefix length for subnet allocation from subnet pool",
264         "password": false,
265         "name": "prefixlen",
266         "hidden": false,
267         "immutable": false,
268         "toscaPresentation": {}
269       },
270       {
271         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.cidr",
272         "type": "string",
273         "required": false,
274         "definition": false,
275         "description": "The CIDR",
276         "password": false,
277         "name": "cidr",
278         "hidden": false,
279         "immutable": false,
280         "toscaPresentation": {}
281       },
282       {
283         "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype.gateway_ip",
284         "type": "string",
285         "required": false,
286         "definition": false,
287         "description": "The gateway IP address",
288         "password": false,
289         "name": "gateway_ip",
290         "hidden": false,
291         "immutable": false,
292         "toscaPresentation": {}
293       }
294     ],
295     "name": "org.openecomp.datatypes.heat.network.neutron.Subnet",
296     "uniqueId": "org.openecomp.datatypes.heat.network.neutron.Subnet.datatype",
297     "derivedFromName": "tosca.datatypes.Root",
298     "description": "A subnet represents an IP address block that can be used for assigning IP addresses to virtual instances",
299     "creationTime": 1550136564412,
300     "modificationTime": 1550136564464,
301     "toscaPresentation": {}
302   },
303   "org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress": {
304     "derivedFrom": {
305       "name": "tosca.datatypes.Root",
306       "uniqueId": "tosca.datatypes.Root.datatype",
307       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
308       "creationTime": 1550136563278,
309       "modificationTime": 1550136563278,
310       "toscaPresentation": {}
311     },
312     "properties": [
313       {
314         "uniqueId": "org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress.datatype.mac_address",
315         "type": "list",
316         "required": false,
317         "definition": false,
318         "description": "Mac Addresses List.",
319         "schema": {
320           "property": {
321             "type": "string",
322             "required": true,
323             "definition": false,
324             "password": false,
325             "hidden": false,
326             "immutable": false,
327             "toscaPresentation": {}
328           },
329           "toscaPresentation": {}
330         },
331         "password": false,
332         "name": "mac_address",
333         "hidden": false,
334         "immutable": false,
335         "toscaPresentation": {}
336       }
337     ],
338     "name": "org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress",
339     "uniqueId": "org.openecomp.datatypes.heat.contrailV2.virtual.machine.subInterface.MacAddress.datatype",
340     "derivedFromName": "tosca.datatypes.Root",
341     "description": "Virtual Machine Sub Interface Mac Address.",
342     "creationTime": 1550136565026,
343     "modificationTime": 1550136565030,
344     "toscaPresentation": {}
345   },
346   "org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList": {
347     "derivedFrom": {
348       "name": "tosca.datatypes.Root",
349       "uniqueId": "tosca.datatypes.Root.datatype",
350       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
351       "creationTime": 1550136563278,
352       "modificationTime": 1550136563278,
353       "toscaPresentation": {}
354     },
355     "properties": [
356       {
357         "uniqueId": "org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList.datatype.network_policy_entries_policy_rule",
358         "type": "list",
359         "required": false,
360         "definition": false,
361         "description": "Contrail network rule",
362         "schema": {
363           "property": {
364             "type": "org.openecomp.datatypes.heat.contrailV2.network.rule.Rule",
365             "required": true,
366             "definition": false,
367             "password": false,
368             "hidden": false,
369             "immutable": false,
370             "toscaPresentation": {}
371           },
372           "toscaPresentation": {}
373         },
374         "password": false,
375         "name": "network_policy_entries_policy_rule",
376         "hidden": false,
377         "immutable": false,
378         "toscaPresentation": {}
379       }
380     ],
381     "name": "org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList",
382     "uniqueId": "org.openecomp.datatypes.heat.contrailV2.network.rule.RuleList.datatype",
383     "derivedFromName": "tosca.datatypes.Root",
384     "description": "list of policy rules",
385     "creationTime": 1550136564716,
386     "modificationTime": 1550136564720,
387     "toscaPresentation": {}
388   },
389   "integer": {
390     "derivedFrom": {
391       "name": "tosca.datatypes.Root",
392       "uniqueId": "tosca.datatypes.Root.datatype",
393       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
394       "creationTime": 1550136563278,
395       "modificationTime": 1550136563278,
396       "toscaPresentation": {}
397     },
398     "name": "integer",
399     "uniqueId": "integer.datatype",
400     "derivedFromName": "tosca.datatypes.Root",
401     "creationTime": 1550136564094,
402     "modificationTime": 1550136564094,
403     "toscaPresentation": {}
404   },
405   "onap.datatypes.partner.access_details": {
406     "derivedFrom": {
407       "name": "tosca.datatypes.Root",
408       "uniqueId": "tosca.datatypes.Root.datatype",
409       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
410       "creationTime": 1550136563278,
411       "modificationTime": 1550136563278,
412       "toscaPresentation": {}
413     },
414     "properties": [
415       {
416         "uniqueId": "onap.datatypes.partner.access_details.addressId",
417         "type": "string",
418         "description": "id of the site",
419         "required": true,
420         "definition": false,
421         "password": false,
422         "name": "addressId",
423         "hidden": false,
424         "immutable": false,
425         "toscaPresentation": {}
426       },
427       {
428         "constraints": [
429           {
430             "validValues": [
431               "standard",
432               "stable"
433             ]
434           }
435         ],
436         "uniqueId": "onap.datatypes.partner.access_details.dsl_stability_profile",
437         "type": "string",
438         "description": "profile of stability",
439         "required": false,
440         "definition": false,
441         "defaultValue": "standard",
442         "password": false,
443         "name": "dsl_stability_profile",
444         "hidden": false,
445         "immutable": false,
446         "toscaPresentation": {}
447       },
448       {
449         "uniqueId": "onap.datatypes.partner.access_details.partner_priorty_assist",
450         "type": "boolean",
451         "description": "assistance flag",
452         "required": false,
453         "definition": true,
454         "defaultValue": true,
455         "password": false,
456         "name": "partner_priorty_assist",
457         "hidden": false,
458         "immutable": false,
459         "toscaPresentation": {}
460       },
461       {
462         "uniqueId": "onap.datatypes.partner.access_details.battery_backup",
463         "type": "boolean",
464         "description": "backup requirement flag",
465         "required": false,
466         "definition": true,
467         "defaultValue": true,
468         "password": false,
469         "name": "battery_backup",
470         "hidden": false,
471         "immutable": false,
472         "toscaPresentation": {}
473       },
474       {
475         "uniqueId": "onap.datatypes.partner.access_details.central_splitter",
476         "type": "boolean",
477         "description": "applicable to FTTN service",
478         "required": false,
479         "definition": true,
480         "defaultValue": true,
481         "password": false,
482         "name": "central_splitter",
483         "hidden": false,
484         "immutable": false,
485         "toscaPresentation": {}
486       },
487       {
488         "constraints": [
489           {
490             "validValues": [
491               "Standard",
492               "Enhanced"
493             ]
494           }
495         ],
496         "uniqueId": "onap.datatypes.partner.access_details.service_restoration_sla",
497         "type": "string",
498         "description": "This is the service restoration SLA from an partner perspective.",
499         "required": false,
500         "definition": false,
501         "defaultValue": "Standard",
502         "password": false,
503         "name": "service_restoration_sla",
504         "hidden": false,
505         "immutable": false,
506         "toscaPresentation": {}
507       }
508     ]
509   },
510   "onap.datatypes.partner.bandwidth": {
511     "derivedFrom": {
512       "name": "tosca.datatypes.Root",
513       "uniqueId": "tosca.datatypes.Root.datatype",
514       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
515       "creationTime": 1550136563278,
516       "modificationTime": 1550136563278,
517       "toscaPresentation": {}
518     },
519     "properties": [
520       {
521         "constraints": [
522           {
523             "validValues": [
524               "standard",
525               "guaranteed"
526             ]
527           }
528         ],
529         "uniqueId": "onap.datatypes.partner.bandwidth.bandwidth_type",
530         "type": "string",
531         "description": "type of bandwidth",
532         "required": true,
533         "definition": false,
534         "defaultValue": "standard",
535         "password": false,
536         "name": "bandwidth_type",
537         "hidden": false,
538         "immutable": false,
539         "toscaPresentation": {}
540       },
541       {
542         "constraints": [
543           {
544             "validValues": [
545               "128",
546               "512",
547               "1",
548               "2",
549               "5",
550               "10",
551               "20",
552               "25",
553               "30",
554               "40",
555               "50",
556               "100",
557               "250",
558               "500",
559               "1000"
560             ]
561           }
562         ],
563         "uniqueId": "onap.datatypes.partner.bandwidth.downstream",
564         "type": "string",
565         "description": "down speed",
566         "required": true,
567         "definition": true,
568         "password": false,
569         "name": "downstream",
570         "hidden": false,
571         "immutable": false,
572         "toscaPresentation": {}
573       },
574       {
575         "constraints": [
576           {
577             "validValues": [
578               "128",
579               "512",
580               "1",
581               "2",
582               "5",
583               "10",
584               "20",
585               "25",
586               "30",
587               "40",
588               "50",
589               "100",
590               "250",
591               "500",
592               "1000"
593             ]
594           }
595         ],
596         "uniqueId": "onap.datatypes.partner.bandwidth.upstream",
597         "type": "string",
598         "description": "up speed",
599         "required": true,
600         "definition": true,
601         "password": false,
602         "name": "upstream",
603         "hidden": false,
604         "immutable": false,
605         "toscaPresentation": {}
606       },
607       {
608         "constraints": [
609           {
610             "validValues": [
611               "k",
612               "M"
613             ]
614           }
615         ],
616         "uniqueId": "onap.datatypes.partner.bandwidth.units",
617         "type": "string",
618         "description": "unit of speed",
619         "required": true,
620         "definition": true,
621         "password": false,
622         "name": "units",
623         "hidden": false,
624         "immutable": false,
625         "toscaPresentation": {}
626       },
627       {
628         "uniqueId": "onap.datatypes.partner.bandwidth.service_alias",
629         "type": "string",
630         "description": "16 digit id",
631         "required": false,
632         "definition": false,
633         "password": false,
634         "name": "service_alias",
635         "hidden": false,
636         "immutable": false,
637         "toscaPresentation": {}
638       }
639     ]
640   },
641   "onap.datatypes.partner.service_details": {
642     "derivedFrom": {
643       "name": "tosca.datatypes.Root",
644       "uniqueId": "tosca.datatypes.Root.datatype",
645       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
646       "creationTime": 1550136563278,
647       "modificationTime": 1550136563278,
648       "toscaPresentation": {}
649     },
650     "properties": [
651       {
652         "uniqueId": "onap.datatypes.partner.service_details.bandwidth",
653         "type": "onap.datatypes.partner.bandwidth",
654         "description": "bandwidth details for access",
655         "required": false,
656         "definition": false,
657         "password": false,
658         "name": "bandwidth",
659         "hidden": false,
660         "immutable": false,
661         "toscaPresentation": {}
662       },
663       {
664         "constraints": [
665           {
666             "validValues": [
667               "CONSUMER",
668               "WHOLESALE",
669               "BUSINESS"
670             ]
671           }
672         ],
673         "uniqueId": "onap.datatypes.partner.service_details.line_of_business",
674         "type": "string",
675         "description": "LOB",
676         "required": false,
677         "definition": false,
678         "password": false,
679         "name": "line_of_business",
680         "hidden": false,
681         "immutable": false,
682         "toscaPresentation": {}
683       },
684       {
685         "uniqueId": "onap.datatypes.partner.service_details.access_details",
686         "type": "onap.datatypes.partner.access_details",
687         "required": false,
688         "definition": false,
689         "password": false,
690         "name": "access_details",
691         "hidden": false,
692         "immutable": false,
693         "toscaPresentation": {}
694       }
695     ]
696   },
697   "onap.datatypes.partner.sppartner_details": {
698     "derivedFrom": {
699       "name": "tosca.datatypes.Root",
700       "uniqueId": "tosca.datatypes.Root.datatype",
701       "description": "The TOSCA root Data Type all other TOSCA base Data Types derive from",
702       "creationTime": 1550136563278,
703       "modificationTime": 1550136563278,
704       "toscaPresentation": {}
705     },
706     "properties": [
707       {
708         "uniqueId": "onap.datatypes.partner.sppartner_details.partner_url",
709         "type": "string",
710         "description": "Partner URL to access and provision the service",
711         "required": false,
712         "definition": false,
713         "password": false,
714         "name": "partner_url",
715         "hidden": false,
716         "immutable": false,
717         "toscaPresentation": {}
718       },
719       {
720         "uniqueId": "onap.datatypes.partner.sppartner_details.uuid",
721         "type": "string",
722         "description": "UUID of the service definition defined in the partner catalog",
723         "required": false,
724         "definition": false,
725         "password": false,
726         "name": "uuid",
727         "hidden": false,
728         "immutable": false,
729         "toscaPresentation": {}
730       },
731       {
732         "uniqueId": "onap.datatypes.partner.sppartner_details.auth_user",
733         "type": "string",
734         "description": "Authentication  details to access the Service URL",
735         "required": false,
736         "definition": false,
737         "password": false,
738         "name": "auth_user",
739         "hidden": false,
740         "immutable": false,
741         "toscaPresentation": {}
742       },
743       {
744         "uniqueId": "onap.datatypes.partner.sppartner_details.auth_password",
745         "type": "string",
746         "description": "Authentication  details to access the Service URL",
747         "required": false,
748         "definition": false,
749         "password": false,
750         "name": "auth_password",
751         "hidden": false,
752         "immutable": false,
753         "toscaPresentation": {}
754       }
755     ]
756   }
757 }