heat_template_version: 2013-05-23

description:
  HOT template that creates a Generic Neutron Network

parameters:
  network_name:
     type: string
     description: Name of direct network (e.g. core, dmz)
     default: ECOMPNetwork
  network_subnet_name:
     type: string
     description: Name of subnet network (e.g. core, dmz)
     default: ECOMPNetwork
  network_subnet_cidr:
     type: string
     description: CIDR of subnet network (e.g. core, dmz)
     default: 10.0.0.0/16

outputs:
  network_id:
    description: Openstack network identifier
    value: { get_resource: network }
  network_fqdn:
    description: Openstack network identifier
    value: {list_join: [':', { get_attr: [network, fq_name] } ] }

resources:
              network:
                type: OS::Neutron::Net
                properties:
                name: {get_param: network_name }

              subnet:
                type: OS::Neutron::Subnet
                properties:
                name: { get_param: network_subnet_name  }
                network_id: { get_resource: network }
                cidr: { get_param: network_subnet_cidr }
                enable_dhcp: false
