push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / porttocontrailv2virtualnetworkconnection / shared / inputfiles / main.yml
1 heat_template_version: 2013-05-23
2
3 description: >
4   Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
5
6 parameters:
7   jsa_net_name:
8     type: string
9     description: network name of jsa log network
10   Internal1_cidr:
11     type: string
12   Internal2_cidr:
13     type: string
14   Internal1_default_gateway:
15     type: string
16   Internal2_default_gateway:
17     type: string
18   Internal1_dhcp:
19       type: string
20   Internal2_dhcp:
21     type: string
22   direction:
23     description: dummy
24     type: string
25   dst_port_end:
26     description: dummy
27     type: string
28   dst_port_start:
29     description: dummy
30     type: string
31   left_vn:
32     description: dummy
33     type: string
34   left_vn_fqdn:
35     description: dummy
36     type: string
37   network_ipam_refs_data_ipam_subnets_addr_from_start_true:
38     description: dummy
39     type: string
40   network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2:
41     description: dummy
42     type: string
43   network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2:
44     description: dummy
45     type: string
46   policy_name:
47     description: dummy
48     type: string
49   protocol:
50     description: dummy
51     type: string
52   right_vn_fqdn:
53     description: dummy
54     type: string
55   simple_action:
56     description: dummy
57     type: string
58   src_port_end:
59     description: dummy
60     type: string
61   src_port_start:
62     description: dummy
63     type: string
64   service_instance_fq_name:
65     type: string
66
67 resources:
68   template_NetworkIpam_2:
69     properties:
70       name:
71         get_param: left_vn
72     type: "OS::ContrailV2::NetworkIpam"
73   template_NetworkPolicy:
74     properties:
75       name:
76         get_param: policy_name
77       network_policy_entries:
78         network_policy_entries_policy_rule:
79           -
80             network_policy_entries_policy_rule_action_list:
81               network_policy_entries_policy_rule_action_list_apply_service:
82                 -
83                   get_param: service_instance_fq_name
84               network_policy_entries_policy_rule_action_list_simple_action:
85                 get_param: simple_action
86             network_policy_entries_policy_rule_direction:
87               get_param: direction
88             network_policy_entries_policy_rule_dst_addresses:
89               -
90                 network_policy_entries_policy_rule_dst_addresses_virtual_network:
91                   get_param: right_vn_fqdn
92             network_policy_entries_policy_rule_dst_ports:
93               -
94                 network_policy_entries_policy_rule_dst_ports_end_port:
95                   get_param: dst_port_end
96                 network_policy_entries_policy_rule_dst_ports_start_port:
97                   get_param: dst_port_start
98             network_policy_entries_policy_rule_protocol:
99               get_param: protocol
100             network_policy_entries_policy_rule_src_addresses:
101               -
102                 network_policy_entries_policy_rule_src_addresses_virtual_network:
103                   get_param: left_vn_fqdn
104             network_policy_entries_policy_rule_src_ports:
105               -
106                 network_policy_entries_policy_rule_src_ports_end_port:
107                   get_param: src_port_end
108                 network_policy_entries_policy_rule_src_ports_start_port:
109                   get_param: src_port_start
110     type: "OS::ContrailV2::NetworkPolicy"
111   test_net1:
112     depends_on:
113       - template_NetworkIpam_2
114       - template_NetworkPolicy
115     properties:
116       name:
117         get_param: left_vn
118       network_ipam_refs:
119         -
120           get_resource: template_NetworkIpam_2
121       network_ipam_refs_data:
122         -
123           network_ipam_refs_data_ipam_subnets:
124             -
125               network_ipam_refs_data_ipam_subnets_addr_from_start:
126                 get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
127               network_ipam_refs_data_ipam_subnets_subnet:
128                 network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
129                   get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
130                 network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
131                   get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
132       network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy, fq_name ] } ] } ]
133       network_policy_refs_data:
134         -
135           network_policy_refs_data_sequence:
136             network_policy_refs_data_sequence_major: 0
137             network_policy_refs_data_sequence_minor: 0
138     type: "OS::ContrailV2::VirtualNetwork"
139
140   test_net2:
141     depends_on:
142       - template_NetworkIpam_2
143       - template_NetworkPolicy
144     properties:
145       name:
146         get_param: left_vn
147       network_ipam_refs:
148         -
149           get_resource: template_NetworkIpam_2
150       network_ipam_refs_data:
151         -
152           network_ipam_refs_data_ipam_subnets:
153             -
154               network_ipam_refs_data_ipam_subnets_addr_from_start:
155                 get_param: network_ipam_refs_data_ipam_subnets_addr_from_start_true
156               network_ipam_refs_data_ipam_subnets_subnet:
157                 network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
158                   get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
159                 network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
160                   get_param: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
161       network_policy_refs: [ { list_join: [':', { get_attr: [ template_NetworkPolicy, fq_name ] } ] } ]
162       network_policy_refs_data:
163         -
164           network_policy_refs_data_sequence:
165             network_policy_refs_data_sequence_major: 0
166             network_policy_refs_data_sequence_minor: 0
167     type: "OS::ContrailV2::VirtualNetwork"
168
169 outputs:
170     shared_network_id1:
171       value: {get_resource: test_net1}
172
173     shared_network_id2:
174       value: {get_resource: test_net2}