blob: 0260424263fcbf08962158b9970133da15e263ee [file] [log] [blame]
Ash Wilson31844f22014-09-08 15:32:58 -04001package v2
Samuel A. Falvo II8a549ef2014-01-24 15:20:54 -08002
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
Jon Perritta7099c62014-08-10 21:47:23 -050092// Taken from: http://developer.openstack.org/api-ref-identity-v2.html
Samuel A. Falvo II2b963212014-02-09 02:12:30 -080093const queryResults = `{
Jon Perritta7099c62014-08-10 21:47:23 -050094 "extensions": {
95 "values": [
96 {
97 "updated": "2013-07-07T12:00:0-00:00",
98 "name": "OpenStack S3 API",
99 "links": [
100 {
101 "href": "https://github.com/openstack/identity-api",
102 "type": "text/html",
103 "rel": "describedby"
104 }
105 ],
106 "namespace": "http://docs.openstack.org/identity/api/ext/s3tokens/v1.0",
107 "alias": "s3tokens",
108 "description": "OpenStack S3 API."
109 },
110 {
111 "updated": "2013-07-23T12:00:0-00:00",
112 "name": "OpenStack Keystone Endpoint Filter API",
113 "links": [
114 {
115 "href": "https://github.com/openstack/identity-api/blob/master/openstack-identity-api/v3/src/markdown/identity-api-v3-os-ep-filter-ext.md",
116 "type": "text/html",
117 "rel": "describedby"
118 }
119 ],
120 "namespace": "http://docs.openstack.org/identity/api/ext/OS-EP-FILTER/v1.0",
121 "alias": "OS-EP-FILTER",
122 "description": "OpenStack Keystone Endpoint Filter API."
123 },
124 {
125 "updated": "2013-12-17T12:00:0-00:00",
126 "name": "OpenStack Federation APIs",
127 "links": [
128 {
129 "href": "https://github.com/openstack/identity-api",
130 "type": "text/html",
131 "rel": "describedby"
132 }
133 ],
134 "namespace": "http://docs.openstack.org/identity/api/ext/OS-FEDERATION/v1.0",
135 "alias": "OS-FEDERATION",
136 "description": "OpenStack Identity Providers Mechanism."
137 },
138 {
139 "updated": "2013-07-11T17:14:00-00:00",
140 "name": "OpenStack Keystone Admin",
141 "links": [
142 {
143 "href": "https://github.com/openstack/identity-api",
144 "type": "text/html",
145 "rel": "describedby"
146 }
147 ],
148 "namespace": "http://docs.openstack.org/identity/api/ext/OS-KSADM/v1.0",
149 "alias": "OS-KSADM",
150 "description": "OpenStack extensions to Keystone v2.0 API enabling Administrative Operations."
151 },
152 {
153 "updated": "2014-01-20T12:00:0-00:00",
154 "name": "OpenStack Simple Certificate API",
155 "links": [
156 {
157 "href": "https://github.com/openstack/identity-api",
158 "type": "text/html",
159 "rel": "describedby"
160 }
161 ],
162 "namespace": "http://docs.openstack.org/identity/api/ext/OS-SIMPLE-CERT/v1.0",
Ash Wilson31844f22014-09-08 15:32:58 -0400163 "alias": "OS-SIMPLE-CERT",
164 "description": "OpenStack simple certificate retrieval extension"
165 },
Jon Perritta7099c62014-08-10 21:47:23 -0500166 {
Ash Wilson31844f22014-09-08 15:32:58 -0400167 "updated": "2013-07-07T12:00:0-00:00",
Jon Perritta7099c62014-08-10 21:47:23 -0500168 "name": "OpenStack EC2 API",
169 "links": [
170 {
Ash Wilson31844f22014-09-08 15:32:58 -0400171 "href": "https://github.com/openstack/identity-api",
172 "type": "text/html",
173 "rel": "describedby"
174 }
Jon Perritta7099c62014-08-10 21:47:23 -0500175 ],
Ash Wilson31844f22014-09-08 15:32:58 -0400176 "namespace": "http://docs.openstack.org/identity/api/ext/OS-EC2/v1.0",
Jon Perritta7099c62014-08-10 21:47:23 -0500177 "alias": "OS-EC2",
178 "description": "OpenStack EC2 Credentials backend."
179 }
180 ]
181 }
Samuel A. Falvo II2b963212014-02-09 02:12:30 -0800182}`
183
Jon Perritta7099c62014-08-10 21:47:23 -0500184// Extensions query with a bogus JSON envelop.
Samuel A. Falvo II2b963212014-02-09 02:12:30 -0800185const bogusExtensionsResults = `{
186 "explosions":[{
187 "name": "Reset Password Extension",
188 "namespace": "http://docs.rackspacecloud.com/identity/api/ext/rpe/v2.0",
189 "alias": "RS-RPE",
190 "updated": "2011-01-22T13:25:27-06:00",
191 "description": "Adds the capability to reset a user's password. The user is emailed when the password has been reset.",
192 "links":[{
193 "rel": "describedby",
194 "type": "application/pdf",
195 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe-20111111.pdf"
196 },
197 {
198 "rel": "describedby",
199 "type": "application/vnd.sun.wadl+xml",
200 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-rpe.wadl"
201 }
202 ]
203 },
204 {
205 "name": "User Metadata Extension",
206 "namespace": "http://docs.rackspacecloud.com/identity/api/ext/meta/v2.0",
207 "alias": "RS-META",
208 "updated": "2011-01-12T11:22:33-06:00",
209 "description": "Allows associating arbritrary metadata with a user.",
210 "links":[{
211 "rel": "describedby",
212 "type": "application/pdf",
213 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta-20111201.pdf"
214 },
215 {
216 "rel": "describedby",
217 "type": "application/vnd.sun.wadl+xml",
218 "href": "http://docs.rackspacecloud.com/identity/api/ext/identity-meta.wadl"
219 }
220 ]
221 }
222 ],
223 "extensions_links":[]
224}`