blob: 2969bc9ce6c7d89c312219c3ccdf321c7f7880a4 [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"
Joe Topjianf61691c2016-11-05 12:34:59 -06007 "github.com/gophercloud/gophercloud/openstack/identity/v3/projects"
Joe Topjian918f5732016-08-15 08:47:08 -06008 "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.
13func 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 Topjianf61691c2016-11-05 12:34:59 -060022// PrintProject will print a project and all of its attributes.
23func 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 Topjian918f5732016-08-15 08:47:08 -060033// PrintService will print a service and all of its attributes.
34func 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.
42func PrintToken(t *testing.T, token *tokens.Token) {
43 t.Logf("ID: %s", token.ID)
44 t.Logf("ExpiresAt: %v", token.ExpiresAt)
45}