summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/neutron_dual_stacks/inputfiles/Use_Case_1_module.yaml
blob: b78778564367c15f78910831ab123a4cd129ddc3 (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
heat_template_version: 2014-10-16

description: |
  nested DNS template for a single VM
  all parameters are passed from calling heat template of resourcegroup

parameters:
  dns_image_name: 
    type: string
    description: server image
  dns_flavor_name: 
    type: string
    description: server flavor
  oam_protected_net_name:
    type: string
    description: OAM network where instaces will connect
  int_bearer_net_name:
    type: string
    description: Bearer network where instaces will connect
  dns_oam_protected_ips:
    type: comma_delimited_list
    description: DNS OAM IP list
  dns_oam_protected_v6_ips:
        type: comma_delimited_list
        description: DNS OAM IP list
  dns_int_bearer_ips:
    type: comma_delimited_list
    description: DNS Bearer IP list
  dns_int_bearer_v6_ips:
    type: comma_delimited_list
    description: fixed IPv6 assignment for VM's on the Bearer network
  dns_names:
    type: comma_delimited_list
    description: server name
  security_group:
    type: string
    description: security group
  availability_zone_0:
    type: string
    description: availability zone ID or Name
  availability_zone_1:
    type: string
    description: availability zone ID or Name
  vnf_name:
    type: string
    description: Unique name for this VF instance
#   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
  vnf_id:
    type: string
    description: Unique ID for this VF instance
#   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
  vf_module_id:
    type: string
    description: Unique ID for this VF module instance
#   For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC
    
resources:

  dns_0_oam_protected_port_0:
    type: OS::Neutron::Port
    properties:
      name:
         str_replace:
           template: VNF_NAME_dns_0_oam_protected_port_0
           params:
               VNF_NAME: {get_param: vnf_name}
      network: { get_param: oam_protected_net_name }
      allowed_address_pairs: [{ "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
      security_groups: [{ get_param: security_group }]

  dns_0_oam_protected_port_1:
    type: OS::Neutron::Port
    properties:
      name:
         str_replace:
           template: VNF_NAME_dns_0_oam_protected_port_1
           params:
               VNF_NAME: {get_param: vnf_name}
      network: { get_param: oam_protected_net_name }
      fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips_v6_ips, 0 ]}}]
      security_groups: [{ get_param: security_group }]
 
  dns_0_int_bearer_port:
    type: OS::Neutron::Port
    properties:
      name:
        str_replace:
          template: VNF_NAME_dns_bearer_port
          params:
              VNF_NAME: {get_param: vnf_name}
      network: { get_param: int_bearer_net_name }
      fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer_v6_ips, 0 ]}}]
      allowed_address_pairs: [{ "ip_address": { get_param: [ dns_int_bearer, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer, 0 ]}}]
      security_groups: [{ get_param: security_group }]

  dns_server_0:
    type: OS::Nova::Server
    properties:
      name: { get_param: [ dns_names, 0 ] }
      image: { get_param: dns_image_name }
      flavor: { get_param: dns_flavor_name }
      availability_zone: { get_param: availability_zone_0 }
      networks:
        - port: { get_resource: dns_0_oam_protected_port_0 }
        - port: { get_resource: dns_0_oam_protected_port_1 }
        - port: { get_resource: dns_0_int_bearer_port }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id: { get_param: vf_module_id }
        vnf_name:  {get_param: vnf_name }  

  dns_1_oam_protected_port_0:
    type: OS::Neutron::Port
    properties:
      name:
         str_replace:
           template: VNF_NAME_dns_1_oam_protected_port_0
           params:
               VNF_NAME: {get_param: vnf_name}
      network: { get_param: oam_protected_net_name }
      fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_ips, 6 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 7 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
      allowed_address_pairs: [{ "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
      security_groups: [{ get_param: security_group }]

  dns_1_oam_protected_port_1:
    type: OS::Neutron::Port
    properties:
      name:
         str_replace:
           template: VNF_NAME_dns_1_oam_protected_port_1
           params:
               VNF_NAME: {get_param: vnf_name}
      network: { get_param: oam_protected_net_name }
      fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_v6_ips, 6 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 7 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}]
      allowed_address_pairs: [{ "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 4 ]}}, { "ip_address": { get_param: [ dns_oam_protected_ips, 5 ]}}, { "ip_address": { get_param: [ dns_oam_protected_floating_v6_ip, 5 ]}}]
      security_groups: [{ get_param: security_group }]
 
  dns_1_int_bearer_port:
    type: OS::Neutron::Port
    properties:
      name:
        str_replace:
          template: VNF_NAME_dns_bearer_port
          params:
              VNF_NAME: {get_param: vnf_name}
      network: { get_param: int_bearer_net_name }
      fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer_v6_ips, 0 ]}}]
      allowed_address_pairs: [{ "ip_address": { get_param: [ dns_int_bearer_floating_v6_ip, 0 ]}}, { "ip_address": { get_param: [ dns_int_bearer_floating_v6_ip, 0 ]}}]
      security_groups: [{ get_param: security_group }]

  dns_server_1:
    type: OS::Nova::Server
    properties:
      name: { get_param: [ dns_names, 1 ] }
      image: { get_param: dns_image_name }
      flavor: { get_param: dns_flavor_name }
      availability_zone: { get_param: availability_zone_1 }
      networks:
        - port: { get_resource: dns_1_oam_protected_port_0 }
        - port: { get_resource: dns_1_oam_protected_port_1 }
        - port: { get_resource: dns_1_int_bearer_port }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id: { get_param: vf_module_id }
        vnf_name:  {get_param: vnf_name }