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" |
| 7 | "github.com/gophercloud/gophercloud/openstack/identity/v3/services" |
| 8 | "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens" |
| 9 | ) |
| 10 | |
| 11 | // PrintEndpoint will print an endpoint and all of its attributes. |
| 12 | func PrintEndpoint(t *testing.T, endpoint *endpoints.Endpoint) { |
| 13 | t.Logf("ID: %s", endpoint.ID) |
| 14 | t.Logf("Availability: %s", endpoint.Availability) |
| 15 | t.Logf("Name: %s", endpoint.Name) |
| 16 | t.Logf("Region: %s", endpoint.Region) |
| 17 | t.Logf("ServiceID: %s", endpoint.ServiceID) |
| 18 | t.Logf("URL: %s", endpoint.URL) |
| 19 | } |
| 20 | |
| 21 | // PrintService will print a service and all of its attributes. |
| 22 | func PrintService(t *testing.T, service *services.Service) { |
| 23 | t.Logf("ID: %s", service.ID) |
| 24 | t.Logf("Description: %s", service.Description) |
| 25 | t.Logf("Name: %s", service.Name) |
| 26 | t.Logf("Type: %s", service.Type) |
| 27 | } |
| 28 | |
| 29 | // PrintToken will print a token and all of its attributes. |
| 30 | func PrintToken(t *testing.T, token *tokens.Token) { |
| 31 | t.Logf("ID: %s", token.ID) |
| 32 | t.Logf("ExpiresAt: %v", token.ExpiresAt) |
| 33 | } |