Jon Perritt | 034ef07 | 2015-02-03 13:14:44 -0700 | [diff] [blame] | 1 | package stacks |
| 2 | |
| 3 | import ( |
| 4 | "github.com/rackspace/gophercloud" |
| 5 | os "github.com/rackspace/gophercloud/openstack/orchestration/v1/stacks" |
Jon Perritt | 2870e04 | 2015-02-04 15:50:08 -0700 | [diff] [blame] | 6 | "github.com/rackspace/gophercloud/pagination" |
Jon Perritt | 034ef07 | 2015-02-03 13:14:44 -0700 | [diff] [blame] | 7 | ) |
| 8 | |
| 9 | // Create accepts an os.CreateOpts struct and creates a new stack using the values |
| 10 | // provided. |
| 11 | func Create(c *gophercloud.ServiceClient, opts os.CreateOptsBuilder) os.CreateResult { |
| 12 | return os.Create(c, opts) |
| 13 | } |
Jon Perritt | 1d3bc4b | 2015-02-04 12:06:19 -0700 | [diff] [blame] | 14 | |
| 15 | // Adopt accepts an os.AdoptOpts struct and creates a new stack from existing stack |
| 16 | // resources using the values provided. |
| 17 | func Adopt(c *gophercloud.ServiceClient, opts os.AdoptOptsBuilder) os.AdoptResult { |
| 18 | return os.Adopt(c, opts) |
| 19 | } |
Jon Perritt | 2870e04 | 2015-02-04 15:50:08 -0700 | [diff] [blame] | 20 | |
| 21 | // List accepts an os.ListOpts struct and lists stacks based on the options provided. |
| 22 | func List(c *gophercloud.ServiceClient, opts os.ListOptsBuilder) pagination.Pager { |
| 23 | return os.List(c, opts) |
| 24 | } |
Jon Perritt | a6346d9 | 2015-02-04 17:54:52 -0700 | [diff] [blame] | 25 | |
| 26 | // Update accepts an os.UpdateOpts struct and updates a stack based on the options provided. |
| 27 | func Update(c *gophercloud.ServiceClient, stackName, stackID string, opts os.UpdateOptsBuilder) os.UpdateResult { |
| 28 | return os.Update(c, stackName, stackID, opts) |
| 29 | } |
Jon Perritt | 27a0b3e | 2015-02-04 18:04:35 -0700 | [diff] [blame] | 30 | |
| 31 | // Delete deletes a stack based on the stack name and stack ID provided. |
| 32 | func Delete(c *gophercloud.ServiceClient, stackName, stackID string) os.DeleteResult { |
| 33 | return os.Delete(c, stackName, stackID) |
| 34 | } |
Jon Perritt | 68c2717 | 2015-02-04 18:55:38 -0700 | [diff] [blame^] | 35 | |
| 36 | // Preview provides a preview of a stack based on the options provided. |
| 37 | func Preview(c *gophercloud.ServiceClient, opts os.PreviewOptsBuilder) os.PreviewResult { |
| 38 | return os.Preview(c, opts) |
| 39 | } |