VNFRQTS - Fixing doc8 errors
[vnfrqts/requirements.git] / docs / Chapter5 / Heat / ONAP Heat Resource ID and Parameter Naming Convention / ONAP Output Parameter Names.rst
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 .. _ONAP Output Parameter Names:
6
7 ONAP Output Parameter Names
8 -------------------------------------------------------------
9
10 ONAP defines three types of Output Parameters as detailed in
11 :ref:`Output Parameters`.
12
13 ONAP Base Module Output Parameters:
14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16 ONAP Base Module Output Parameters do not have an explicit naming
17 convention.
18
19 .. req::
20     :id: R-97726
21     :target: VNF
22     :keyword: MUST
23     :validation_mode: static
24     :updated: casablanca
25
26     A VNF's Heat Orchestration Template's Base Module Output Parameter names
27     **MUST** contain ``{vm-type}`` and/or ``{network-role}`` when appropriate.
28
29 ONAP Volume Template Output Parameters:
30 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
32 .. req::
33     :id: R-88524
34     :target: VNF
35     :keyword: MUST
36     :validation_mode: static
37     :updated: casablanca
38
39     A VNF's Heat Orchestration Template's Volume Template
40     Output Parameter names
41     **MUST** contain ``{vm-type}`` when appropriate.
42
43 Predefined Output Parameters
44 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
46 ONAP currently defines one predefined output parameter the OAM
47 Management IP Addresses.
48
49 .. _OAM Management IP Addresses:
50
51 OAM Management IP Addresses
52 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53
54 A VNF may have a management interface for application controllers to
55 interact with and configure the VNF. Typically, this will be via a
56 specific VM that performs a VNF administration function. The IP address
57 of this interface must be captured and inventoried by ONAP. The IP
58 address might be a VIP if the VNF contains an HA pair of management VMs,
59 or may be a single IP address assigned to one VM.
60
61 .. req::
62     :id: R-47874
63     :target: VNF
64     :keyword: MAY
65     :updated: casablanca
66
67     A VNF **MAY** have
68       * Only an IPv4 OAM Management IP Address
69       * Only an IPv6 OAM Management IP Address
70       * Both a IPv4 and IPv6 OAM Management IP Addresses
71
72 .. req::
73     :id: R-18683
74     :target: VNF
75     :keyword: MUST
76     :validation_mode: static
77     :updated: casablanca
78
79     If a VNF has one IPv4 OAM Management IP Address and the
80     IP Address needs to be inventoried in ONAP's A&AI
81     database, an output parameter **MUST** be declared in only one of the
82     VNF's Heat Orchestration Templates and the parameter **MUST** be named
83     ``oam_management_v4_address``.
84
85 .. req::
86     :id: R-94669
87     :target: VNF
88     :keyword: MUST
89     :validation_mode: static
90     :updated: casablanca
91
92     If a VNF has one IPv6 OAM Management IP Address and the
93     IP Address needs to be inventoried in ONAP's A&AI
94     database, an output parameter **MUST** be declared in only one of the
95     VNF's Heat Orchestration Templates and the parameter **MUST** be named
96     ``oam_management_v6_address``.
97
98 The OAM Management IP Address maybe assigned either via
99   *  ONAP SDN-C
100   *  DHCP
101
102 .. req::
103     :id: R-56287
104     :target: VNF
105     :keyword: MUST
106     :validation_mode: static
107     :updated: casablanca
108
109     If the VNF's OAM Management IP Address is assigned by ONAP SDN-C and
110     assigned in the VNF's Heat Orchestration Template's via a heat resource
111     ``OS::Neutron::Port`` property ``fixed_ips`` map property
112     ``ip_adress`` parameter (e.g., ``{vm-type}_{network-role}_ip_{index}``,
113     ``{vm-type}_{network-role}_v6_ip_{index}``)
114     and the OAM IP Address is required to be inventoried in ONAP A&AI,
115     then the parameter **MUST** be echoed in an output statement.
116
117     .. code-block:: yaml
118
119       outputs:
120           oam_management_v4_address:
121             value: {get_param: {vm-type}_{network-role}_ip_{index} }
122           oam_management_v6_address:
123             value: {get_param: {vm-type}_{network-role}_v6_ip_{index} }
124
125
126 *Example: ONAP SDN-C Assigned IP Address echoed as
127 oam_management_v4_address*
128
129 .. code-block:: yaml
130
131   parameters:
132     admin_oam_ip_0:
133       type: string
134       description: Fixed IPv4 assignment for admin VM 0 on the OAM network
135   . . .
136   resources:
137     admin_0_oam_port_0:
138       type: OS::Neutron::Port
139       properties:
140         name:
141           str_replace:
142             template: VNF_NAME_admin_oam_port_0
143             params:
144               VNF_NAME: {get_param: vnf_name}
145         network: { get_param: oam_net_id }
146         fixed_ips: [{ "ip_address": { get_param: admin_oam_ip_0 }}]
147         security_groups: [{ get_param: security_group }]
148     admin_server_0:
149       type: OS::Nova::Server
150       properties:
151         name: { get_param: admin_names }
152         image: { get_param: admin_image_name }
153         flavor: { get_param: admin_flavor_name }
154         availability_zone: { get_param: availability_zone_0 }
155       networks:
156         - port: { get_resource: admin_0_oam_net_port_0 }
157       metadata:
158         vnf_id: { get_param: vnf_id }
159         vf_module_id: { get_param: vf_module_id }
160         vnf_name: {get_param: vnf_name }
161   outputs:
162       oam_management_v4_address:
163         value: {get_param: admin_oam_ip_0 }
164
165 .. req::
166     :id: R-48987
167     :target: VNF
168     :keyword: MUST
169     :validation_mode: static
170     :updated: casablanca
171
172     If the VNF's OAM Management IP Address is cloud assigned and
173     and the OAM IP Address is required to be inventoried in ONAP A&AI,
174     then the parameter **MUST** be obtained by the
175     resource ``OS::Neutron::Port``
176     attribute ``ip_address``.
177
178 .. code-block:: yaml
179
180    outputs:
181        oam_management_v4_address:
182          value: {get_attr: [ {OS::Neutron Port Resource ID}, fixed_ips, 0, ip_address] }
183
184 *Example: Cloud Assigned IP Address output as oam_management_v4_address*
185
186 .. code-block:: yaml
187
188   parameters:
189   . . .
190   resources:
191     admin_0_oam_port_0:
192       type: OS::Neutron::Port
193       properties:
194         name:
195           str_replace:
196             template: VNF_NAME_admin_oam_0_port
197             params:
198               VNF_NAME: {get_param: vnf_name}
199         network: { get_param: oam_net_id }
200         security_groups: [{ get_param: security_group }]
201     admin_server_0:
202       type: OS::Nova::Server
203       properties:
204         name: { get_param: admin_name_0 }
205         image: { get_param: admin_image_name }
206         flavor: { get_param: admin_flavor_name }
207         availability_zone: { get_param: availability_zone_0 }
208         networks:
209           - port: { get_resource: admin_0_oam_port_0 }
210         metadata:
211           vnf_id: { get_param: vnf_id }
212           vf_module_id: { get_param: vf_module_id }
213           vnf_name: {get_param: vnf_name }
214   outputs:
215     oam_management_v4_address:
216       value: {get_attr: [admin_0_oam_port_0, fixed_ips, 0, ip_address] }