aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml
blob: 5be9d49bb079074c79d720f589f2e4b7fdee568a (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
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
  dns_key: 
    type: string
    description: server key
  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_int_bearer_ips:
    type: comma_delimited_list
    description: DNS Bearer IP list
  dns_int_bearer_ipv6_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
  route_eth0:
    type: string
    description: OAM network routes 
  index:
    type: number
    description: index parameter
  name_with_index:
    type: string
    description: name parameter which will include the index value
  security_group:
    type: string
    description: security group
  availability_zone_0:
    type: string
    description: availability zone ID or Name
#  this parameter does not follow the D2 Guidelines.  This value will be az0 or az1.
  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_oam_protected_0_port:
    type: OS::Neutron::Port
    properties:
      name:
         str_replace:
           template: VNF_NAME_dns_oam_port
           params:
               VNF_NAME: {get_param: vnf_name}
      network: { get_param: oam_protected_net_name }
      fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_ips, get_param: index ]}}]
      security_groups: [{ get_param: security_group }]
 
  dns_int_bearer_0_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, get_param: index ]}}, { "ip_address": { get_param: [ dns_int_bearer_ipv6_ips, get_param: index ]}}]
      security_groups: [{ get_param: security_group }]

  dns_servers:
    type: OS::Nova::Server
    properties:
      name: { get_param: [ dns_names, get_param: index ] }
      image: { get_param: dns_image_name }
      flavor: { get_param: dns_flavor_name }
      key_name: { get_param: dns_key }
      availability_zone: { get_param: availability_zone_0 }
      networks:
        - port: { get_resource: dns_oam_protected_0_port }
        - port: { get_resource: dns_int_bearer_0_port }
      metadata:
        vnf_id: { get_param: vnf_id }
        vf_module_id: { get_param: vf_module_id }
        vnf_name  {get_param: vnf_name }  
      user_data_format: RAW
      user_data: { get_resource: server_interface_config } 

  server_interface_config:
    type: OS::Heat::CloudConfig
    properties:
      cloud_config:
        write_files:
          - path: /etc/sysconfig/network-scripts/route-eth0
            permissions: "0644"
#           content: { get_file: route-eth0 }    
            content: { get_param: route_eth0 }
 
#outputs:
#  vm_name:
#    description: VM name
#    value: { get_attr: [ dns_servers, name] }
#  networks:
#    description: networks
#    value: { get_attr: [ dns_servers, networks ] }