aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/duplicateResourceIdsInDiffAddOnFiles/in/module_9_lb2_vota.yml
blob: cfbfdade7978032169e1c756370024a45303f663 (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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
heat_template_version: 2015-04-30

parameters:

###network names
  int_oam_int_net_id:
    type: string
    description: Name of management network to be created
  apps_int_net_id:
    type: string
    description: Name of mirror network to be created
  gwaf_lb2_int_net_id:
    type: string
    description: Name of mirror network to be created

###VM names####
  LB2_name_0:
    type: string
    description: Name of the SVM
  LB2_name_1:
    type: string
    description: Name of the SVM
#####General##########
  lb_key_name:
    type: string
  LB2_flavor_name:
    type: string
    description: Flavor of the end VMs
  LB2_image_name:
    type: string
    description: Name of the end VM LB_image_name
  availability_zone_0:
    type: string
    description: availability zone
  availability_zone_1:
    type: string
    description: availability zone
# aap_core
  aap_core_ip_prefix:
    type: string
    description: ip_prefix for the ServiceInstance
  aap_core_ip_prefix_len:
    type: number
    description: ip_prefix_len for the ServiceInstance
  aap_core_ha_mode:
    type: string
    description: address_mode for the ServiceInstance
  aap_core_mac:
    type: string
    description: mac for the VirtualMachineInterface
####Ip addresses
  lb_oam_int_ip_0:
    type: string
    description: lb ip
  lb_apps_int_ip_0:
    type: string
    description:  lb ip 
  gwaf_lb2_int_ip_0:
    type: string
    description:   lb ip
  lb_oam_int_ip_1:
    type: string
    description:  lb ip
  lb_apps_int_ip_1:
    type: string
    description:   lb ip
  gwaf_lb2_int_ip_1:
    type: string
    description:   lb ip
  vf_module_id:
    type: string
    description: Unique ID for this VF Module instance   
  vnf_id:
    type: string
    description: Name of vOTA instance for ECOMP
  gwaf_lb2_int_sec_group_id: 
    type: string
    description: sec group
  apps_int_sec_group_id: 
    type: string
    description: sec group
  int_oam_int_sec_group_id:
    type: string
    description: sec group
####Health check#########
  shc_enabled:
    type: string
    description: health check
  shc_monitor_type:
    type: string
    description:  health check 
  shc_delay:
    type: string
    description:  health check
  shc_timeout:
    type: string
    description:  health check
  shc_max_retries:
    type: string
    description:  health check
  shc_url_path:
    type: string
    description:  health check
###ECMP hashing#########
  ecmp_hashing_include_fields_hashing_configured:
    type: string
    description:  health check
  ecmp_hashing_include_fields_source_ip:
    type: string
    description:  health check
  ecmp_hashing_include_fields_destination_port:
    type: string
    description:  health check
  ecmp_hashing_include_fields_source_port:
    type: string
    description:  health check
  ecmp_hashing_include_fields_destination_ip:
    type: string
    description:  health check
  ecmp_hashing_include_fields_ip_protocol:
    type: string
    description:  health check

resources:

  lb_0_int_oam_int_0_port:
    type: OS::ContrailV2::VirtualMachineInterface
    properties:
      virtual_machine_interface_properties:
        {
          virtual_machine_interface_properties_service_interface_type: { get_param: int_oam_int_net_id },
        }
      virtual_network_refs: [{ get_param: int_oam_int_net_id }]
      security_group_refs: [{ get_param: int_oam_int_sec_group_id}]

  lb_0_apps_int_1_port:
    type: OS::ContrailV2::VirtualMachineInterface
    properties:
      virtual_machine_interface_properties:
        {
          virtual_machine_interface_properties_service_interface_type: { get_param: apps_int_net_id },
        }
      virtual_network_refs: [{ get_param: apps_int_net_id }]
      security_group_refs: [{ get_param: apps_int_sec_group_id }]

  lb_0_gwaf_lb2_int_2_port:
    type: OS::ContrailV2::VirtualMachineInterface
    properties:
      virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
      service_health_check_refs: 
        - get_resource: lb_gwaf_lb2_hc
      ecmp_hashing_include_fields:
        ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured }
        ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip }
        ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port }
        ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip }
        ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port }
        ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol }
      virtual_machine_interface_allowed_address_pairs:
        {
          virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
            [{
              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
                {
                  virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: aap_core_ip_prefix },
                  virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: aap_core_ip_prefix_len },
                },
              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: aap_core_mac },
              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: aap_core_ha_mode },
            }],
        }
      security_group_refs: [{ get_param: gwaf_lb2_int_sec_group_id }]

  lb_1_int_oam_int_0_port:
    type: OS::ContrailV2::VirtualMachineInterface
    properties:
      virtual_machine_interface_properties:
        {
          virtual_machine_interface_properties_service_interface_type: { get_param: int_oam_int_net_id },
        }
      virtual_network_refs: [{ get_param: int_oam_int_net_id }]
      security_group_refs: [{ get_param: int_oam_int_sec_group_id}]      

  lb_1_apps_int_1_port:
    type: OS::ContrailV2::VirtualMachineInterface
    properties:
      virtual_machine_interface_properties:
        {
          virtual_machine_interface_properties_service_interface_type: { get_param: apps_int_net_id },
        }
      virtual_network_refs: [{ get_param: apps_int_net_id }]
      security_group_refs: [{ get_param: apps_int_sec_group_id }]

  lb_1_gwaf_lb2_int_2_port:
    type: OS::ContrailV2::VirtualMachineInterface
    properties:
      virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
      service_health_check_refs: 
        - get_resource: lb_gwaf_lb2_hc
      ecmp_hashing_include_fields:
        ecmp_hashing_include_fields_hashing_configured: { get_param: ecmp_hashing_include_fields_hashing_configured }
        ecmp_hashing_include_fields_source_ip: { get_param: ecmp_hashing_include_fields_source_ip }
        ecmp_hashing_include_fields_destination_port: { get_param: ecmp_hashing_include_fields_destination_port }
        ecmp_hashing_include_fields_destination_ip: { get_param: ecmp_hashing_include_fields_destination_ip }
        ecmp_hashing_include_fields_source_port: { get_param: ecmp_hashing_include_fields_source_port }
        ecmp_hashing_include_fields_ip_protocol: { get_param: ecmp_hashing_include_fields_ip_protocol }
      virtual_machine_interface_allowed_address_pairs:
        {
          virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
            [{
              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
                {
                  virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: aap_core_ip_prefix },
                  virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: { get_param: aap_core_ip_prefix_len },
                },
              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: { get_param: aap_core_mac },
              virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: { get_param: aap_core_ha_mode },
            }],
        }
      security_group_refs: [{ get_param: gwaf_lb2_int_sec_group_id }]

  lb_0_int_oam_int_0_ip:
    type: OS::ContrailV2::InstanceIp
    depends_on: [ lb_0_int_oam_int_0_port ]
    properties:
      virtual_machine_interface_refs: [{ get_resource: lb_0_int_oam_int_0_port }]
      virtual_network_refs: [{ get_param: int_oam_int_net_id }]
      instance_ip_address: { get_param:  lb_oam_int_ip_0 }


  lb_0_apps_int_1_ip:
    type: OS::ContrailV2::InstanceIp
    depends_on: [ lb_0_apps_int_1_port ]
    properties:
      virtual_machine_interface_refs: [{ get_resource: lb_0_apps_int_1_port }]
      virtual_network_refs: [{ get_param: apps_int_net_id }]
      instance_ip_address: { get_param:  lb_apps_int_ip_0 }


  lb_0_gwaf_lb2_int_2_ip:
    type: OS::ContrailV2::InstanceIp
    depends_on: [ lb_0_gwaf_lb2_int_2_port ]
    properties:
      virtual_machine_interface_refs: [{ get_resource: lb_0_gwaf_lb2_int_2_port }]
      virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
      instance_ip_address: { get_param:  gwaf_lb2_int_ip_0 }


  lb_1_int_oam_int_0_ip:
    type: OS::ContrailV2::InstanceIp
    depends_on: [ lb_1_int_oam_int_0_port ]
    properties:
      virtual_machine_interface_refs: [{ get_resource: lb_1_int_oam_int_0_port }]
      virtual_network_refs: [{ get_param: int_oam_int_net_id }]
      instance_ip_address: { get_param:  lb_oam_int_ip_1 }


  lb_1_apps_int_1_ip:
    type: OS::ContrailV2::InstanceIp
    depends_on: [ lb_1_apps_int_1_port ]
    properties:
      virtual_machine_interface_refs: [{ get_resource: lb_1_apps_int_1_port }]
      virtual_network_refs: [{ get_param: apps_int_net_id }]
      instance_ip_address: { get_param:  lb_apps_int_ip_1 }


  lb_1_gwaf_lb2_int_2_ip:
    type: OS::ContrailV2::InstanceIp
    depends_on: [ lb_1_gwaf_lb2_int_2_port ]
    properties:
      virtual_machine_interface_refs: [{ get_resource: lb_1_gwaf_lb2_int_2_port }]
      virtual_network_refs: [{ get_param: gwaf_lb2_int_net_id }]
      instance_ip_address: { get_param:  gwaf_lb2_int_ip_1 }


  lb_gwaf_lb2_hc:
    type: OS::ContrailV2::ServiceHealthCheck
    properties:
      name: gwaf_lb2_hc_PING
      service_health_check_properties:
        service_health_check_properties_enabled: { get_param: shc_enabled }
        service_health_check_properties_monitor_type: { get_param: shc_monitor_type }
        service_health_check_properties_delay: { get_param: shc_delay }
        service_health_check_properties_timeout: { get_param: shc_timeout }
        service_health_check_properties_max_retries: { get_param: shc_max_retries }
        service_health_check_properties_url_path: { get_param: shc_url_path }



  LB2_0:
    type: OS::Nova::Server
    depends_on: [ lb_0_int_oam_int_0_ip, lb_0_apps_int_1_ip, lb_0_gwaf_lb2_int_2_ip ]
    properties:
      name: {get_param: LB2_name_0 }
      image: { get_param:  LB2_image_name }
      flavor: { get_param: LB2_flavor_name }
      key_name: { get_param: lb_key_name }
      availability_zone: { get_param: availability_zone_0 }
      networks:
        - port: { get_resource: lb_0_int_oam_int_0_port }
        - port: { get_resource: lb_0_apps_int_1_port }
        - port: { get_resource: lb_0_gwaf_lb2_int_2_port }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id:  { get_param: vf_module_id }
      user_data:
        str_replace:
          template: |
          params:
            $lb_loopback: { get_param: LB2_image_name  }

  LB2_1:
    type: OS::Nova::Server
    depends_on: [ lb_1_int_oam_int_0_ip, lb_1_apps_int_1_ip, lb_1_gwaf_lb2_int_2_ip ]
    properties:
      name: {get_param: LB2_name_1 }
      image: { get_param:  LB2_image_name }
      flavor: { get_param: LB2_flavor_name }
      availability_zone: { get_param: availability_zone_1 }
      key_name: { get_param: lb_key_name }
      networks:
        - port: { get_resource: lb_1_int_oam_int_0_port }
        - port: { get_resource: lb_1_apps_int_1_port }
        - port: { get_resource: lb_1_gwaf_lb2_int_2_port }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id:  { get_param: vf_module_id }
      user_data:
        str_replace:
          template: |
          params:
            $lb_loopback: { get_param: LB2_image_name  }