akamai_api 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Guardfile +5 -15
  3. data/README.md +106 -36
  4. data/Thorfile +5 -0
  5. data/akamai_api.gemspec +6 -3
  6. data/bin/akamai_api +1 -2
  7. data/cassettes/akamai_api_ccu_arl_invalidate/invalid_credentials.yml +37 -0
  8. data/cassettes/akamai_api_ccu_arl_invalidate/invalid_item.yml +36 -0
  9. data/cassettes/akamai_api_ccu_arl_invalidate/multiple_items.yml +38 -0
  10. data/cassettes/akamai_api_ccu_arl_invalidate/single_item.yml +38 -0
  11. data/cassettes/akamai_api_ccu_arl_remove/invalid_credentials.yml +37 -0
  12. data/cassettes/akamai_api_ccu_arl_remove/invalid_item.yml +36 -0
  13. data/cassettes/akamai_api_ccu_arl_remove/multiple_items.yml +38 -0
  14. data/cassettes/akamai_api_ccu_arl_remove/single_item.yml +38 -0
  15. data/cassettes/akamai_api_ccu_cpcode_invalidate/invalid_credentials.yml +37 -0
  16. data/cassettes/akamai_api_ccu_cpcode_invalidate/invalid_item.yml +36 -0
  17. data/cassettes/akamai_api_ccu_cpcode_invalidate/multiple_items.yml +38 -0
  18. data/cassettes/akamai_api_ccu_cpcode_invalidate/single_item.yml +38 -0
  19. data/cassettes/akamai_api_ccu_cpcode_remove/invalid_credentials.yml +37 -0
  20. data/cassettes/akamai_api_ccu_cpcode_remove/invalid_item.yml +36 -0
  21. data/cassettes/akamai_api_ccu_cpcode_remove/multiple_items.yml +38 -0
  22. data/cassettes/akamai_api_ccu_cpcode_remove/single_item.yml +38 -0
  23. data/cassettes/akamai_api_ccu_purge_status/completed_request.yml +35 -0
  24. data/cassettes/akamai_api_ccu_purge_status/enqueued_request.yml +35 -0
  25. data/cassettes/akamai_api_ccu_purge_status/invalid_credentials.yml +35 -0
  26. data/cassettes/akamai_api_ccu_purge_status/not_found_request.yml +37 -0
  27. data/cassettes/akamai_api_ccu_status/invalid_credentials.yml +35 -0
  28. data/cassettes/akamai_api_ccu_status/valid_credentials.yml +34 -0
  29. data/cassettes/akamai_api_eccu_last_request/invalid_credentials.yml +68 -0
  30. data/cassettes/akamai_api_eccu_last_request/valid_credentials.yml +140 -0
  31. data/cassettes/akamai_api_eccu_publish/invalid_credentials.yml +73 -0
  32. data/cassettes/akamai_api_eccu_publish/invalid_domain.yml +60 -0
  33. data/cassettes/akamai_api_eccu_publish/successful.yml +126 -0
  34. data/cassettes/akamai_api_eccu_requests/invalid_credentials.yml +68 -0
  35. data/cassettes/akamai_api_eccu_requests/valid_credentials.yml +325 -0
  36. data/features/ccu_arl_invalidate.feature +83 -0
  37. data/features/ccu_arl_remove.feature +83 -0
  38. data/features/ccu_cpcode_invalidate.feature +83 -0
  39. data/features/ccu_cpcode_remove.feature +83 -0
  40. data/features/ccu_purge_status.feature +83 -0
  41. data/features/ccu_status.feature +31 -0
  42. data/features/eccu_last_request.feature +47 -0
  43. data/features/eccu_publish.feature +98 -0
  44. data/features/eccu_requests.feature +43 -0
  45. data/features/step_definitions/contain_multiple_times_steps.rb +3 -0
  46. data/features/support/env.rb +58 -0
  47. data/lib/akamai_api/ccu/purge/request.rb +76 -0
  48. data/lib/akamai_api/ccu/purge/response.rb +31 -0
  49. data/lib/akamai_api/ccu/purge.rb +5 -0
  50. data/lib/akamai_api/ccu/purge_status/not_found_response.rb +9 -0
  51. data/lib/akamai_api/ccu/purge_status/request.rb +32 -0
  52. data/lib/akamai_api/ccu/purge_status/response.rb +19 -0
  53. data/lib/akamai_api/ccu/purge_status/successful_response.rb +25 -0
  54. data/lib/akamai_api/ccu/purge_status.rb +10 -0
  55. data/lib/akamai_api/ccu/response.rb +18 -0
  56. data/lib/akamai_api/ccu/status/request.rb +23 -0
  57. data/lib/akamai_api/ccu/status/response.rb +11 -0
  58. data/lib/akamai_api/ccu/status.rb +2 -0
  59. data/lib/akamai_api/ccu.rb +14 -50
  60. data/lib/akamai_api/cli/app.rb +2 -2
  61. data/lib/akamai_api/cli/ccu/arl.rb +36 -0
  62. data/lib/akamai_api/cli/ccu/base.rb +18 -0
  63. data/lib/akamai_api/cli/ccu/cp_code.rb +39 -0
  64. data/lib/akamai_api/cli/ccu/purge_renderer.rb +49 -0
  65. data/lib/akamai_api/cli/ccu/status_renderer.rb +69 -0
  66. data/lib/akamai_api/cli/ccu.rb +5 -10
  67. data/lib/akamai_api/cli/eccu/entry_renderer.rb +63 -0
  68. data/lib/akamai_api/cli/eccu.rb +16 -14
  69. data/lib/akamai_api/cli.rb +7 -2
  70. data/lib/akamai_api/eccu_request.rb +19 -1
  71. data/lib/akamai_api/version.rb +1 -1
  72. data/lib/akamai_api.rb +3 -1
  73. data/spec/features/ccu/purge_request_spec.rb +94 -0
  74. data/spec/features/ccu/purge_status_request_spec.rb +31 -0
  75. data/spec/features/ccu/status_request_spec.rb +17 -0
  76. data/spec/fixtures/ccu/successful_purge.json +1 -0
  77. data/spec/lib/akamai_api/ccu/purge/request_spec.rb +124 -0
  78. data/spec/lib/akamai_api/ccu/purge/response_spec.rb +54 -0
  79. data/spec/lib/akamai_api/ccu/purge_status/not_found_response_spec.rb +41 -0
  80. data/spec/lib/akamai_api/ccu/purge_status/request_spec.rb +64 -0
  81. data/spec/lib/akamai_api/ccu/purge_status/successful_response_spec.rb +86 -0
  82. data/spec/lib/akamai_api/ccu/response_spec.rb +15 -0
  83. data/spec/lib/akamai_api/ccu/status/request_spec.rb +22 -0
  84. data/spec/lib/akamai_api/ccu/status/response_spec.rb +29 -0
  85. data/spec/lib/akamai_api/ccu_spec.rb +49 -61
  86. data/spec/lib/akamai_api/cli/ccu/status_renderer_spec.rb +36 -0
  87. data/spec/lib/akamai_api/eccu_request_spec.rb +5 -5
  88. data/spec/spec_helper.rb +21 -1
  89. metadata +163 -26
  90. data/lib/akamai_api/ccu_response.rb +0 -51
  91. data/lib/akamai_api/cli/ccu_arl.rb +0 -40
  92. data/lib/akamai_api/cli/ccu_cp_code.rb +0 -48
  93. data/lib/akamai_api/cli/template.rb +0 -36
  94. data/lib/akamai_api/cp_code.rb +0 -33
  95. data/spec/fixtures/ccu/successful_purge.xml +0 -15
  96. data/spec/fixtures/cp_code/collection.xml +0 -21
  97. data/spec/fixtures/cp_code/single.xml +0 -16
  98. data/spec/lib/akamai_api/cp_code_spec.rb +0 -47
  99. data/wsdls/cpcode.wsdl +0 -2765
