blob: 9adbcbc2f13ce94af445f26b91e7708fdf484b1e [file] [log] [blame]
Joe Topjianc21202d2015-02-27 21:32:58 +00001package tenantnetworks
2
3import (
Krzysztof Szukiełojć3f41d082017-05-07 14:43:06 +02004 "gerrit.mcp.mirantis.net/debian/gophercloud.git"
Krzysztof Szukiełojć24a29ce2017-05-07 14:24:02 +02005 "gerrit.mcp.mirantis.net/debian/gophercloud.git/pagination"
Joe Topjianc21202d2015-02-27 21:32:58 +00006)
7
8// List returns a Pager that allows you to iterate over a collection of Network.
9func List(client *gophercloud.ServiceClient) pagination.Pager {
Jon Perrittdb0ae142016-03-13 00:33:41 -060010 return pagination.NewPager(client, listURL(client), func(r pagination.PageResult) pagination.Page {
Joe Topjianc21202d2015-02-27 21:32:58 +000011 return NetworkPage{pagination.SinglePageBase(r)}
Jon Perrittdb0ae142016-03-13 00:33:41 -060012 })
Joe Topjianc21202d2015-02-27 21:32:58 +000013}
14
15// Get returns data about a previously created Network.
Jon Perritt3860b512016-03-29 12:01:48 -050016func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
Jon Perrittdb0ae142016-03-13 00:33:41 -060017 _, r.Err = client.Get(getURL(client, id), &r.Body, nil)
jrperritt29ae6b32016-04-13 12:59:37 -050018 return
Joe Topjianc21202d2015-02-27 21:32:58 +000019}