blob: 3ec13d384b0ddb9fa885930ef41edd1e67fec240 [file] [log] [blame]
Joe Topjianc21202d2015-02-27 21:32:58 +00001package tenantnetworks
2
3import (
4 "github.com/rackspace/gophercloud"
5 "github.com/rackspace/gophercloud/pagination"
6)
7
8// List returns a Pager that allows you to iterate over a collection of Network.
9func List(client *gophercloud.ServiceClient) pagination.Pager {
10 url := listURL(client)
11 createPage := func(r pagination.PageResult) pagination.Page {
12 return NetworkPage{pagination.SinglePageBase(r)}
13 }
14 return pagination.NewPager(client, url, createPage)
15}
16
17// Get returns data about a previously created Network.
18func Get(client *gophercloud.ServiceClient, id string) GetResult {
19 var res GetResult
Jamie Hannaford6a3a78f2015-03-24 14:56:12 +010020 _, res.Err = client.Get(getURL(client, id), &res.Body, nil)
Joe Topjianc21202d2015-02-27 21:32:58 +000021 return res
22}