aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/multiHeat/referencedHeatResources/inputs/cmaui.yml
blob: 83d398d218e054fce6d6c8d1edc0b02efd92b4fe (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
heat_template_version: 2013-05-23

#################################
#
#  Changes from MSO 01/26/2016
#  Updated per OPENECOMP feedback
#
#################################

description: cmaui server template for vMMSC

parameters:
  vnf_id:
    type: string
    description: Unique ID for this VNF instance
    default: This_is_ths_MMSC-CMAUI_id
  cmaui_names:
    type: comma_delimited_list
    description: CMAUI1, CMAUI2 server names
  cmaui_image:
    type: string
    description: Image for CMAUI server
  cmaui_flavor:
    type: string
    description: Flavor for CMAUI server
  cmaui_cinder_volume_size:
     type: number
     label: CMAUI Cinder volume size
     description: the size of the CMAUI Cinder volume
  availability_zone_0:
    type: string
    label: availabilityzone name
    description: availabilityzone name
  oam_net_name:
    type: string
    description: UID of OAM network
  oam_network_netmask:
    type: string
    label: oam network netmask
    description: oam network gateway
  oam_network_gateway:
    type: string
    label: oam network gateway
    description: oam network gateway
  external_dns:
    type: string
    label: dns server
    description: dns server
  external_ntp:
    type: string
    label: ntp server 
    description: ntp server
  security_group_name:
    type: string
    label: security group name
    description: the name of security group
  timezone:
    type: string
    label: timezone
    description: timezone
  cmaui_oam_ips:
    type: comma_delimited_list
    label: CMAUI oam_net IP addresses
    description: CMAUI oam_net IP addresses
  CMAUI_volume_type:
    type: string
    label: CMAUI vm volume type
    description: the name of the target volume backend

resources:
  server_cmaui:
    type: eca_oam.yaml
    properties:
      cmaui_name: { get_param: [cmaui_names, 0]}
      cmaui_image: { get_param: cmaui_image }
      availability_zone_0: { get_param: availability_zone_0 }
      cmaui_flavor: { get_param: cmaui_flavor }
      networks:
      - port: { get_resource: cmaui_port_0 }
      metadata:
        vnf_id: { get_param: vnf_id }
      user_data:
        str_replace:
          template: |
            cmaui.mgmt.ip=${cmaui.mgmt.ip}
            cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
            cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
            cmaui.external.dns=${cmaui.external.dns}
            cmaui.external.ntp=${cmaui.external.ntp}
            cmaui.node=${cmaui.node}
            cmaui.timezone=${cmaui.timezone}
          params:
            ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 0]} 
            ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
            ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
            ${cmaui.external.dns}: {get_param: external_dns}
            ${cmaui.external.ntp}: {get_param: external_ntp}
            ${cmaui.node}: {get_param: [cmaui_names, 0]} 
            ${cmaui.timezone}: {get_param: timezone}
      user_data_format: RAW 

  cmaui_volume:
     type: OS::Cinder::Volume
     properties:
       size: {get_param: cmaui_cinder_volume_size}
       volume_type: {get_param: CMAUI_volume_type}

  cmaui_volume_attachment:
     type: OS::Cinder::VolumeAttachment
     properties:
       volume_id: {get_resource: cmaui_volume}
       instance_uuid: {get_resource: server_cmaui}

  cmaui_port_0:
    type: OS::Neutron::Port
    properties:
      network: { get_param: oam_net_name }
      fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  server_cmaui1:
    type: OS::Nova::Server
    properties:
      name: { get_param: [cmaui_names, 1]}
      image: { get_param: cmaui_image }
      availability_zone: { get_param: availability_zone_0 }
      flavor: { get_param: cmaui_flavor }
      networks:
      - port: { get_resource: cmaui1_port_0 }
      metadata:
        vnf_id: { get_param: vnf_id }
      user_data:
        str_replace:
          template: |
            cmaui.mgmt.ip=${cmaui.mgmt.ip}
            cmaui.mgmt.netmask=${cmaui.mgmt.netmask}
            cmaui.mgmt.gateway=${cmaui.mgmt.gateway}
            cmaui.external.dns=${cmaui.external.dns}
            cmaui.external.ntp=${cmaui.external.ntp}
            cmaui.node=${cmaui.node}
            cmaui.timezone=${cmaui.timezone}
          params:
            ${cmaui.mgmt.ip}: {get_param: [cmaui_oam_ips, 1]} 
            ${cmaui.mgmt.netmask}: {get_param: oam_network_netmask}
            ${cmaui.mgmt.gateway}: {get_param: oam_network_gateway}
            ${cmaui.external.dns}: {get_param: external_dns}
            ${cmaui.external.ntp}: {get_param: external_ntp}
            ${cmaui.node}: {get_param: [cmaui_names, 1]} 
            ${cmaui.timezone}: {get_param: timezone}
      user_data_format: RAW 

  cmaui1_volume:
     type: OS::Cinder::Volume
     properties:
       size: {get_param: cmaui_cinder_volume_size}
       volume_type: {get_param: CMAUI_volume_type}

  cmaui1_volume_attachment:
     type: OS::Cinder::VolumeAttachment
     properties:
       volume_id: {get_resource: cmaui1_volume}
       instance_uuid: {get_resource: server_cmaui1}

  cmaui1_port_0:
    type: OS::Neutron::Port
    properties:
      network: { get_param: oam_net_name }
      fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 1]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO