Document for available HOT custom constraints

Bug #1453718 reported by Joanna H. Huang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Mark Vanderwiel

Bug Description

The HOT custom constraints on parameters are very useful for verifying user inputs while creating a stack. For instance, the following parameter definition will only allow valid value of instance flavor known to Nova:

  flavor:
    type: string
    label: Instance Flavor
    default: m1.medium
    description: The flavor to use
    constraints:
      - custom_constraint: nova.flavor
        description: Instance Flavor must be a flavor known to Nova

However, it is lacking of document to describe the currently available custom constraints implemented in various Heat resource plugins. I checked Heat Engine source code and found the following custom constraints:

  cinder.volume
  cinder.vtype
  cinder.snapshot
  glance.image
  keystone.domain
  neutron.network
  neutron.router
  neutron.port
  neutron.subnet
  nova.flavor
  nova.keypair
  nova.server
  sahara.image
  trove.flavor

It would be good to have some document collecting information about all available custom constraints for HOT parameters.

Joanna H. Huang (hhuang)
description: updated
Joanna H. Huang (hhuang)
description: updated
Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

Joanna, you do not have to check the source code of the engine. Since all custom constraints are implemented as stevedore plugins, this section of setup.cfg [1] gives you the full list of constraints available in the main code tree. Other resource / client plugins (like those in contrib) might add additional constraints.

[1] https://github.com/openstack/heat/blob/master/setup.cfg#L60-L74

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

This could be automatically generated by sphinx, like our resource types

http://git.openstack.org/cgit/openstack/heat/tree/doc/source/ext/resources.py

tags: added: documentation
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
Changed in heat:
assignee: nobody → Mark Vanderwiel (vanderwl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/225295

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/225295
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6b837a85ff2f2ebcbf02e2a457586d5a6625d1c7
Submitter: Jenkins
Branch: master

commit 6b837a85ff2f2ebcbf02e2a457586d5a6625d1c7
Author: Mark Vanderwiel <email address hidden>
Date: Fri Sep 18 14:57:47 2015 -0500

    Add table of custom constraints to hot spec

    Added a generic sphinx extension to allow text from a file to
    be pulled into the documentation in simple table format.
    It allows flexibility to be used for other types of
    list of heat configuration data in the future.

    Change-Id: I96c936df3bc42c385e73a8dc76c0f9a29e17ea3f
    Closes-Bug: #1453718

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
milestone: none → liberty-rc1
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-rc1 → 5.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.