blob: 3bf800e311fe751b9c81e53b2a0d619d016075a9 [file] [log] [blame]
Jon Perritt034ef072015-02-03 13:14:44 -07001package stacks
2
3import (
4 "github.com/rackspace/gophercloud"
5 os "github.com/rackspace/gophercloud/openstack/orchestration/v1/stacks"
Jon Perritt2870e042015-02-04 15:50:08 -07006 "github.com/rackspace/gophercloud/pagination"
Jon Perritt034ef072015-02-03 13:14:44 -07007)
8
9// Create accepts an os.CreateOpts struct and creates a new stack using the values
10// provided.
11func Create(c *gophercloud.ServiceClient, opts os.CreateOptsBuilder) os.CreateResult {
12 return os.Create(c, opts)
13}
Jon Perritt1d3bc4b2015-02-04 12:06:19 -070014
15// Adopt accepts an os.AdoptOpts struct and creates a new stack from existing stack
16// resources using the values provided.
17func Adopt(c *gophercloud.ServiceClient, opts os.AdoptOptsBuilder) os.AdoptResult {
18 return os.Adopt(c, opts)
19}
Jon Perritt2870e042015-02-04 15:50:08 -070020
21// List accepts an os.ListOpts struct and lists stacks based on the options provided.
22func List(c *gophercloud.ServiceClient, opts os.ListOptsBuilder) pagination.Pager {
23 return os.List(c, opts)
24}
Jon Perritta6346d92015-02-04 17:54:52 -070025
26// Update accepts an os.UpdateOpts struct and updates a stack based on the options provided.
27func Update(c *gophercloud.ServiceClient, stackName, stackID string, opts os.UpdateOptsBuilder) os.UpdateResult {
28 return os.Update(c, stackName, stackID, opts)
29}
Jon Perritt27a0b3e2015-02-04 18:04:35 -070030
31// Delete deletes a stack based on the stack name and stack ID provided.
32func Delete(c *gophercloud.ServiceClient, stackName, stackID string) os.DeleteResult {
33 return os.Delete(c, stackName, stackID)
34}