images

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceImagesImage

func DataSourceImagesImage() *schema.Resource

func NewImagesDataSource added in v0.4.2

func NewImagesDataSource() datasource.DataSource

func ResourceImagesImage

func ResourceImagesImage() *schema.Resource

Types

type ImageModel added in v0.4.2

type ImageModel struct {
	ID         types.String `tfsdk:"id"`
	Name       types.String `tfsdk:"name"`
	Properties types.Map    `tfsdk:"properties"`
}

type ImagesDataSource added in v0.4.2

type ImagesDataSource struct {
	// contains filtered or unexported fields
}

func (*ImagesDataSource) Configure added in v0.4.2

func (*ImagesDataSource) Metadata added in v0.4.2

func (*ImagesDataSource) Read added in v0.4.2

func (*ImagesDataSource) Schema added in v0.4.2

type ImagesDataSourceModel added in v0.4.2

type ImagesDataSourceModel struct {
	ID     types.String `tfsdk:"id"`
	Region types.String `tfsdk:"region"`

	CreatedAt  types.String `tfsdk:"created_at"`
	Default    types.Bool   `tfsdk:"default"`
	Images     []ImageModel `tfsdk:"images"`
	Owner      types.String `tfsdk:"owner"`
	Properties types.Map    `tfsdk:"properties"`
	SizeMin    types.Int64  `tfsdk:"size_min"`
	SizeMax    types.Int64  `tfsdk:"size_max"`
	Tags       types.List   `tfsdk:"tags"`
	UpdatedAt  types.String `tfsdk:"updated_at"`
	Visibility types.String `tfsdk:"visibility"`
}

type ListOpts added in v0.4.2

type ListOpts struct {
	// ID is the ID of the image.
	// Multiple IDs can be specified by constructing a string
	// such as "in:uuid1,uuid2,uuid3".
	ID string `q:"id"`

	// Integer value for the limit of values to return.
	Limit int `q:"limit"`

	// UUID of the server at which you want to set a marker.
	Marker string `q:"marker"`

	// Name filters on the name of the image.
	// Multiple names can be specified by constructing a string
	// such as "in:name1,name2,name3".
	Name string `q:"name"`

	// Visibility filters on the visibility of the image.
	Visibility images.ImageVisibility `q:"visibility"`

	// Hidden filters on the hidden status of the image.
	Hidden bool `q:"os_hidden"`

	// MemberStatus filters on the member status of the image.
	MemberStatus images.ImageMemberStatus `q:"member_status"`

	// Owner filters on the project ID of the image.
	Owner string `q:"owner"`

	// Status filters on the status of the image.
	// Multiple statuses can be specified by constructing a string
	// such as "in:saving,queued".
	Status images.ImageStatus `q:"status"`

	// SizeMin filters on the size_min image property.
	SizeMin int64 `q:"size_min"`

	// SizeMax filters on the size_max image property.
	SizeMax int64 `q:"size_max"`

	// Sort sorts the results using the new style of sorting. See the OpenStack
	// Image API reference for the exact syntax.
	//
	// Sort cannot be used with the classic sort options (sort_key and sort_dir).
	Sort string `q:"sort"`

	// SortKey will sort the results based on a specified image property.
	SortKey string `q:"sort_key"`

	// SortDir will sort the list results either ascending or decending.
	SortDir string `q:"sort_dir"`

	// Tags filters on specific image tags.
	Tags []string `q:"tag"`

	// CreatedAtQuery filters images based on their creation date.
	CreatedAtQuery *images.ImageDateQuery

	// UpdatedAtQuery filters images based on their updated date.
	UpdatedAtQuery *images.ImageDateQuery

	// ContainerFormat filters images based on the container_format.
	// Multiple container formats can be specified by constructing a
	// string such as "in:bare,ami".
	ContainerFormat string `q:"container_format"`

	// DiskFormat filters images based on the disk_format.
	// Multiple disk formats can be specified by constructing a string
	// such as "in:qcow2,iso".
	DiskFormat string `q:"disk_format"`

	// Properties filters images based on additional properties, if any, that
	// are associated with images.
	Properties map[string]string
}

ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the server attributes you want to see returned. Marker and Limit are used for pagination.

http://developer.openstack.org/api-ref-image-v2.html

func (ListOpts) ToImageListQuery added in v0.4.2

func (opts ListOpts) ToImageListQuery() (string, error)

ToImageListQuery formats a ListOpts into a query string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL