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 (34 lines) | stat: -rw-r--r-- 962 bytes parent folder | download
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
/*
Package quotas provides the ability to retrieve and manage Load Balancer quotas

Example to Get project quotas

	projectID = "23d5d3f79dfa4f73b72b8b0b0063ec55"
	quotasInfo, err := quotas.Get(networkClient, projectID).Extract()
	if err != nil {
	    log.Fatal(err)
	}

	fmt.Printf("quotas: %#v\n", quotasInfo)

Example to Update project quotas

	    projectID = "23d5d3f79dfa4f73b72b8b0b0063ec55"

	    updateOpts := quotas.UpdateOpts{
			Loadbalancer:  gophercloud.IntToPointer(20),
			Listener:      gophercloud.IntToPointer(40),
			Member:        gophercloud.IntToPointer(200),
			Pool:          gophercloud.IntToPointer(20),
			Healthmonitor: gophercloud.IntToPointer(1),
			L7Policy:      gophercloud.IntToPointer(50),
			L7Rule:        gophercloud.IntToPointer(100),
	    }
	    quotasInfo, err := quotas.Update(networkClient, projectID)
	    if err != nil {
	        log.Fatal(err)
	    }

	    fmt.Printf("quotas: %#v\n", quotasInfo)
*/
package quotas