Use ServiceClient and pagination in Flavor operations.
diff --git a/openstack/compute/v2/flavors/urls.go b/openstack/compute/v2/flavors/urls.go
new file mode 100644
index 0000000..0e2d7c2
--- /dev/null
+++ b/openstack/compute/v2/flavors/urls.go
@@ -0,0 +1,37 @@
+package flavors
+
+import (
+ "fmt"
+ "net/url"
+ "strconv"
+
+ "github.com/rackspace/gophercloud"
+)
+
+func getListURL(client *gophercloud.ServiceClient, lfo ListFilterOptions) string {
+ v := url.Values{}
+ if lfo.ChangesSince != "" {
+ v.Set("changes-since", lfo.ChangesSince)
+ }
+ if lfo.MinDisk != 0 {
+ v.Set("minDisk", strconv.Itoa(lfo.MinDisk))
+ }
+ if lfo.MinRAM != 0 {
+ v.Set("minRam", strconv.Itoa(lfo.MinRAM))
+ }
+ if lfo.Marker != "" {
+ v.Set("marker", lfo.Marker)
+ }
+ if lfo.Limit != 0 {
+ v.Set("limit", strconv.Itoa(lfo.Limit))
+ }
+ tail := ""
+ if len(v) > 0 {
+ tail = fmt.Sprintf("?%s", v.Encode())
+ }
+ return client.ServiceURL("flavors", "detail") + tail
+}
+
+func getFlavorURL(client *gophercloud.ServiceClient, id string) string {
+ return client.ServiceURL("flavors", id)
+}