fix tosca template bugs
[modeling/etsicatalog.git] / catalog / pub / utils / toscaparser / testdata / pnf / ran-du / type_definition.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 capability_types: 
4  
5   tosca.capabilities.nfv.VirtualLinkable:
6     derived_from: tosca.capabilities.Root
7
8 data_types:
9  
10   tosca.datatypes.nfv.ConnectivityType:
11     derived_from: tosca.datatypes.Root
12     properties: 
13       layer_protocol:
14         type: string
15         required: true
16         constraints:
17           - valid_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]  
18       flow_pattern:
19         type: string
20         required: false
21         constraints: # not defined in IFA011 v2.4.1 and SOL001 v.6.0
22           - valid_values: [Line, Tree, Mesh]
23   
24   tosca.datatypes.nfv.VlProfile:
25       derived_from: tosca.datatypes.Root
26       properties:
27         max_bit_rate_requirements:
28            type: tosca.datatypes.nfv.LinkBitRateRequirements
29            required: true
30         min_bit_rate_requirements:
31            type: tosca.datatypes.nfv.LinkBitRateRequirements
32            required: true
33         qos:
34            type: tosca.datatypes.nfv.Qos
35            required: false
36         initiationParameters: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
37            type: map
38            entry_schema:
39              type: string
40            required: false
41         cidr: #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
42            type: string
43            required: false
44         networkName:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
45            type: string
46            required: false
47         startIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
48            type: string
49            required: false
50         endIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
51            type: string
52            required: false
53         gatewayIp:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
54            type: string
55            required: false
56         segmentationId:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
57            type: integer
58            required: false
59         physicalNetwork:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
60            type: string
61            required: false
62         networkType:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
63            type: string
64            required: false
65            constraints:
66              - valid_values: [VLAN, VXLAN]
67         dhcpEnabled:  # not defined in IFA011 v2.4.1 and SOL001 v.6.0
68            type: boolean
69            required: false
70         vlanTransparent:  #Align with ONAP R2 IM. not defined in IFA011 v2.4.1 and SOL001 v.6.0
71            type: boolean
72            required: false
73   
74   tosca.datatypes.nfv.Qos:
75     derived_from: tosca.datatypes.Root
76     properties:
77       latency:
78          type: integer #Number [ms]
79          required: true
80       packet_delay_variation:
81          type: integer #Number [ms]
82          required: true
83       packet_loss_ratio:
84          type: float
85          constraints:
86            - in_range: [ 0.0, 1.0 ]
87          required: false
88   
89   tosca.datatypes.nfv.ServiceAvailability:
90    derived_from: tosca.datatypes.Root
91    description: service availability
92    properties:
93      Level:
94        type: string
95        description: service availability levels
96        required: true
97        constraints:
98           - valid_values: [ Level1, Level2,Level3 ]
99           
100 node_types:  
101   tosca.nodes.nfv.VNF:
102     derived_from: tosca.nodes.Root
103     properties:
104       descriptor_id: 
105         type: string # GUID
106         required: true
107       descriptor_version: 
108         type: string
109         required: true
110       provider: 
111         type: string
112         required: true
113       product_name: 
114         type: string
115         required: true
116       software_version: 
117         type: string
118         required: true
119       product_info_name: 
120         type: string
121         required: false
122       product_info_description: 
123         type: string
124         required: false
125       vnfm_info:
126         type: list
127         entry_schema:
128           type: string
129         required: true
130       localization_languages:
131         type: list
132         entry_schema:
133           type: string
134         required: false
135       default_localization_language:
136         type: string
137         required: false
138       configurable_properties:
139         type: tosca.datatypes.nfv.VnfConfigurableProperties
140         required: false
141       modifiable_attributes:
142         type: tosca.datatypes.nfv.VnfInfoModifiableAttributes
143         required: false  
144       flavour_id:
145         type: string
146         required: true
147       flavour_description:
148         type: string
149         required: true
150     requirements:
151       - virtual_link:
152           capability: tosca.capabilities.nfv.VirtualLinkable
153           relationship: tosca.relationships.nfv.VirtualLinksTo
154           node: tosca.nodes.nfv.VnfVirtualLink
155           occurrences: [ 0, UNBOUNDED ]
156     interfaces:
157       Nfv:
158         type: tosca.interfaces.nfv.vnf.lifecycle.Nfv  
159   tosca.nodes.nfv.PNF:
160     derived_from: tosca.nodes.Root
161     properties:
162       descriptor_id:
163         type: string
164         required: true
165       provider:
166         type: string
167         required: true
168       version:
169         type: string
170         required: true
171       descriptor_invariant_id:
172         type: string
173         required: true
174       name:
175         type: string
176         required: true
177       function_description:
178         type: string
179         required: true
180       #geographical_location_info:       
181       #  type: TBD
182       #  required: true
183     requirements:
184        - virtual_link:
185            capability: tosca.capabilities.nfv.VirtualLinkable
186            relationship: tosca.relationships.nfv.VirtualLinksTo
187
188   tosca.nodes.nfv.PnfExtPort:           
189     derived_from: tosca.nodes.Root
190            
191   tosca.nodes.nfv.NsVirtualLink:
192     derived_from: tosca.nodes.Root
193     description: node definition of Virtual Links
194     properties:
195       provider:
196         type: string
197         required: false
198       version:
199         type: string
200         required: true
201       vl_profile:
202         type: tosca.datatypes.nfv.VlProfile
203         required: true
204       connectivity_type:
205         type: tosca.datatypes.nfv.ConnectivityType
206         required: true
207       qos:
208         type: tosca.datatypes.nfv.Qos
209         required: false
210       service_availability:
211         type: tosca.datatypes.nfv.ServiceAvailability
212         required: false
213     capabilities:
214       VirtualLinkable:
215         type: tosca.capabilities.nfv.VirtualLinkable
216   tosca.nodes.nfv.NS:
217     derived_from: tosca.nodes.Root
218     properties:
219       ns_id:
220         type: string
221         required: true
222       designer:
223         type: string
224         required: true
225       version:
226         type: string
227         required: true
228       name:
229         type: string
230         required: true
231       invariant_id:
232         type: string
233         required: true
234     capabilities:
235       #monitoring_parameter:
236         # modelled as ad hoc capabilities in VNF node template
237     requirements:
238       - virtual_link:
239           capability:
240              tosca.capabilities.nfv.VirtualLinkable
241           relationship:
242              tosca.relationships.nfv.VirtualLinksTo
243           node: tosca.nodes.nfv.NsVirtualLink
244           occurrences: [ 0, UNBOUNDED ]
245
246 relationship_types:
247   
248   tosca.relationships.nfv.VirtualLinksTo:
249     derived_from: tosca.relationships.DependsOn
250     valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable]
251