Module for handling openstack glance calls.
optdepends: |
|
---|---|
configuration: |
This module is not usable until the following are specified either in a pillar or in the minion's config file: keystone.user: admin keystone.password: verybadpass keystone.tenant: admin keystone.insecure: False #(optional) keystone.auth_url: 'http://127.0.0.1:5000/v2.0/' 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 glance functions can make use of a configuration profile by declaring it explicitly. For example: salt '*' glance.image_list profile=openstack1
|
Create an image (glance image-create)
CLI Example, old format:
salt '*' glance.image_create name=f16-jeos \ disk_format=qcow2 container_format=ovf
CLI Example, new format resembling Glance API v2:
salt '*' glance.image_create name=f16-jeos visibility=public \ disk_format=qcow2 container_format=ovf
The parameter 'visibility' defaults to 'public' if not specified.
Delete an image (glance image-delete)
CLI Examples:
salt '*' glance.image_delete c2eb2eb0-53e1-4a80-b990-8ec887eae7df salt '*' glance.image_delete id=c2eb2eb0-53e1-4a80-b990-8ec887eae7df salt '*' glance.image_delete name=f16-jeos
Return a list of available images (glance image-list)
CLI Example:
salt '*' glance.image_list
Returns names and descriptions of the schema "image"'s properties for this profile's instance of glance
CLI Example:
salt '*' glance.image_schema
Return details about a specific image (glance image-show)
CLI Example:
salt '*' glance.image_show
Update properties of given image. Known to work for: - min_ram (in MB) - protected (bool) - visibility ('public' or 'private')
CLI Example:
salt '*' glance.image_update id=c2eb2eb0-53e1-4a80-b990-8ec887eae7df salt '*' glance.image_update name=f16-jeos
CLI Example:
salt '*' glance.schema_get name=f16-jeos
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.glance.html