File: doc.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, bullseye-backports
  • size: 10,224 kB
  • sloc: sh: 125; makefile: 21
file content (33 lines) | stat: -rw-r--r-- 701 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
/*
Package actions provides listing and retrieving of senlin actions for the
OpenStack Clustering Service.

Example to List Actions

	opts := actions.ListOpts{
		Limit: 5,
	}

	err = actions.List(serviceClient, opts).EachPage(func(page pagination.Page) (bool, error) {
		actionInfos, err := actions.ExtractActions(page)
		if err != nil {
			return false, err
		}

		for _, actionInfo := range actionInfos {
			fmt.Println("%+v\n", actionInfo)
		}
		return true, nil
	})

Example to Get an Action

	actionID := "edce3528-864f-41fb-8759-f4707925cc09"
	action, err := actions.Get(serviceClient, actionID).Extract()
	if err != nil {
		panic(err)
	}

	fmt.Printf("Action %+v: ", action)
*/
package actions