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