blob: 268fd79cd3c2e5be08d1b997ec362f0d685b2b73 [file] [log] [blame]
Joe Topjian918f5732016-08-15 08:47:08 -06001package v3
2
3import (
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.
12func 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.
22func 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.
30func PrintToken(t *testing.T, token *tokens.Token) {
31 t.Logf("ID: %s", token.ID)
32 t.Logf("ExpiresAt: %v", token.ExpiresAt)
33}