@@ -0,0 +1,325 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://USERNAME:PASSWORD@control.akamai.com/webservices/services/PublishECCU
6
+ body:
7
+ encoding: UTF-8
8
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
9
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akapubeccudt="https://control.akamai.com/2003/Sep/PublishECCU.xsd"
10
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="https://control.akamai.com/AWS.xsd"
11
+ xmlns:ins1="https://control.akamai.com/Publish.xsd"><env:Body><akapubeccudt:getIds></akapubeccudt:getIds></env:Body></env:Envelope>
12
+ headers:
13
+ Soapaction:
14
+ - '"getIds"'
15
+ Content-Type:
16
+ - text/xml;charset=UTF-8
17
+ Content-Length:
18
+ - '457'
19
+ Accept-Encoding:
20
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
21
+ Accept:
22
+ - '*/*'
23
+ User-Agent:
24
+ - Ruby
25
+ response:
26
+ status:
27
+ code: 200
28
+ message: OK
29
+ headers:
30
+ Server:
31
+ - Apache
32
+ Content-Type:
33
+ - text/xml;charset=utf-8
34
+ Content-Length:
35
+ - '2211'
36
+ Expires:
37
+ - Tue, 20 May 2014 15:39:06 GMT
38
+ Cache-Control:
39
+ - max-age=0, no-cache, no-store
40
+ Pragma:
41
+ - no-cache
42
+ Date:
43
+ - Tue, 20 May 2014 15:39:06 GMT
44
+ Connection:
45
+ - keep-alive
46
+ X-Frame-Options:
47
+ - SAMEORIGIN
48
+ body:
49
+ encoding: UTF-8
50
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
51
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:getIdsResponse
52
+ soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://control.akamai.com/2003/Sep/PublishECCU.xsd"><fileIds
53
+ soapenc:arrayType="xsd:int[4]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><fileIds
54
+ xsi:type="xsd:int">112714868</fileIds><fileIds xsi:type="xsd:int">112714869</fileIds><fileIds
55
+ xsi:type="xsd:int">112722029</fileIds><fileIds xsi:type="xsd:int">112899587</fileIds></fileIds></ns1:getIdsResponse></soapenv:Body></soapenv:Envelope>
56
+ http_version:
57
+ recorded_at: Tue, 20 May 2014 15:39:06 GMT
58
+ - request:
59
+ method: post
60
+ uri: https://USERNAME:PASSWORD@control.akamai.com/webservices/services/PublishECCU
61
+ body:
62
+ encoding: UTF-8
63
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
64
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akapubeccudt="https://control.akamai.com/2003/Sep/PublishECCU.xsd"
65
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="https://control.akamai.com/AWS.xsd"
66
+ xmlns:ins1="https://control.akamai.com/Publish.xsd"><env:Body><akapubeccudt:getInfo><fileId
67
+ xsi:type="xsd:int">112714868</fileId><retrieveContents xsi:type="xsd:boolean">false</retrieveContents></akapubeccudt:getInfo></env:Body></env:Envelope>
68
+ headers:
69
+ Soapaction:
70
+ - '"getInfo"'
71
+ Content-Type:
72
+ - text/xml;charset=UTF-8
73
+ Content-Length:
74
+ - '569'
75
+ Accept-Encoding:
76
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
77
+ Accept:
78
+ - '*/*'
79
+ User-Agent:
80
+ - Ruby
81
+ response:
82
+ status:
83
+ code: 200
84
+ message: OK
85
+ headers:
86
+ Server:
87
+ - Apache
88
+ Content-Type:
89
+ - text/xml;charset=utf-8
90
+ Content-Length:
91
+ - '1684'
92
+ Expires:
93
+ - Tue, 20 May 2014 15:39:06 GMT
94
+ Cache-Control:
95
+ - max-age=0, no-cache, no-store
96
+ Pragma:
97
+ - no-cache
98
+ Date:
99
+ - Tue, 20 May 2014 15:39:06 GMT
100
+ Connection:
101
+ - keep-alive
102
+ X-Frame-Options:
103
+ - SAMEORIGIN
104
+ body:
105
+ encoding: UTF-8
106
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
107
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:getInfoResponse
108
+ soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://control.akamai.com/2003/Sep/PublishECCU.xsd"><EccuInfo
109
+ xsi:type="ns2:EccuInfo" xmlns:ns2="https://control.akamai.com/Publish.xsd"><contents
110
+ xsi:type="xsd:base64Binary" xsi:nil="true"/><extendedStatusMessage xsi:type="xsd:string">File
111
+ successfully deployed to Akamai network (Succeeded)</extendedStatusMessage><fileId
112
+ xsi:type="xsd:int">112714868</fileId><fileSize xsi:type="xsd:int">127</fileSize><filename
113
+ xsi:type="xsd:string" xsi:nil="true"/><md5Digest xsi:type="xsd:string">39516c0edc05e85d3b1dfcd6c6058f1c</md5Digest><notes
114
+ xsi:type="xsd:string">ECCU Request using EdgeControl</notes><propertyName
115
+ xsi:type="xsd:string">foo.com</propertyName><propertyNameExactMatch
116
+ xsi:type="xsd:boolean">true</propertyNameExactMatch><propertyType xsi:type="xsd:string">hostheader</propertyType><statusChangeEmail
117
+ xsi:type="xsd:string">guest@mikamai.com</statusChangeEmail><statusCode
118
+ xsi:type="xsd:int">4000</statusCode><statusMessage xsi:type="xsd:string">File
119
+ successfully deployed to Akamai's network</statusMessage><statusUpdateDate
120
+ xsi:type="xsd:dateTime">2014-04-22T16:01:08.790Z</statusUpdateDate><uploadDate
121
+ xsi:type="xsd:dateTime">2014-04-22T15:18:49.790Z</uploadDate><uploadedBy xsi:type="xsd:string">test1</uploadedBy><versionString
122
+ xsi:type="xsd:string" xsi:nil="true"/></EccuInfo></ns1:getInfoResponse></soapenv:Body></soapenv:Envelope>
123
+ http_version:
124
+ recorded_at: Tue, 20 May 2014 15:39:06 GMT
125
+ - request:
126
+ method: post
127
+ uri: https://USERNAME:PASSWORD@control.akamai.com/webservices/services/PublishECCU
128
+ body:
129
+ encoding: UTF-8
130
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
131
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akapubeccudt="https://control.akamai.com/2003/Sep/PublishECCU.xsd"
132
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="https://control.akamai.com/AWS.xsd"
133
+ xmlns:ins1="https://control.akamai.com/Publish.xsd"><env:Body><akapubeccudt:getInfo><fileId
134
+ xsi:type="xsd:int">112714869</fileId><retrieveContents xsi:type="xsd:boolean">false</retrieveContents></akapubeccudt:getInfo></env:Body></env:Envelope>
135
+ headers:
136
+ Soapaction:
137
+ - '"getInfo"'
138
+ Content-Type:
139
+ - text/xml;charset=UTF-8
140
+ Content-Length:
141
+ - '569'
142
+ Accept-Encoding:
143
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
144
+ Accept:
145
+ - '*/*'
146
+ User-Agent:
147
+ - Ruby
148
+ response:
149
+ status:
150
+ code: 200
151
+ message: OK
152
+ headers:
153
+ Server:
154
+ - Apache
155
+ Content-Type:
156
+ - text/xml;charset=utf-8
157
+ Content-Length:
158
+ - '1682'
159
+ Expires:
160
+ - Tue, 20 May 2014 15:39:07 GMT
161
+ Cache-Control:
162
+ - max-age=0, no-cache, no-store
163
+ Pragma:
164
+ - no-cache
165
+ Date:
166
+ - Tue, 20 May 2014 15:39:07 GMT
167
+ Connection:
168
+ - keep-alive
169
+ X-Frame-Options:
170
+ - SAMEORIGIN
171
+ body:
172
+ encoding: UTF-8
173
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
174
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:getInfoResponse
175
+ soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://control.akamai.com/2003/Sep/PublishECCU.xsd"><EccuInfo
176
+ xsi:type="ns2:EccuInfo" xmlns:ns2="https://control.akamai.com/Publish.xsd"><contents
177
+ xsi:type="xsd:base64Binary" xsi:nil="true"/><extendedStatusMessage xsi:type="xsd:string">File
178
+ successfully deployed to Akamai network (Succeeded)</extendedStatusMessage><fileId
179
+ xsi:type="xsd:int">112714869</fileId><fileSize xsi:type="xsd:int">127</fileSize><filename
180
+ xsi:type="xsd:string" xsi:nil="true"/><md5Digest xsi:type="xsd:string">39516c0edc05e85d3b1dfcd6c6058f1c</md5Digest><notes
181
+ xsi:type="xsd:string">ECCU Request using EdgeControl</notes><propertyName
182
+ xsi:type="xsd:string">foo.bar</propertyName><propertyNameExactMatch xsi:type="xsd:boolean">true</propertyNameExactMatch><propertyType
183
+ xsi:type="xsd:string">hostheader</propertyType><statusChangeEmail xsi:type="xsd:string">guest@mikamai.com</statusChangeEmail><statusCode
184
+ xsi:type="xsd:int">4000</statusCode><statusMessage xsi:type="xsd:string">File
185
+ successfully deployed to Akamai's network</statusMessage><statusUpdateDate
186
+ xsi:type="xsd:dateTime">2014-04-22T16:01:08.251Z</statusUpdateDate><uploadDate
187
+ xsi:type="xsd:dateTime">2014-04-22T15:18:49.251Z</uploadDate><uploadedBy xsi:type="xsd:string">test1</uploadedBy><versionString
188
+ xsi:type="xsd:string" xsi:nil="true"/></EccuInfo></ns1:getInfoResponse></soapenv:Body></soapenv:Envelope>
189
+ http_version:
190
+ recorded_at: Tue, 20 May 2014 15:39:07 GMT
191
+ - request:
192
+ method: post
193
+ uri: https://USERNAME:PASSWORD@control.akamai.com/webservices/services/PublishECCU
194
+ body:
195
+ encoding: UTF-8
196
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
197
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akapubeccudt="https://control.akamai.com/2003/Sep/PublishECCU.xsd"
198
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="https://control.akamai.com/AWS.xsd"
199
+ xmlns:ins1="https://control.akamai.com/Publish.xsd"><env:Body><akapubeccudt:getInfo><fileId
200
+ xsi:type="xsd:int">112722029</fileId><retrieveContents xsi:type="xsd:boolean">false</retrieveContents></akapubeccudt:getInfo></env:Body></env:Envelope>
201
+ headers:
202
+ Soapaction:
203
+ - '"getInfo"'
204
+ Content-Type:
205
+ - text/xml;charset=UTF-8
206
+ Content-Length:
207
+ - '569'
208
+ Accept-Encoding:
209
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
210
+ Accept:
211
+ - '*/*'
212
+ User-Agent:
213
+ - Ruby
214
+ response:
215
+ status:
216
+ code: 200
217
+ message: OK
218
+ headers:
219
+ Server:
220
+ - Apache
221
+ Content-Type:
222
+ - text/xml;charset=utf-8
223
+ Content-Length:
224
+ - '1698'
225
+ Expires:
226
+ - Tue, 20 May 2014 15:39:07 GMT
227
+ Cache-Control:
228
+ - max-age=0, no-cache, no-store
229
+ Pragma:
230
+ - no-cache
231
+ Date:
232
+ - Tue, 20 May 2014 15:39:07 GMT
233
+ Connection:
234
+ - keep-alive
235
+ X-Frame-Options:
236
+ - SAMEORIGIN
237
+ body:
238
+ encoding: UTF-8
239
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
240
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:getInfoResponse
241
+ soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://control.akamai.com/2003/Sep/PublishECCU.xsd"><EccuInfo
242
+ xsi:type="ns2:EccuInfo" xmlns:ns2="https://control.akamai.com/Publish.xsd"><contents
243
+ xsi:type="xsd:base64Binary" xsi:nil="true"/><extendedStatusMessage xsi:type="xsd:string">File
244
+ successfully deployed to Akamai network (Succeeded)</extendedStatusMessage><fileId
245
+ xsi:type="xsd:int">112722029</fileId><fileSize xsi:type="xsd:int">140</fileSize><filename
246
+ xsi:type="xsd:string" xsi:nil="true"/><md5Digest xsi:type="xsd:string">a4ae326fc3ea4094562033e8378a76df</md5Digest><notes
247
+ xsi:type="xsd:string">ECCU Request using EdgeControl</notes><propertyName
248
+ xsi:type="xsd:string">foo.com</propertyName><propertyNameExactMatch
249
+ xsi:type="xsd:boolean">true</propertyNameExactMatch><propertyType xsi:type="xsd:string">hostheader</propertyType><statusChangeEmail
250
+ xsi:type="xsd:string">guest@mikamai.com</statusChangeEmail><statusCode
251
+ xsi:type="xsd:int">4000</statusCode><statusMessage xsi:type="xsd:string">File
252
+ successfully deployed to Akamai's network</statusMessage><statusUpdateDate
253
+ xsi:type="xsd:dateTime">2014-04-22T17:29:00.809Z</statusUpdateDate><uploadDate
254
+ xsi:type="xsd:dateTime">2014-04-22T16:53:11.809Z</uploadDate><uploadedBy xsi:type="xsd:string">guest@mikamai.com</uploadedBy><versionString
255
+ xsi:type="xsd:string" xsi:nil="true"/></EccuInfo></ns1:getInfoResponse></soapenv:Body></soapenv:Envelope>
256
+ http_version:
257
+ recorded_at: Tue, 20 May 2014 15:39:07 GMT
258
+ - request:
259
+ method: post
260
+ uri: https://USERNAME:PASSWORD@control.akamai.com/webservices/services/PublishECCU
261
+ body:
262
+ encoding: UTF-8
263
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
264
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:akapubeccudt="https://control.akamai.com/2003/Sep/PublishECCU.xsd"
265
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="https://control.akamai.com/AWS.xsd"
266
+ xmlns:ins1="https://control.akamai.com/Publish.xsd"><env:Body><akapubeccudt:getInfo><fileId
267
+ xsi:type="xsd:int">112899587</fileId><retrieveContents xsi:type="xsd:boolean">false</retrieveContents></akapubeccudt:getInfo></env:Body></env:Envelope>
268
+ headers:
269
+ Soapaction:
270
+ - '"getInfo"'
271
+ Content-Type:
272
+ - text/xml;charset=UTF-8
273
+ Content-Length:
274
+ - '569'
275
+ Accept-Encoding:
276
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
277
+ Accept:
278
+ - '*/*'
279
+ User-Agent:
280
+ - Ruby
281
+ response:
282
+ status:
283
+ code: 200
284
+ message: OK
285
+ headers:
286
+ Server:
287
+ - Apache
288
+ Content-Type:
289
+ - text/xml;charset=utf-8
290
+ Content-Length:
291
+ - '1696'
292
+ Expires:
293
+ - Tue, 20 May 2014 15:39:08 GMT
294
+ Cache-Control:
295
+ - max-age=0, no-cache, no-store
296
+ Pragma:
297
+ - no-cache
298
+ Date:
299
+ - Tue, 20 May 2014 15:39:08 GMT
300
+ Connection:
301
+ - keep-alive
302
+ X-Frame-Options:
303
+ - SAMEORIGIN
304
+ body:
305
+ encoding: UTF-8
306
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
307
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:getInfoResponse
308
+ soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://control.akamai.com/2003/Sep/PublishECCU.xsd"><EccuInfo
309
+ xsi:type="ns2:EccuInfo" xmlns:ns2="https://control.akamai.com/Publish.xsd"><contents
310
+ xsi:type="xsd:base64Binary" xsi:nil="true"/><extendedStatusMessage xsi:type="xsd:string">File
311
+ successfully deployed to Akamai network (Succeeded)</extendedStatusMessage><fileId
312
+ xsi:type="xsd:int">112899587</fileId><fileSize xsi:type="xsd:int">216</fileSize><filename
313
+ xsi:type="xsd:string" xsi:nil="true"/><md5Digest xsi:type="xsd:string">e5128c2a649653576d2fa7af71014eef</md5Digest><notes
314
+ xsi:type="xsd:string">ECCU Request using EdgeControl</notes><propertyName
315
+ xsi:type="xsd:string">foo.com</propertyName><propertyNameExactMatch
316
+ xsi:type="xsd:boolean">true</propertyNameExactMatch><propertyType xsi:type="xsd:string">hostheader</propertyType><statusChangeEmail
317
+ xsi:type="xsd:string">guest@mikamai.com</statusChangeEmail><statusCode
318
+ xsi:type="xsd:int">4000</statusCode><statusMessage xsi:type="xsd:string">File
319
+ successfully deployed to Akamai's network</statusMessage><statusUpdateDate
320
+ xsi:type="xsd:dateTime">2014-04-23T11:23:50.239Z</statusUpdateDate><uploadDate
321
+ xsi:type="xsd:dateTime">2014-04-23T10:58:41.239Z</uploadDate><uploadedBy xsi:type="xsd:string">guest@mikamai.com</uploadedBy><versionString
322
+ xsi:type="xsd:string" xsi:nil="true"/></EccuInfo></ns1:getInfoResponse></soapenv:Body></soapenv:Envelope>
323
+ http_version:
324
+ recorded_at: Tue, 20 May 2014 15:39:21 GMT
325
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,83 @@
1
+ Feature: akamai_api ccu arl invalidate
2
+ In order to remove ARLs
3
+ As a CLI user
4
+
5
+ @vcr
6
+ Scenario: invalid credentials
7
+ When I run `akamai_api ccu arl invalidate http://www.foo.com/bar.txt -u foo -p bar`
8
+ Then the output should contain:
9
+ """
10
+ Your login credentials are invalid.
11
+ """
12
+
13
+ @vcr
14
+ Scenario: invalid item
15
+ When I run `akamai_api ccu arl invalidate http://www.foo.com/bar.txt`
16
+ Then the output should contain:
17
+ """
18
+ There was an error processing your request:
19
+ """
20
+ And the output should contain:
21
+ """
22
+ * Result: 403 - unauthorized arl (http://www.foo.com/bar.txt)
23
+ """
24
+ And the output should contain:
25
+ """
26
+ * Described by: https://api.ccu.akamai.com/ccu/v2/errors/unauthorized-arl
27
+ """
28
+
29
+ @vcr
30
+ Scenario: single item
31
+ When I run `akamai_api ccu arl invalidate http://www.foo.com/bar.txt`
32
+ Then the output should contain:
33
+ """
34
+ Purge request successfully submitted:
35
+ """
36
+ And the output should contain:
37
+ """
38
+ * Result: 201 - Request accepted.
39
+ """
40
+ And the output should contain:
41
+ """
42
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
43
+ """
44
+ And the output should contain:
45
+ """
46
+ * Estimated time: 420 secs.
47
+ """
48
+ And the output should contain:
49
+ """
50
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
51
+ """
52
+ And the output should contain:
53
+ """
54
+ * Time to wait before check: 420 secs.
55
+ """
56
+
57
+ @vcr
58
+ Scenario: multiple items
59
+ When I run `akamai_api ccu arl invalidate http://www.foo.com/bar.txt http://www.foo.com/baz.txt`
60
+ Then the output should contain:
61
+ """
62
+ Purge request successfully submitted:
63
+ """
64
+ And the output should contain:
65
+ """
66
+ * Result: 201 - Request accepted.
67
+ """
68
+ And the output should contain:
69
+ """
70
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
71
+ """
72
+ And the output should contain:
73
+ """
74
+ * Estimated time: 420 secs.
75
+ """
76
+ And the output should contain:
77
+ """
78
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
79
+ """
80
+ And the output should contain:
81
+ """
82
+ * Time to wait before check: 420 secs.
83
+ """
@@ -0,0 +1,83 @@
1
+ Feature: akamai_api ccu arl remove
2
+ In order to remove ARLs
3
+ As a CLI user
4
+
5
+ @vcr
6
+ Scenario: invalid credentials
7
+ When I run `akamai_api ccu arl remove http://www.foo.com/bar.txt -u foo -p bar`
8
+ Then the output should contain:
9
+ """
10
+ Your login credentials are invalid.
11
+ """
12
+
13
+ @vcr
14
+ Scenario: invalid item
15
+ When I run `akamai_api ccu arl remove http://www.foo.com/bar.txt`
16
+ Then the output should contain:
17
+ """
18
+ There was an error processing your request:
19
+ """
20
+ And the output should contain:
21
+ """
22
+ * Result: 403 - unauthorized arl (http://www.foo.com/bar.txt)
23
+ """
24
+ And the output should contain:
25
+ """
26
+ * Described by: https://api.ccu.akamai.com/ccu/v2/errors/unauthorized-arl
27
+ """
28
+
29
+ @vcr
30
+ Scenario: single item
31
+ When I run `akamai_api ccu arl remove http://www.foo.com/bar.txt`
32
+ Then the output should contain:
33
+ """
34
+ Purge request successfully submitted:
35
+ """
36
+ And the output should contain:
37
+ """
38
+ * Result: 201 - Request accepted.
39
+ """
40
+ And the output should contain:
41
+ """
42
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
43
+ """
44
+ And the output should contain:
45
+ """
46
+ * Estimated time: 420 secs.
47
+ """
48
+ And the output should contain:
49
+ """
50
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
51
+ """
52
+ And the output should contain:
53
+ """
54
+ * Time to wait before check: 420 secs.
55
+ """
56
+
57
+ @vcr
58
+ Scenario: multiple items
59
+ When I run `akamai_api ccu arl remove http://www.foo.com/bar.txt http://www.foo.com/baz.txt`
60
+ Then the output should contain:
61
+ """
62
+ Purge request successfully submitted:
63
+ """
64
+ And the output should contain:
65
+ """
66
+ * Result: 201 - Request accepted.
67
+ """
68
+ And the output should contain:
69
+ """
70
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
71
+ """
72
+ And the output should contain:
73
+ """
74
+ * Estimated time: 420 secs.
75
+ """
76
+ And the output should contain:
77
+ """
78
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
79
+ """
80
+ And the output should contain:
81
+ """
82
+ * Time to wait before check: 420 secs.
83
+ """
@@ -0,0 +1,83 @@
1
+ Feature: akamai_api ccu cpcode invalidate
2
+ In order to invalidate CPCodes
3
+ As a CLI user
4
+
5
+ @vcr
6
+ Scenario: invalid credentials
7
+ When I run `akamai_api ccu cpcode invalidate 12345 -u foo -p bar`
8
+ Then the output should contain:
9
+ """
10
+ Your login credentials are invalid.
11
+ """
12
+
13
+ @vcr
14
+ Scenario: invalid item
15
+ When I run `akamai_api ccu cpcode invalidate 12345`
16
+ Then the output should contain:
17
+ """
18
+ There was an error processing your request:
19
+ """
20
+ And the output should contain:
21
+ """
22
+ * Result: 403 - unauthorized cpcode (12345)
23
+ """
24
+ And the output should contain:
25
+ """
26
+ * Described by: https://api.ccu.akamai.com/ccu/v2/errors/unauthorized-cpcode
27
+ """
28
+
29
+ @vcr
30
+ Scenario: single item
31
+ When I run `akamai_api ccu cpcode invalidate 12345`
32
+ Then the output should contain:
33
+ """
34
+ Purge request successfully submitted:
35
+ """
36
+ And the output should contain:
37
+ """
38
+ * Result: 201 - Request accepted.
39
+ """
40
+ And the output should contain:
41
+ """
42
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
43
+ """
44
+ And the output should contain:
45
+ """
46
+ * Estimated time: 420 secs.
47
+ """
48
+ And the output should contain:
49
+ """
50
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
51
+ """
52
+ And the output should contain:
53
+ """
54
+ * Time to wait before check: 420 secs.
55
+ """
56
+
57
+ @vcr
58
+ Scenario: multiple items
59
+ When I run `akamai_api ccu cpcode invalidate 12345 12346`
60
+ Then the output should contain:
61
+ """
62
+ Purge request successfully submitted:
63
+ """
64
+ And the output should contain:
65
+ """
66
+ * Result: 201 - Request accepted.
67
+ """
68
+ And the output should contain:
69
+ """
70
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
71
+ """
72
+ And the output should contain:
73
+ """
74
+ * Estimated time: 420 secs.
75
+ """
76
+ And the output should contain:
77
+ """
78
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
79
+ """
80
+ And the output should contain:
81
+ """
82
+ * Time to wait before check: 420 secs.
83
+ """
@@ -0,0 +1,83 @@
1
+ Feature: akamai_api ccu cpcode remove
2
+ In order to remove CPCodes
3
+ As a CLI user
4
+
5
+ @vcr
6
+ Scenario: invalid credentials
7
+ When I run `akamai_api ccu cpcode remove 12345 -u foo -p bar`
8
+ Then the output should contain:
9
+ """
10
+ Your login credentials are invalid.
11
+ """
12
+
13
+ @vcr
14
+ Scenario: invalid item
15
+ When I run `akamai_api ccu cpcode remove 12345`
16
+ Then the output should contain:
17
+ """
18
+ There was an error processing your request:
19
+ """
20
+ And the output should contain:
21
+ """
22
+ * Result: 403 - unauthorized cpcode (12345)
23
+ """
24
+ And the output should contain:
25
+ """
26
+ * Described by: https://api.ccu.akamai.com/ccu/v2/errors/unauthorized-cpcode
27
+ """
28
+
29
+ @vcr
30
+ Scenario: single item
31
+ When I run `akamai_api ccu cpcode remove 12345`
32
+ Then the output should contain:
33
+ """
34
+ Purge request successfully submitted:
35
+ """
36
+ And the output should contain:
37
+ """
38
+ * Result: 201 - Request accepted.
39
+ """
40
+ And the output should contain:
41
+ """
42
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
43
+ """
44
+ And the output should contain:
45
+ """
46
+ * Estimated time: 420 secs.
47
+ """
48
+ And the output should contain:
49
+ """
50
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
51
+ """
52
+ And the output should contain:
53
+ """
54
+ * Time to wait before check: 420 secs.
55
+ """
56
+
57
+ @vcr
58
+ Scenario: multiple items
59
+ When I run `akamai_api ccu cpcode remove 12345 12346`
60
+ Then the output should contain:
61
+ """
62
+ Purge request successfully submitted:
63
+ """
64
+ And the output should contain:
65
+ """
66
+ * Result: 201 - Request accepted.
67
+ """
68
+ And the output should contain:
69
+ """
70
+ * Purge ID: 12345678-1234-1234-1234-123456789012 | Support ID: 12345678901234567890-123456789
71
+ """
72
+ And the output should contain:
73
+ """
74
+ * Estimated time: 420 secs.
75
+ """
76
+ And the output should contain:
77
+ """
78
+ * Progress URI: /ccu/v2/purges/12345678-1234-5678-1234-123456789012
79
+ """
80
+ And the output should contain:
81
+ """
82
+ * Time to wait before check: 420 secs.
83
+ """