summaryrefslogtreecommitdiffstats
path: root/docs/Chapter5/Heat/ONAP Heat Resource ID and Parameter Naming Convention/ONAP Output Parameter Names.rst
blob: d2330a6fba49e338a1e0139dff1b77b52d00bf12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
.. Licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 AT&T Intellectual Property.  All rights reserved.

.. _ONAP Output Parameter Names:

ONAP Output Parameter Names
-------------------------------------------------------------

ONAP defines three types of Output Parameters as detailed in
:ref:`Output Parameters`.

ONAP Base Module Output Parameters:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ONAP Base Module Output Parameters do not have an explicit naming
convention.

.. req::
    :id: R-97726
    :target: VNF
    :keyword: MUST
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    A VNF's Heat Orchestration Template's Base Module Output
    Parameter names **MUST** contain {vm-type} and/or {network-role}
    when appropriate.

ONAP Volume Template Output Parameters:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. req::
    :id: R-88524
    :target: VNF
    :keyword: MUST
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    A VNF's Heat Orchestration Template's Volume Template
    Output Parameter names **MUST** contain {vm-type} when appropriate.

Predefined Output Parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ONAP currently defines one predefined output parameter the OAM
Management IP Addresses.

.. _OAM Management IP Addresses:

OAM Management IP Addresses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A VNF may have a management interface for application controllers to
interact with and configure the VNF. Typically, this will be via a
specific VM that performs a VNF administration function. The IP address
of this interface must be captured and inventoried by ONAP. The IP
address might be a VIP if the VNF contains an HA pair of management VMs,
or may be a single IP address assigned to one VM.

.. req::
    :id: R-47874
    :target: VNF
    :keyword: MAY
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    A VNF **MAY** have

     * Only an IPv4 OAM Management IP Address
     * Only an IPv6 OAM Management IP Address
     * Both a IPv4 and IPv6 OAM Management IP Addresses

.. req::
    :id: R-18683
    :target: VNF
    :keyword: MUST
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    If a VNF has one IPv4 OAM Management IP Address and the
    IP Address needs to be inventoried in ONAP's A&AI
    database, an output parameter **MUST** be declared in only one of the
    VNF's Heat Orchestration Templates and the parameter **MUST** be named
    'oam_management_v4_address'.

.. req::
    :id: R-94669
    :target: VNF
    :keyword: MUST
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    If a VNF has one IPv6 OAM Management IP Address and the
    IP Address needs to be inventoried in ONAP's AAI
    database, an output parameter **MUST** be declared in only one of the
    VNF's Heat Orchestration Templates and the parameter **MUST** be named
    'oam_management_v6_address'.

The OAM Management IP Address maybe assigned either via
  *  ONAP SDN-C
  *  DHCP

.. req::
    :id: R-56287
    :target: VNF
    :keyword: MUST
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    If the VNF's OAM Management IP Address is assigned by ONAP SDN-C and
    assigned in the VNF's Heat Orchestration Template's via a heat resource
    'OS::Neutron::Port' property 'fixed_ips' map property
    'ip_adress' parameter (e.g., '{vm-type}_{network-role}_ip_{index}',
    '{vm-type}_{network-role}_v6_ip_{index}')
    and the OAM IP Address is required to be inventoried in ONAP AAI,
    then the parameter **MUST** be echoed in an output statement.

.. code-block:: yaml

   outputs:
       oam_management_v4_address:
         value: {get_param: {vm-type}_{network-role}_ip_{index} }
       oam_management_v6_address:
         value: {get_param: {vm-type}_{network-role}_v6_ip_{index} }

*Example: ONAP SDN-C Assigned IP Address echoed as
oam_management_v4_address*

.. code-block:: yaml

  parameters:
    admin_oam_ip_0:
      type: string
      description: Fixed IPv4 assignment for admin VM 0 on the OAM network
  . . .
  resources:
    admin_0_oam_port_0:
      type: OS::Neutron::Port
      properties:
        name:
          str_replace:
            template: VNF_NAME_admin_oam_port_0
            params:
              VNF_NAME: {get_param: vnf_name}
        network: { get_param: oam_net_id }
        fixed_ips: [{ "ip_address": { get_param: admin_oam_ip_0 }}]
        security_groups: [{ get_param: security_group }]
    admin_server_0:
      type: OS::Nova::Server
      properties:
        name: { get_param: admin_names }
        image: { get_param: admin_image_name }
        flavor: { get_param: admin_flavor_name }
        availability_zone: { get_param: availability_zone_0 }
      networks:
        - port: { get_resource: admin_0_oam_net_port_0 }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id: { get_param: vf_module_id }
        vnf_name: {get_param: vnf_name }
  outputs:
      oam_management_v4_address:
        value: {get_param: admin_oam_ip_0 }


.. req::
    :id: R-48987
    :target: VNF
    :keyword: MUST
    :test: no test found
    :test_case: no test found
    :test_file: no test found

    If the VNF's OAM Management IP Address is Cloud assigned and
    and the OAM IP Address is required to be inventoried in ONAP AAI,
    then the parameter **MUST** be obtained by the resource 'OS::Neutron::Port'
    attribute 'ip_address'.

.. code-block:: yaml

   outputs:
       oam_management_v4_address:
         value: {get_attr: [ {OS::Neutron Port Resource ID}, fixed_ips, 0, ip_address] }

*Example: Cloud Assigned IP Address output as oam_management_v4_address*

.. code-block:: yaml

  parameters:
  . . .
  resources:
    admin_0_oam_port_0:
      type: OS::Neutron::Port
      properties:
        name:
          str_replace:
            template: VNF_NAME_admin_oam_0_port
            params:
              VNF_NAME: {get_param: vnf_name}
        network: { get_param: oam_net_id }
        security_groups: [{ get_param: security_group }]
    admin_server_0:
      type: OS::Nova::Server
      properties:
        name: { get_param: admin_name_0 }
        image: { get_param: admin_image_name }
        flavor: { get_param: admin_flavor_name }
        availability_zone: { get_param: availability_zone_0 }
        networks:
          - port: { get_resource: admin_0_oam_port_0 }
        metadata:
          vnf_id: { get_param: vnf_id }
          vf_module_id: { get_param: vf_module_id }
          vnf_name: {get_param: vnf_name }
  outputs:
    oam_management_v4_address:
      value: {get_attr: [admin_0_oam_port_0, fixed_ips, 0, ip_address] }