summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedSingleCompute/myTest/in/nested_tdcore.yaml
blob: 2baec50a382a6417442816e78d5421fa97115701 (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
## Copyright:: Nokia Corporation 2017
## Note: Nokia VM HOT file for CFX
## Name: "tdcore.yaml"
## Date: 20 Mar 2017
## Kilo Version
heat_template_version: 2015-04-30

description: IMS TDCORE VM

parameters:

  vcscf_name_delimeter:
    type: string
    description: 'delimeter used in concatenating different words while naming (ex: "-","_",".",...)'
    constraints:
      - allowed_values: [ '-', '', '_', '.']

  vnf_name:
    type: string
    description: Unique name for this VF instance

  vnf_id:
    type: string
    description: Unique ID for this VF instance

  vf_module_name:
    type: string
    description: Unique name for this VF Module instance

  vf_module_id:
    type: string
    description: Unique ID for this VF Module instance

  tdcore_security_group:
    type: string
    description: security group

  tdcore_flavor_name:
    type: string
    description: flavor name

  tdcore_image_name:
    type: string
    description: image name

  internal_net_id:
    type: string
    description: internal network name/uuid

  internal_dpdk_net_id:
    type: string
    description: internal dpdk network name/uuid

  vcscf_internal_netmask:
    type: string
    description: internal netmask

  vcscf_release:
    type: string
    description: "IMS release"

  vcscf_dn:
    type: string
    description: "DN name"

  vcscf_du:
    type: string
    description: "DU name"

  vcscf_cmrepo_address:
    type: string
    description: "CMRepo IP or FQDN"

  vcscf_swrepo_address:
    type: string
    description: SWRepo IP or FQDN

  vcscf_dns_address:
    type: string
    description: DNS server IP

  vcscf_internal_network_mtu:
    type: number
    description: MTU for internal network interface (eth0)
    constraints:
      - range: { min: 1000, max: 9100 }

  vcscf_gateway:
    type: string
    description: OAM unit virtual ip

  tdcore_names:
    type: comma_delimited_list
    description: "List of instance names for TDCORE instances"

  tdcore_internal_ips:
    type: comma_delimited_list
    description: "List of Internal Lan IPs for TDCORE instances"

  tdcore_dpdk_ips:
    type: comma_delimited_list
    description: "List of DPDK Lan IPs for TDCORE instances"

  tdcore_uuids:
    type: comma_delimited_list
    description: "List of UUIDs generated by cmrepo for TDCORE instances"

  availability_zone_0:
    type: string
    description: Availability zone name.

  tdcore_server_group:
    type: string
    description: server group name/id

  index:
    type: number
    description: index
    constraints:
      - range: { min: 0, max: 7 }

resources:

  tdcore_internal_0_port_0:
    type: OS::Neutron::Port
    properties:
      name:
        str_replace:
          template: $PREFIX$DELeth0
          params:
            $PREFIX: { get_param: [ tdcore_names, { get_param: index } ] }
            $DEL: { get_param: vcscf_name_delimeter }
      network: { get_param: internal_net_id }
      security_groups:
        - { get_param: tdcore_security_group }
      fixed_ips:
        - ip_address: { get_param: [ tdcore_internal_ips, { get_param: index } ] }

  tdcore_dpdk_0_port_1:
    type: OS::Neutron::Port
    properties:
      name:
        str_replace:
          template: $PREFIX$DELeth1
          params:
            $PREFIX: { get_param: [ tdcore_names, { get_param: index } ] }
            $DEL: { get_param: vcscf_name_delimeter }
      network: { get_param: internal_dpdk_net_id }
      security_groups:
        - { get_param: tdcore_security_group }
      fixed_ips:
        - ip_address: { get_param: [ tdcore_dpdk_ips, { get_param: index } ] }
      allowed_address_pairs:
        - ip_address: "0.0.0.0/1"
        - ip_address: "128.0.0.0/1"
        - ip_address: "::/1"
        - ip_address: "8000::/1"

  tdcore_server_0:
    type: OS::Nova::Server
    properties:
      availability_zone: { get_param: availability_zone_0 }
      scheduler_hints: { group: { get_param: tdcore_server_group } }
      name: { get_param: [ tdcore_names, { get_param: index } ] }
      flavor: { get_param: tdcore_flavor_name }
      image: { get_param: tdcore_image_name }
      metadata:
        vnf_id: {get_param: vnf_id}
        vm_role: tdcore
        vnf_name: {get_param: vnf_name}
        vf_module_id: {get_param: vf_module_id}
        vf_module_name:   {get_param: vf_module_name}
      networks:
        - port: { get_resource: tdcore_internal_0_port_0 }
        - port: { get_resource: tdcore_dpdk_0_port_1 }
      config_drive: True
      user_data_format: RAW
      user_data:
        str_replace:
          template: |
            DN=$dn_name
            DUName=$du_name
            Uuid=$uuid
            SwRepoIp=$swrepo_ip
            CmRepoIp=$cmrepo_ip
            OamDnsIp=$dns_ip
            eth0_MTU=$mtu
            eth1_MTU=$mtu
            UniqueId=$dn_name/$du_name/$release/$uuid
            OAMUnitInternalIp=$oam_unit_ip
            NodeIp=$node_ip
            Netmask=$netmask
            Gateway=$oam_unit_ip
            NodeType=TD_Core
            DUType=CSCF
            Release=$release
            SwRepoPort=5571
            CmRepoPort=8051
            LbGroupId=1
            NodeName=$instance_name
          params:
            $dn_name: { get_param: vcscf_dn }
            $du_name: { get_param: vcscf_du }
            $uuid: { get_param: [ tdcore_uuids, { get_param: index } ] }
            $dns_ip: { get_param: vcscf_dns_address }
            $cmrepo_ip: { get_param: vcscf_cmrepo_address }
            $swrepo_ip: { get_param: vcscf_swrepo_address }
            $oam_unit_ip: { get_param: vcscf_gateway }
            $netmask: { get_param: vcscf_internal_netmask }
            $release: { get_param: vcscf_release }
            $mtu: { get_param: vcscf_internal_network_mtu }
            $node_ip: { get_param: [ tdcore_internal_ips, { get_param: index } ] }
            $instance_name: { get_param: [ tdcore_names, { get_param: index } ] }