523bf8b78b8465976fa617226a3b5364f6fdd82e
[vnfrqts/requirements.git] /
1 .. Licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 AT&T Intellectual Property.  All rights reserved.
4
5 Contrail Resource Parameters
6 ----------------------------------------------------------------------
7
8 ONAP requires the parameter names of certain Contrail Resources to
9 follow specific naming conventions. This section provides these
10 requirements.
11
12 Contrail Network Parameters
13 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 Contrail based resources may require references to a Contrail network
16 using the network FQDN.
17
18 External Networks
19 ~~~~~~~~~~~~~~~~~~~~~~~~~
20
21 .. req::
22     :id: R-02164
23     :target: VNF
24     :keyword: MUST
25     :validation_mode: static
26     :updated: casablanca
27
28     When a VNF's Heat Orchestration Template's Contrail resource
29     has a property that
30     references an external network that requires the network's
31     Fully Qualified Domain Name (FQDN), the property parameter
32
33     * **MUST** follow the format ``{network-role}_net_fqdn``
34     * **MUST** be declared as type ``string``
35     * **MUST NOT** be enumerated in the VNF's Heat Orchestration Template's
36       Environment File
37
38 .. req::
39     :id: R-73228
40     :target: VNF
41     :keyword: MUST
42     :validation_mode: static
43     :updated: casablanca
44
45     A VNF's Heat Orchestration Template's parameter
46     ``{network-role}_net_fqdn``
47     **MUST** be declared as type ``string``.
48
49 .. req::
50     :id: R-92193
51     :target: VNF
52     :keyword: MUST NOT
53     :validation_mode: static
54
55     A VNF's Heat Orchestration Template's parameter
56     ``{network-role}_net_fqdn``
57     **MUST NOT** be enumerated in the VNF's Heat Orchestration Template's
58     Environment File.
59
60 *Example: Parameter declaration*
61
62 .. code-block:: yaml
63
64   parameters:
65     {network-role}_net_fqdn:
66       type: string
67       description: Contrail FQDN for the {network-role} network
68
69 *Example: Contrail Resource OS::ContrailV2::VirtualMachineInterface
70 Reference to a Network FQDN.*
71
72 In this example, the {network-role} has been defined as oam to represent
73 an oam network and the {vm-type} has been defined as fw for firewall.
74 The Contrail resource OS::ContrailV2::VirtualMachineInterface property
75 virtual_network_refs references a contrail network FQDN.
76
77 .. code-block:: yaml
78
79   fw_0_oam_vmi_0:
80     type: OS::ContrailV2::VirtualMachineInterface
81     properties:
82       name:
83         str_replace:
84           template: VM_NAME_virtual_machine_interface_1
85           params:
86             VM_NAME: { get_param: fw_name_0 }
87       virtual_machine_interface_properties:
88         virtual_machine_interface_properties_service_interface_type: {
89         get_param: oam_protected_interface_type }
90       virtual_network_refs:
91         - get_param: oam_net_fqdn
92       security_group_refs:
93         - get_param: fw_sec_grp_id
94
95 Interface Route Table Prefixes for Contrail InterfaceRoute Table
96 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
98 .. req::
99     :id: R-28222
100     :target: VNF
101     :keyword: MUST
102     :validation_mode: static
103     :updated: casablanca
104
105     If a VNF's Heat Orchestration Template
106     ``OS::ContrailV2::InterfaceRouteTable`` resource
107     ``interface_route_table_routes`` property
108     ``interface_route_table_routes_route`` map property parameter name
109     **MUST** follow the format
110
111     * ``{vm-type}_{network-role}_route_prefixes``
112
113 .. req::
114     :id: R-19756
115     :target: VNF
116     :keyword: MUST
117     :validation_mode: static
118     :updated: casablanca
119
120     If a VNF's Heat Orchestration Template
121     ``OS::ContrailV2::InterfaceRouteTable`` resource
122     ``interface_route_table_routes`` property
123     ``interface_route_table_routes_route`` map property parameter
124     ``{vm-type}_{network-role}_route_prefixes``
125     **MUST** be defined as type ``json``.
126
127 .. req::
128     :id: R-76682
129     :target: VNF
130     :keyword: MUST NOT
131     :validation_mode: static
132     :updated: casablanca
133
134     If a VNF's Heat Orchestration Template
135     ``OS::ContrailV2::InterfaceRouteTable`` resource
136     ``interface_route_table_routes`` property
137     ``interface_route_table_routes_route`` map property parameter
138     ``{vm-type}_{network-role}_route_prefixes``
139     **MUST NOT** be enumerated in the VNF's Heat Orchestration Template's
140     Environment File.
141
142 The parameter ``{vm-type}_{network-role}_route_prefixes``
143 supports IP addresses in the format:
144
145 1. Host IP Address (e.g., 10.10.10.10)
146
147 2. CIDR Notation format (e.g., 10.0.0.0/28)
148
149
150 *Example Parameter Definition*
151
152 .. code-block:: yaml
153
154   parameters:
155     {vm-type}_{network-role}_route_prefixes:
156       type: json
157       description: JSON list of Contrail Interface Route Table route prefixes
158
159 *Example:*
160
161 .. code-block:: yaml
162
163   parameters:
164     vnf_name:
165       type: string
166       description: Unique name for this VF instance
167     fw_oam_route_prefixes:
168       type: json
169       description: prefix for the ServiceInstance InterfaceRouteTable
170     int_fw_dns_trusted_interface_type:
171       type: string
172       description: service_interface_type for ServiceInstance
173
174   resources:
175     <resource name>:
176       type: OS::ContrailV2::InterfaceRouteTable
177       depends_on: [resource name of OS::ContrailV2::ServiceInstance]
178       properties:
179         name:
180           str_replace:
181             template: VNF_NAME_interface_route_table
182             params:
183               VNF_NAME: { get_param: vnf_name }
184         interface_route_table_routes:
185           interface_route_table_routes_route: { get_param: fw_oam_route_prefixes }
186         service_instance_refs:
187           - get_resource: <resource name of OS::ContrailV2::ServiceInstance>
188         service_instance_refs_data:
189           - service_instance_refs_data_interface_type: { get_param: oam_interface_type }
190
191
192 Resource OS::ContrailV2::InstanceIp
193 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194
195 The Contrail resource ``OS::ContrailV2::InstanceIp`` has two properties
196 that parameters **MUST** follow an explicit naming convention.  The
197 properties are ``instance_ip_address`` and ``subnet_uuid``.
198
199 *Example OS::ContrailV2::InstanceIp Resource*
200
201 .. code-block:: yaml
202
203   <resource ID>:
204     type: OS::ContrailV2::InstanceIp
205     properties:
206       name: { get_param: name }
207       fq_name: { get_param: fq_name }
208       display_name: { get_param: display_name }
209       secondary_ip_tracking_ip:
210         {
211           secondary_ip_tracking_ip_ip_prefix: { get_param: secondary_ip_tracking_ip_ip_prefix },
212           secondary_ip_tracking_ip_ip_prefix_len: { get_param: secondary_ip_tracking_ip_ip_prefix_len },
213         }
214       instance_ip_address: { get_param: instance_ip_address }
215       instance_ip_mode: { get_param: instance_ip_mode }
216       subnet_uuid: { get_param: subnet_uuid }
217       instance_ip_family: { get_param: instance_ip_family }
218       annotations:
219         {
220           annotations_key_value_pair:
221             [{
222               annotations_key_value_pair_key: { get_param: annotations_key_value_pair_key },
223               annotations_key_value_pair_value: { get_param: annotations_key_value_pair_value },
224             }],
225         }
226       instance_ip_local_ip: { get_param: instance_ip_local_ip }
227       instance_ip_secondary: { get_param: instance_ip_secondary }
228       physical_router_refs: [{ get_param: physical_router_refs }]
229       virtual_machine_interface_refs: [{ get_param: virtual_machine_interface_refs }]
230       virtual_network_refs: [{ get_param: virtual_network_refs }]
231
232
233 Resource OS::ContrailV2::InstanceIp Property instance_ip_address
234 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235
236 A VNF's Heat Orchestration Templates resource ``OS::ContrailV2::InstanceIp``
237 property ``instance_ip_address`` parameter
238 **MUST** follow the same requirements
239 that apply to the resource ``OS::Neutron`` property ``fixed_ips`` map
240 property ``ip_address`` parameter.
241
242
243 *Example: Contrail Resource OS::ContrailV2::InstanceIp, Property
244 instance_ip_address*
245
246 The property instance_ip_address uses the same parameter naming
247 convention as the property fixed_ips and Map Property ip_address in
248 OS::Neutron::Port. The resource is assigning an ECOMP SDN-C Assigned IP
249 Address. The {network-role} has been defined as oam_protected to
250 represent an oam protected network and the {vm-type} has been defined as
251 fw for firewall.
252
253 .. code-block:: yaml
254
255   fw_0_oam_protected_vmi_0_IP_0:
256     type: OS::ContrailV2::InstanceIp
257     depends_on:
258       - fw_0_oam_protected_vmi_0
259     properties:
260       virtual_machine_interface_refs:
261         - get_resource: fw_0_oam_protected_vmi_0
262       virtual_network_refs:
263         - get_param: oam_protected_net_fqdn
264       instance_ip_address: { get_param: [fw_oam_protected_ips, get_param: index ] }
265
266 Resource OS::ContrailV2::InstanceIp Property subnet_uuid
267 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
268
269 A VNF's Heat Orchestration Templates resource ``OS::ContrailV2::InstanceIp``
270 property ``subnet_uuid`` parameter
271 **MUST** follow the same requirements
272 that apply to the resource ``OS::Neutron`` property ``fixed_ips`` map
273 property ``subnet``/``subnet_id`` parameter.
274
275 *Example: Contrail Resource OS::ContrailV2::InstanceIp, Property
276 subnet_uuid*
277
278 The property instance_ip_address uses the same parameter naming
279 convention as the property fixed_ips and Map Property subnet_id in
280 OS::Neutron::Port. The resource is assigning a cloud assigned IP
281 Address. The {network-role} has been defined as "oam_protected" to
282 represent an oam protected network and the {vm-type} has been defined as
283 "fw" for firewall.
284
285 .. code-block:: yaml
286
287   fw_0_oam_protected_vmi_0_IP_0:
288     type: OS::ContrailV2::InstanceIp
289     depends_on:
290     - fw_0_oam_protected_vmi_0
291     properties:
292       virtual_machine_interface_refs:
293         - get_resource: fw_0_oam_protected_vmi_0
294       virtual_network_refs:
295         - get_param: oam_protected_net_fqdn
296       subnet_uuid: { get_param: oam_protected_subnet_id }
297
298 OS::ContrailV2::VirtualMachineInterface Property virtual_machine_interface_allowed_address_pairs
299 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
300
301 A VNF's Heat Orchestration Templates resource
302 ``OS::ContrailV2::VirtualMachineInterface`` map property,
303 ``virtual_machine_interface_allowed_address_pairs,
304 virtual_machine_interface_allowed_address_pairs_allowed_address_pair,
305 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip,
306 virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix``
307 parameter **MUST** follow the same requirements that apply to the
308 resource ``OS::Neutron::Port`` property
309 ``allowed_address_pairs``, map property ``ip_address`` parameter.
310
311 *Example OS::ContrailV2::VirtualMachineInterface*
312
313 .. code-block:: yaml
314
315   <resource ID>:
316     type: OS::ContrailV2::VirtualMachineInterface
317     properties:
318       name: { get_param: name }
319       fq_name: { get_param: fq_name }
320       ecmp_hashing_include_fields:
321         {
322           ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured },
323           ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip },
324           ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip },
325           ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol },
326           ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port },
327           ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port },
328         }
329       virtual_machine_interface_host_routes:
330         {
331           virtual_machine_interface_host_routes_route:
332             [{
333               virtual_machine_interface_host_routes_route_prefix: { get_param: virtual_machine_interface_host_routes_route_prefix },
334               virtual_machine_interface_host_routes_route_next_hop: { get_param: virtual_machine_interface_host_routes_route_next_hop },
335               virtual_machine_interface_host_routes_route_next_hop_type: { get_param: virtual_machine_interface_host_routes_route_next_hop_type },
336               virtual_machine_interface_host_routes_route_community_attributes:
337                 {
338                   virtual_machine_interface_host_routes_route_community_attributes_community_attribute: [{ get_param: virtual_machine_interface_host_routes_route_community_attributes_community_attribute }],
339                 },
340             }],
341         }
342       virtual_machine_interface_mac_addresses:
343         {
344           virtual_machine_interface_mac_addresses_mac_address: [{ get_param: virtual_machine_interface_mac_addresses_mac_address }],
345         }
346       virtual_machine_interface_dhcp_option_list:
347         {
348           virtual_machine_interface_dhcp_option_list_dhcp_option:
349             [{
350               virtual_machine_interface_dhcp_option_list_dhcp_option_dhcp_option_name: { get_param: virtual_machine_interface_dhcp_option_list_dhcp_option_dhcp_option_name },
351               virtual_machine_interface_dhcp_option_list_dhcp_option_dhcp_option_value: { get_param: virtual_machine_interface_dhcp_option_list_dhcp_option_dhcp_option_value },
352               virtual_machine_interface_dhcp_option_list_dhcp_option_dhcp_option_value_bytes: { get_param: virtual_machine_interface_dhcp_option_list_dhcp_option_dhcp_option_value_bytes },
353             }],
354         }
355       virtual_machine_interface_bindings:
356         {
357           virtual_machine_interface_bindings_key_value_pair:
358             [{
359               virtual_machine_interface_bindings_key_value_pair_key: { get_param: virtual_machine_interface_bindings_key_value_pair_key },
360               virtual_machine_interface_bindings_key_value_pair_value: { get_param: virtual_machine_interface_bindings_key_value_pair_value },
361             }],
362         }
363       virtual_machine_interface_disable_policy: { get_param: virtual_machine_interface_disable_policy }
364       virtual_machine_interface_allowed_address_pairs:
365         {
366           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
367             [{
368               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
369                 {
370                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix },
371                   virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len },
372                 },
373               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac },
374               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode },
375             }],
376         }
377       annotations:
378         {
379           annotations_key_value_pair:
380             [{
381               annotations_key_value_pair_key: { get_param: annotations_key_value_pair_key },
382               annotations_key_value_pair_value: { get_param: annotations_key_value_pair_value },
383             }],
384         }
385       virtual_machine_interface_fat_flow_protocols:
386         {
387           virtual_machine_interface_fat_flow_protocols_fat_flow_protocol:
388             [{
389               virtual_machine_interface_fat_flow_protocols_fat_flow_protocol_protocol: { get_param: virtual_machine_interface_fat_flow_protocols_fat_flow_protocol_protocol },
390               virtual_machine_interface_fat_flow_protocols_fat_flow_protocol_port: { get_param: virtual_machine_interface_fat_flow_protocols_fat_flow_protocol_port },
391             }],
392         }
393       virtual_machine_interface_device_owner: { get_param: virtual_machine_interface_device_owner }
394       port_security_enabled: { get_param: port_security_enabled }
395       virtual_machine_interface_properties:
396         {
397           virtual_machine_interface_properties_service_interface_type: { get_param: virtual_machine_interface_properties_service_interface_type },
398           virtual_machine_interface_properties_interface_mirror:
399             {
400               virtual_machine_interface_properties_interface_mirror_traffic_direction: { get_param: virtual_machine_interface_properties_interface_mirror_traffic_direction },
401               virtual_machine_interface_properties_interface_mirror_mirror_to:
402                 {
403                   virtual_machine_interface_properties_interface_mirror_mirror_to_analyzer_name: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_analyzer_name },
404                   virtual_machine_interface_properties_interface_mirror_mirror_to_encapsulation: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_encapsulation },
405                   virtual_machine_interface_properties_interface_mirror_mirror_to_analyzer_ip_address: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_analyzer_ip_address },
406                   virtual_machine_interface_properties_interface_mirror_mirror_to_analyzer_mac_address: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_analyzer_mac_address },
407                   virtual_machine_interface_properties_interface_mirror_mirror_to_routing_instance: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_routing_instance },
408                   virtual_machine_interface_properties_interface_mirror_mirror_to_udp_port: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_udp_port },
409                   virtual_machine_interface_properties_interface_mirror_mirror_to_juniper_header: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_juniper_header },
410                   virtual_machine_interface_properties_interface_mirror_mirror_to_nh_mode: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_nh_mode },
411                   virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header:
412                     {
413                       virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header_vtep_dst_ip_address: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header_vtep_dst_ip_address },
414                       virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header_vtep_dst_mac_address: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header_vtep_dst_mac_address },
415                       virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header_vni: { get_param: virtual_machine_interface_properties_interface_mirror_mirror_to_static_nh_header_vni },
416                     },
417                 },
418             },
419           virtual_machine_interface_properties_local_preference: { get_param: virtual_machine_interface_properties_local_preference },
420           virtual_machine_interface_properties_sub_interface_vlan_tag: { get_param: virtual_machine_interface_properties_sub_interface_vlan_tag },
421         }
422       display_name: { get_param: display_name }
423       service_health_check_refs: [{ get_param: service_health_check_refs }]
424       routing_instance_refs: [{ get_param: routing_instance_refs }]
425       routing_instance_refs_data:
426         [{
427           routing_instance_refs_data_direction: { get_param: routing_instance_refs_data_direction },
428           routing_instance_refs_data_vlan_tag: { get_param: routing_instance_refs_data_vlan_tag },
429           routing_instance_refs_data_src_mac: { get_param: routing_instance_refs_data_src_mac },
430           routing_instance_refs_data_dst_mac: { get_param: routing_instance_refs_data_dst_mac },
431           routing_instance_refs_data_mpls_label: { get_param: routing_instance_refs_data_mpls_label },
432           routing_instance_refs_data_service_chain_address: { get_param: routing_instance_refs_data_service_chain_address },
433           routing_instance_refs_data_ipv6_service_chain_address: { get_param: routing_instance_refs_data_ipv6_service_chain_address },
434           routing_instance_refs_data_protocol: { get_param: routing_instance_refs_data_protocol },
435         }]
436       security_group_refs: [{ get_param: security_group_refs }]
437       physical_interface_refs: [{ get_param: physical_interface_refs }]
438       port_tuple_refs: [{ get_param: port_tuple_refs }]
439       interface_route_table_refs: [{ get_param: interface_route_table_refs }]
440       virtual_machine_interface_refs: [{ get_param: virtual_machine_interface_refs }]
441       virtual_network_refs: [{ get_param: virtual_network_refs }]
442       virtual_machine_refs: [{ get_param: virtual_machine_refs }]
443       qos_config_refs: [{ get_param: qos_config_refs }]
444       virtual_machine: { get_param: virtual_machine }
445       project: { get_param: project }