blob: c3d2cdbeffbf1e03532773a7d13afa964076a716 [file] [log] [blame]
Jon Perrittefe6d1f2015-02-09 12:04:06 -07001package buildinfo
2
3import (
Jon Perritt27249f42016-02-18 10:35:59 -06004 "github.com/gophercloud/gophercloud"
Jon Perrittefe6d1f2015-02-09 12:04:06 -07005)
6
Jon Perritt99f63122015-02-11 12:39:55 -07007// Revision represents the API/Engine revision of a Heat deployment.
Jon Perrittefe6d1f2015-02-09 12:04:06 -07008type Revision struct {
Jon Perritt3c166472016-02-25 03:07:41 -06009 Revision string `json:"revision"`
Jon Perrittefe6d1f2015-02-09 12:04:06 -070010}
11
12// BuildInfo represents the build information for a Heat deployment.
13type BuildInfo struct {
Jon Perritt3c166472016-02-25 03:07:41 -060014 API Revision `json:"api"`
15 Engine Revision `json:"engine"`
Jon Perrittefe6d1f2015-02-09 12:04:06 -070016}
17
18// GetResult represents the result of a Get operation.
19type GetResult struct {
20 gophercloud.Result
21}
22
23// Extract returns a pointer to a BuildInfo object and is called after a
24// Get operation.
25func (r GetResult) Extract() (*BuildInfo, error) {
Jon Perritt3c166472016-02-25 03:07:41 -060026 var s *BuildInfo
27 err := r.ExtractInto(&s)
28 return s, err
Jon Perrittefe6d1f2015-02-09 12:04:06 -070029}