github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/db/v1/flavors/requests.go (about) 1 package flavors 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 "github.com/huaweicloud/golangsdk/pagination" 6 ) 7 8 // List will list all available hardware flavors that an instance can use. The 9 // operation is identical to the one supported by the Nova API, but without the 10 // "disk" property. 11 func List(client *golangsdk.ServiceClient) pagination.Pager { 12 return pagination.NewPager(client, listURL(client), func(r pagination.PageResult) pagination.Page { 13 return FlavorPage{pagination.LinkedPageBase{PageResult: r}} 14 }) 15 } 16 17 // Get will retrieve information for a specified hardware flavor. 18 func Get(client *golangsdk.ServiceClient, id string) (r GetResult) { 19 _, r.Err = client.Get(getURL(client, id), &r.Body, nil) 20 return 21 }