Joe Topjian | 918f573 | 2016-08-15 08:47:08 -0600 | [diff] [blame] | 1 | package v3 |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "github.com/gophercloud/gophercloud/openstack/identity/v3/endpoints" |
Joe Topjian | f61691c | 2016-11-05 12:34:59 -0600 | [diff] [blame] | 7 | "github.com/gophercloud/gophercloud/openstack/identity/v3/projects" |
Joe Topjian | 918f573 | 2016-08-15 08:47:08 -0600 | [diff] [blame] | 8 | "github.com/gophercloud/gophercloud/openstack/identity/v3/services" |
| 9 | "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens" |
| 10 | ) |
| 11 | |
| 12 | // PrintEndpoint will print an endpoint and all of its attributes. |
| 13 | func PrintEndpoint(t *testing.T, endpoint *endpoints.Endpoint) { |
| 14 | t.Logf("ID: %s", endpoint.ID) |
| 15 | t.Logf("Availability: %s", endpoint.Availability) |
| 16 | t.Logf("Name: %s", endpoint.Name) |
| 17 | t.Logf("Region: %s", endpoint.Region) |
| 18 | t.Logf("ServiceID: %s", endpoint.ServiceID) |
| 19 | t.Logf("URL: %s", endpoint.URL) |
| 20 | } |
| 21 | |
Joe Topjian | f61691c | 2016-11-05 12:34:59 -0600 | [diff] [blame] | 22 | // PrintProject will print a project and all of its attributes. |
| 23 | func PrintProject(t *testing.T, project *projects.Project) { |
| 24 | t.Logf("ID: %s", project.ID) |
| 25 | t.Logf("IsDomain: %t", project.IsDomain) |
| 26 | t.Logf("Description: %s", project.Description) |
| 27 | t.Logf("DomainID: %s", project.DomainID) |
| 28 | t.Logf("Enabled: %t", project.Enabled) |
| 29 | t.Logf("Name: %s", project.Name) |
| 30 | t.Logf("ParentID: %s", project.ParentID) |
| 31 | } |
| 32 | |
Joe Topjian | 918f573 | 2016-08-15 08:47:08 -0600 | [diff] [blame] | 33 | // PrintService will print a service and all of its attributes. |
| 34 | func PrintService(t *testing.T, service *services.Service) { |
| 35 | t.Logf("ID: %s", service.ID) |
| 36 | t.Logf("Description: %s", service.Description) |
| 37 | t.Logf("Name: %s", service.Name) |
| 38 | t.Logf("Type: %s", service.Type) |
| 39 | } |
| 40 | |
| 41 | // PrintToken will print a token and all of its attributes. |
| 42 | func PrintToken(t *testing.T, token *tokens.Token) { |
| 43 | t.Logf("ID: %s", token.ID) |
| 44 | t.Logf("ExpiresAt: %v", token.ExpiresAt) |
| 45 | } |