#
# Minimal HOT template defining a single compute server.
#
heat_template_version: 2013-05-23

description: >
  Minimal HOT template for stack

parameters:
  key_name:
    type: string
    description: Name of an existing key pair to use for the server
    constraints:
      - custom_constraint: nova.keypair
  flavor:
    type: string
    description: Flavor for the server to be created
    default: m1.small
    constraints:
      - custom_constraint: nova.flavor
  image:
    type: string
    description: Image ID or image name to use for the server
    constraints:
      - custom_constraint: glance.image
  network:
    type: string
    description: Network used by the server

resources:
  server:
    type: OS::Nova::Server
    properties:
      key_name: { get_param: key_name }
      image: { get_param: image }
      flavor: { get_param: flavor }
      networks: [{network: {get_param: network} }]

outputs:
  server_networks:
    description: The networks of the deployed server
    value: { get_attr: [server, networks] }
