File: doc.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,416 kB
  • sloc: sh: 99; makefile: 21
file content (59 lines) | stat: -rw-r--r-- 1,465 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
50
51
52
53
54
55
56
57
58
59
/*
Package introspection contains the functionality for Starting introspection,
Get introspection status, List all introspection statuses, Abort an
introspection, Get stored introspection data and reapply introspection on
stored data.

API reference https://developer.openstack.org/api-ref/baremetal-introspection/#node-introspection

Example to Start Introspection

	err := introspection.StartIntrospection(client, NodeUUID, introspection.StartOpts{}).ExtractErr()
	if err != nil {
		panic(err)
	}

Example to Get an Introspection status

	_, err := introspection.GetIntrospectionStatus(client, NodeUUID).Extract()
	if err != nil {
		panic(err)
	}

Example to List all introspection statuses

	introspection.ListIntrospections(client.ServiceClient(), nil).EachPage(func(page pagination.Page) (bool, error) {
		introspectionsList, err := introspection.ExtractIntrospections(page)
		if err != nil {
			return false, err
		}

		for _, n := range introspectionsList {
			// Do something
		}

		return true, nil
	})

Example to Abort an Introspection

	err := introspection.AbortIntrospection(client, NodeUUID).ExtractErr()
	if err != nil {
		panic(err)
	}

Example to Get stored Introspection Data

	v, err := introspection.GetIntrospectionData(c, NodeUUID).Extract()
	if err != nil {
		panic(err)
	}

Example to apply Introspection Data

	err := introspection.ApplyIntrospectionData(c, NodeUUID).ExtractErr()
	if err != nil {
		panic(err)
	}
*/
package introspection