blob: 95a2ccb76f40bd625fc6f0e2d8e12ea4633812a3 [file] [log] [blame]
Samuel A. Falvo II8a549ef2014-01-24 15:20:54 -08001package identity
2
3// Taken from: http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_authenticate_v2.0_tokens_.html
4const authResultsOK = `{
5 "access":{
6 "token":{
7 "id": "ab48a9efdfedb23ty3494",
8 "expires": "2010-11-01T03:32:15-05:00",
9 "tenant":{
10 "id": "t1000",
11 "name": "My Project"
12 }
13 },
14 "user":{
15 "id": "u123",
16 "name": "jqsmith",
17 "roles":[{
18 "id": "100",
19 "name": "compute:admin"
20 },
21 {
22 "id": "101",
23 "name": "object-store:admin",
24 "tenantId": "t1000"
25 }
26 ],
27 "roles_links":[]
28 },
29 "serviceCatalog":[{
30 "name": "Cloud Servers",
31 "type": "compute",
32 "endpoints":[{
33 "tenantId": "t1000",
34 "publicURL": "https://compute.north.host.com/v1/t1000",
35 "internalURL": "https://compute.north.internal/v1/t1000",
36 "region": "North",
37 "versionId": "1",
38 "versionInfo": "https://compute.north.host.com/v1/",
39 "versionList": "https://compute.north.host.com/"
40 },
41 {
42 "tenantId": "t1000",
43 "publicURL": "https://compute.north.host.com/v1.1/t1000",
44 "internalURL": "https://compute.north.internal/v1.1/t1000",
45 "region": "North",
46 "versionId": "1.1",
47 "versionInfo": "https://compute.north.host.com/v1.1/",
48 "versionList": "https://compute.north.host.com/"
49 }
50 ],
51 "endpoints_links":[]
52 },
53 {
54 "name": "Cloud Files",
55 "type": "object-store",
56 "endpoints":[{
57 "tenantId": "t1000",
58 "publicURL": "https://storage.north.host.com/v1/t1000",
59 "internalURL": "https://storage.north.internal/v1/t1000",
60 "region": "North",
61 "versionId": "1",
62 "versionInfo": "https://storage.north.host.com/v1/",
63 "versionList": "https://storage.north.host.com/"
64 },
65 {
66 "tenantId": "t1000",
67 "publicURL": "https://storage.south.host.com/v1/t1000",
68 "internalURL": "https://storage.south.internal/v1/t1000",
69 "region": "South",
70 "versionId": "1",
71 "versionInfo": "https://storage.south.host.com/v1/",
72 "versionList": "https://storage.south.host.com/"
73 }
74 ]
75 },
76 {
77 "name": "DNS-as-a-Service",
78 "type": "dnsextension:dns",
79 "endpoints":[{
80 "tenantId": "t1000",
81 "publicURL": "https://dns.host.com/v2.0/t1000",
82 "versionId": "2.0",
83 "versionInfo": "https://dns.host.com/v2.0/",
84 "versionList": "https://dns.host.com/"
85 }
86 ]
87 }
88 ]
89 }
90}`
Samuel A. Falvo II2b963212014-02-09 02:12:30 -080091
92// Taken from: http://docs.openstack.org/api/openstack-identity-service/2.0/content/GET_listExtensions_v2.0_extensions_.html#GET_listExtensions_v2.0_extensions_-Request
93const queryResults = `{
94 "extensions":[{
95 "name": "Reset Password Extension",
96 "namespace": "http://docs.rackspacecloud.com/identity/api/ext/rpe/v2.0",
97 "alias": "RS-RPE",
98 "updated": "2011-01-22T13:25:27-06:00",
99 "description": "Adds the capability to reset a user's password. The user is emailed when the password has been reset.",
100 "links":[{
101 "rel": "describedby",
102 "type": "application/pdf",
103 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe-20111111.pdf"
104 },
105 {
106 "rel": "describedby",
107 "type": "application/vnd.sun.wadl+xml",
108 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe.wadl"
109 }
110 ]
111 },
112 {
113 "name": "User Metadata Extension",
114 "namespace": "http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0",
115 "alias": "RS-META",
116 "updated": "2011-01-12T11:22:33-06:00",
117 "description": "Allows associating arbritrary metadata with a user.",
118 "links":[{
119 "rel": "describedby",
120 "type": "application/pdf",
121 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta-20111201.pdf"
122 },
123 {
124 "rel": "describedby",
125 "type": "application/vnd.sun.wadl+xml",
126 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta.wadl"
127 }
128 ]
129 }
130 ],
131 "extensions_links":[]
132}`
133
134// Same as queryResults above, but with a bogus JSON envelop.
135const bogusExtensionsResults = `{
136 "explosions":[{
137 "name": "Reset Password Extension",
138 "namespace": "http://docs.rackspacecloud.com/identity/api/ext/rpe/v2.0",
139 "alias": "RS-RPE",
140 "updated": "2011-01-22T13:25:27-06:00",
141 "description": "Adds the capability to reset a user's password. The user is emailed when the password has been reset.",
142 "links":[{
143 "rel": "describedby",
144 "type": "application/pdf",
145 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe-20111111.pdf"
146 },
147 {
148 "rel": "describedby",
149 "type": "application/vnd.sun.wadl+xml",
150 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe.wadl"
151 }
152 ]
153 },
154 {
155 "name": "User Metadata Extension",
156 "namespace": "http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0",
157 "alias": "RS-META",
158 "updated": "2011-01-12T11:22:33-06:00",
159 "description": "Allows associating arbritrary metadata with a user.",
160 "links":[{
161 "rel": "describedby",
162 "type": "application/pdf",
163 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta-20111201.pdf"
164 },
165 {
166 "rel": "describedby",
167 "type": "application/vnd.sun.wadl+xml",
168 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta.wadl"
169 }
170 ]
171 }
172 ],
173 "extensions_links":[]
174}`