File: delegate.go

package info (click to toggle)
golang-github-rackspace-gophercloud 1.0.0%2Bgit20161013.1012.e00690e8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,148 kB
  • ctags: 6,414
  • sloc: sh: 16; makefile: 6
file content (49 lines) | stat: -rw-r--r-- 1,866 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package stacks

import (
	"github.com/rackspace/gophercloud"
	os "github.com/rackspace/gophercloud/openstack/orchestration/v1/stacks"
	"github.com/rackspace/gophercloud/pagination"
)

// Create accepts an os.CreateOpts struct and creates a new stack using the values
// provided.
func Create(c *gophercloud.ServiceClient, opts os.CreateOptsBuilder) os.CreateResult {
	return os.Create(c, opts)
}

// Adopt accepts an os.AdoptOpts struct and creates a new stack from existing stack
// resources using the values provided.
func Adopt(c *gophercloud.ServiceClient, opts os.AdoptOptsBuilder) os.AdoptResult {
	return os.Adopt(c, opts)
}

// List accepts an os.ListOpts struct and lists stacks based on the options provided.
func List(c *gophercloud.ServiceClient, opts os.ListOptsBuilder) pagination.Pager {
	return os.List(c, opts)
}

// Get retreives a stack based on the stack name and stack ID.
func Get(c *gophercloud.ServiceClient, stackName, stackID string) os.GetResult {
	return os.Get(c, stackName, stackID)
}

// Update accepts an os.UpdateOpts struct and updates a stack based on the options provided.
func Update(c *gophercloud.ServiceClient, stackName, stackID string, opts os.UpdateOptsBuilder) os.UpdateResult {
	return os.Update(c, stackName, stackID, opts)
}

// Delete deletes a stack based on the stack name and stack ID provided.
func Delete(c *gophercloud.ServiceClient, stackName, stackID string) os.DeleteResult {
	return os.Delete(c, stackName, stackID)
}

// Preview provides a preview of a stack based on the options provided.
func Preview(c *gophercloud.ServiceClient, opts os.PreviewOptsBuilder) os.PreviewResult {
	return os.Preview(c, opts)
}

// Abandon abandons a stack, keeping the resources available.
func Abandon(c *gophercloud.ServiceClient, stackName, stackID string) os.AbandonResult {
	return os.Abandon(c, stackName, stackID)
}