aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/restapi-templates/src/main/json/lcm-dmaap-publish-template.json
blob: 67d8b1d402f3c98fa786d2549f5467ab2d08935e (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
{
    "version": ${lcm-dmaap.version},
    "cambria.partition": ${lcm-dmaap.partition},
    "correlation-id": ${lcm-dmaap.correlation-id},
    "rpc-name": ${lcm-dmaap.rpc-name},
    "type": ${lcm-dmaap.type},
    "body": {
        "output": {
            "common-header": {
                "api-ver": ${lcm-dmaap.api-ver},
                "flags": {
                    "ttl": ${lcm-dmaap.flags.ttl},
                    "force": ${lcm-dmaap.flags.force},
                    "mode": ${lcm-dmaap.flags.mode}
                },
                "originator-id": ${lcm-dmaap.originator-id},
                "request-id": ${lcm-dmaap.request-id},
                "sub-request-id": ${lcm-dmaap.sub-request-id},
                "timestamp": ${lcm-dmaap.timestamp}
            },
            "payload": ${lcm-dmaap.payload},
            "status": {
                "code": ${lcm-dmaap.status.code},
                "message": ${lcm-dmaap.status.message}
            }
        }
    }
}
olor: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
heat_template_version: 2013-05-23

description: heat template that creates PCRF Policy Server stack

parameters:
  pcrf_pps_server_name:
    type: string
    label: PCRF PS server name
    description: PCRF PS server name
  pcrf_pps_image_name:
    type: string
    label: PCRF PS image name
    description: PCRF PS image name
  pcrf_pps_flavor_name:
    type: string
    label: PCRF PS flavor name
    description: flavor name of PCRF PS instance
  availabilityzone_name:
    type: string
    label: availabilityzone name
    description: availabilityzone name
  pcrf_cps_net_name:
    type: string
    label: CPS network name
    description: CPS network name
  pcrf_cps_net_ip:
    type: string
    label: CPS network ip
    description: CPS network ip
  pcrf_cps_net_mask:
    type: string
    label: CPS network mask
    description: CPS network mask
  pcrf_security_group_name:
    type: string
    label: security group name
    description: the name of security group
  pcrf_vnf_id:
    type: string
    label: PCRF VNF Id
    description: PCRF VNF Id

resources:
  script_init:
    type: OS::Heat::SoftwareConfig
    properties:
      group: ungrouped
      config:
        str_replace:
          params:
            $vm_name: { get_param: pcrf_pps_server_name }
  network:
    type: OS::Heat::CloudConfig
    properties:
      cloud_config:
        write_files:
          - path: /etc/sysconfig/network-scripts/ifcfg-eth0
            permissions: "0644"
            content:
              str_replace:
                params:
                  $dev: eth0
                  $ip: { get_param: pcrf_cps_net_ip }
                  $netmask: { get_param: pcrf_cps_net_mask }
        runcmd:
          - ifdown eth0 && ifup eth0

  pcrf_server_init:
    type: OS::Heat::MultipartMime
    properties:
      parts:
      - config: { get_resource: network}
      - config: { get_resource: script_init}

  pcrf_server_pps:
    type: OS::Nova::Server
    properties:
      config_drive: "True"
      name: { get_param: pcrf_pps_server_name }
      image: { get_param: pcrf_pps_image_name }
      flavor: { get_param: pcrf_pps_flavor_name }
      availability_zone: { get_param: availabilityzone_name }
      networks:
        - port: { get_resource: pcrf_pps_port_0}
      user_data_format: RAW
      user_data:
        get_resource: pcrf_server_init
      metadata:
        vnf_id: {get_param: pcrf_vnf_id}

  pcrf_pps_port_0:
    type: OS::Neutron::Port
    properties:
      network: { get_param: pcrf_cps_net_name }
      fixed_ips:
        - ip_address: { get_param: pcrf_cps_net_ip }
      security_groups: [{ get_param: pcrf_security_group_name }]