aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/heatPseudoParameters/usedFromNestedHeat/inputfiles/VSR_IOM_template_nested.yaml
blob: 3ef31a07a00a91db39bee09ddecba8ef55a48406 (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
heat_template_version: 2013-05-23

parameters:

  stack_name:
    type: string
    description: Name of the HEAT stack
  availability_zone_0:
    type: string
    description: Availability zone where this component should be instantiated
  iom_image_name:
    type: string
    description: Image to be used for the instance
  iom_flavor_name:
    type: string
    description: Flavor of the VNF to be used
  mgt_net_id:
    type: string
    description: Network used by the Management interface
  mgt_subnet_id:
    type: string
    description: Subnet used by the Management interface
  ctrl_fabric_net_id: 
    type: string
    description: Network used by the Control Fabric interface
  ctrl_fabric_subnet_id: 
    type: string
    description: Subnet used by the Control Fabric interface
  data0_net_id: 
    type: string
    description: Network used by the Data interface
  data0_subnet_id: 
    type: string
    description: Subnet used by the Data interface
  data1_net_id: 
    type: string
    description: Network used by the second Data interface
  data1_subnet_id: 
    type: string
    description: Subnet used by the second Data interface
  data2_net_id: 
    type: string
    description: Network used by the third Data interface
  data2_subnet_id: 
    type: string
    description: Subnet used by the third Data interface
  data3_net_id: 
    type: string
    description: Network used by the fourth Data interface
  data3_subnet_id: 
    type: string
    description: Subnet used by the fourth Data interface
  security_group:
    type: string
    description: Security group to be used
  iom_smbios:
    type: string
    description: Parameters to be passed to the VM at boot up as key-value pairs
  iom_slot:
    type: string
    description: The slot value assigned to the module eg 1, 2, 3, etc
  iom_mtu:
    type: string
    description: MTU size in bytes
  vnf_id:
    type: string
    description: VNF ID
  vm_name:
    type: string
    description: Name of the VM
  vf_module_id:
    type: string
    description: VNF Module ID

resources: 
  iom_mgt_0_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: mgt_net_id }
      security_groups: [ { get_param: security_group} ]
      fixed_ips: [ { subnet_id: { get_param: mgt_subnet_id } } ]

  iom_ctrl_fabric_0_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: ctrl_fabric_net_id }
      security_groups: [ { get_param: security_group} ]
      fixed_ips: [ { subnet_id: { get_param: ctrl_fabric_subnet_id } } ]
      value_specs:
        extra_dhcp_opts:
        - {opt_name: interface-mtu, opt_value: { get_param: iom_mtu } }

  iom_data_0_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: data0_net_id }
      security_groups: [ { get_param: security_group} ]
      binding:vnic_type: "direct"
      value_specs:
        extra_dhcp_opts:
        - {opt_name: interface-mtu, opt_value: { get_param: iom_mtu } }

  iom_data_1_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: data1_net_id }
      security_groups: [ { get_param: security_group} ]
      binding:vnic_type: "direct"
      value_specs:
        extra_dhcp_opts:
        - {opt_name: interface-mtu, opt_value: { get_param: iom_mtu } }

  iom_data_2_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: data2_net_id }
      security_groups: [ { get_param: security_group} ]
      binding:vnic_type: "direct"
      value_specs:
        extra_dhcp_opts:
        - {opt_name: interface-mtu, opt_value: { get_param: iom_mtu } }
        
  iom_data_3_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: data3_net_id }
      security_groups: [ { get_param: security_group} ]
      binding:vnic_type: "direct"
      value_specs:
        extra_dhcp_opts:
        - {opt_name: interface-mtu, opt_value: { get_param: iom_mtu } }
                        
  IOM:
    type: OS::Nova::Server
    depends_on: [ iom_mgt_0_port, iom_ctrl_fabric_0_port, iom_data_0_port, iom_data_1_port, iom_data_2_port, iom_data_3_port ]
    properties:
      name: { get_param: vm_name }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id: { get_param: vf_module_id }
      image: { get_param: iom_image_name }
      flavor: { get_param: iom_flavor_name }
      availability_zone: { get_param: availability_zone_0 }
      config_drive: "true"
      user_data: { get_param: iom_smbios }
      user_data_format: { get_param: 'OS::stack_id' }
      networks:
        - port: { get_resource: iom_mgt_0_port }
        - port: { get_resource: iom_ctrl_fabric_0_port }
        - port: { get_resource: iom_data_0_port }
        - port: { get_resource: iom_data_1_port }
        - port: { get_resource: iom_data_2_port }
        - port: { get_resource: iom_data_3_port }