File: doc.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 0.0~git20180917.45f1c769-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,768 kB
  • sloc: sh: 98; makefile: 14
file content (31 lines) | stat: -rw-r--r-- 751 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
/*
Package policytypes lists all policy types and shows details for a policy type
from the OpenStack Clustering Service.

Example to List Policy Types

    allPages, err := policytypes.List(clusteringClient).AllPages()
    if err != nil {
        panic(err)
    }

    allPolicyTypes, err := actions.ExtractPolicyTypes(allPages)
    if err != nil {
        panic(err)
    }

    for _, policyType := range allPolicyTypes {
        fmt.Printf("%+v\n", policyType)
    }

Example to Get a Policy Type

    policyTypeName := "senlin.policy.affinity-1.0"
    policyTypeDetail, err := policyTypes.Get(clusteringClient, policyTypeName).Extract()
    if err != nil {
        panic(err)
    }

    fmt.Printf("%+v\n", policyTypeDetail)
*/
package policytypes