| Ildar Svetlov | 9ae28ba | 2020-03-27 15:01:41 +0400 | [diff] [blame] | 1 | /* |
| 2 | Package quotasets enables retrieving and managing Block Storage quotas. |
| 3 | |
| 4 | Example to Get a Quota Set |
| 5 | |
| 6 | quotaset, err := quotasets.Get(blockStorageClient, "project-id").Extract() |
| 7 | if err != nil { |
| 8 | panic(err) |
| 9 | } |
| 10 | |
| 11 | fmt.Printf("%+v\n", quotaset) |
| 12 | |
| 13 | Example to Get Quota Set Usage |
| 14 | |
| 15 | quotaset, err := quotasets.GetUsage(blockStorageClient, "project-id").Extract() |
| 16 | if err != nil { |
| 17 | panic(err) |
| 18 | } |
| 19 | |
| 20 | fmt.Printf("%+v\n", quotaset) |
| 21 | |
| 22 | Example to Update a Quota Set |
| 23 | |
| 24 | updateOpts := quotasets.UpdateOpts{ |
| 25 | Volumes: gophercloud.IntToPointer(100), |
| 26 | } |
| 27 | |
| 28 | quotaset, err := quotasets.Update(blockStorageClient, "project-id", updateOpts).Extract() |
| 29 | if err != nil { |
| 30 | panic(err) |
| 31 | } |
| 32 | |
| 33 | fmt.Printf("%+v\n", quotaset) |
| 34 | |
| 35 | Example to Delete a Quota Set |
| 36 | |
| 37 | err := quotasets.Delete(blockStorageClient, "project-id").ExtractErr() |
| 38 | if err != nil { |
| 39 | panic(err) |
| 40 | } |
| 41 | */ |
| 42 | package quotasets |