salt.states.glance

Managing Images in OpenStack Glance

salt.states.glance.image_present(name, visibility=u'public', protected=None, checksum=None, location=None, disk_format=u'raw', wait_for=None, timeout=30)

Checks if given image is present with properties set as specified.

An image should got through the stages 'queued', 'saving' before becoming 'active'. The attribute 'checksum' can only be checked once the image is active. If you don't specify 'wait_for' but 'checksum' the function will wait for the image to become active before comparing checksums. If you don't specify checksum either the function will return when the image reached 'saving'. The default timeout for both is 30 seconds.

Supported properties:
  • visibility ('public' or 'private')
  • protected (bool)
  • checksum (string, md5sum)
  • location (URL, to copy from)
  • disk_format ('raw' (default), 'vhd', 'vhdx', 'vmdk', 'vdi', 'iso', 'qcow2', 'aki', 'ari' or 'ami')