# salt.modules.heat

Module for handling OpenStack Heat calls

New in version 2017.7.0.

depends:

  - heatclient Python module

configuration:

  This module is not usable until the user, password, tenant, and auth URL are specified either in a pillar or in the minion's config file. For example:

      keystone.user: admin
      keystone.password: verybadpass
      keystone.tenant: admin
      keystone.insecure: False   #(optional)
      keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
      # Optional
      keystone.region_name: 'RegionOne'

  If configuration for multiple OpenStack accounts is required, they can be set up as different configuration profiles: For example:

      openstack1:
        keystone.user: admin
        keystone.password: verybadpass
        keystone.tenant: admin
        keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'

      openstack2:
        keystone.user: admin
        keystone.password: verybadpass
        keystone.tenant: admin
        keystone.auth_url: 'http://127.0.0.2:5000/v2.0/'

  With this configuration in place, any of the heat functions can make use of a configuration profile by declaring it explicitly. For example:

      salt '*' heat.flavor_list profile=openstack1

salt.modules.heat.create_stack(name=None, template_file=None, environment=None, parameters=None, poll=0, rollback=False, timeout=60, profile=None)

  Create a stack (heat stack-create)

  name

    Name of the new stack

  template_file

    File of template

  environment

    File of environment

  parameters

    Parameter dict used to create the stack

  poll

    Poll and report events until stack complete

  rollback

    Enable rollback on create failure

  timeout

    Stack creation timeout in minutes

  profile

    Profile to build on

  CLI Example:

      salt '*' heat.create_stack name=mystack \
               template_file=salt://template.yaml \
               environment=salt://environment.yaml \
               parameters="{"image": "Debian 8", "flavor": "m1.small"}" \
               poll=5 rollback=False timeout=60 profile=openstack1

  New in version 2017.7.5,2018.3.1: The spelling mistake in parameter enviroment was corrected to environment. The enviroment spelling mistake has been removed in Salt 3000.

salt.modules.heat.delete_stack(name=None, poll=0, timeout=60, profile=None)

  Delete a stack (heat stack-delete)

  name

    Name of the stack

  poll

    Poll and report events until stack complete

  timeout

    Stack creation timeout in minute

  profile

    Profile to use

  CLI Examples:

      salt '*' heat.delete_stack name=mystack poll=5 \
               profile=openstack1

salt.modules.heat.list_stack(profile=None)

  Return a list of available stack (heat stack-list)

  profile

    Profile to use

  CLI Example:

      salt '*' heat.list_stack profile=openstack1

salt.modules.heat.show_stack(name=None, profile=None)

  Return details about a specific stack (heat stack-show)

  name

    Name of the stack

  profile

    Profile to use

  CLI Example:

      salt '*' heat.show_stack name=mystack profile=openstack1

salt.modules.heat.template_stack(name=None, profile=None)

  Return template a specific stack (heat stack-template)

  name

    Name of the stack

  profile

    Profile to use

  CLI Example:

      salt '*' heat.template_stack name=mystack profile=openstack1

salt.modules.heat.update_stack(name=None, template_file=None, environment=None, parameters=None, poll=0, rollback=False, timeout=60, profile=None)

  Update a stack (heat stack-template)

  name

    Name of the stack

  template_file

    File of template

  environment

    File of environment

  parameters

    Parameter dict used to update the stack

  poll

    Poll and report events until stack complete

  rollback

    Enable rollback on update failure

  timeout

    Stack creation timeout in minutes

  profile

    Profile to build on

  CLI Example:

      salt '*' heat.update_stack name=mystack \
               template_file=salt://template.yaml \
               environment=salt://environment.yaml \
               parameters="{"image": "Debian 8", "flavor": "m1.small"}" \
               poll=5 rollback=False timeout=60 profile=openstack1

  New in version 2017.7.5,2018.3.1: The spelling mistake in parameter enviroment was corrected to environment. The enviroment spelling mistake has been removed in Salt 3000.