occi-api 4.2.0.beta.6 → 4.2.0.beta.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile +1 -1
  3. data/lib/occi/api/client/base/mixin_methods.rb +8 -5
  4. data/lib/occi/api/version.rb +1 -1
  5. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_compute_resources.yml +20 -20
  6. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_network_resources.yml +20 -20
  7. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_storage_resources.yml +24 -24
  8. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/establishes_connection.yml +12 -12
  9. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_compute_resources.yml +16 -16
  10. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_network_resources.yml +16 -16
  11. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_storage_resources.yml +16 -16
  12. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/{creates_a_new_compute_resource.yml → net_http_example_response.yml} +12 -12
  13. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/refreshes_its_model.yml +20 -20
  14. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/replacements.txt +38 -0
  15. data/spec/cassettes/tools/generalize_yml.sh +26 -0
  16. data/spec/occi/api/client/base/stubs_spec.rb +53 -0
  17. data/spec/occi/api/client/client_http_spec.rb +28 -8
  18. metadata +9 -49
  19. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_network_resource.yml +0 -266
  20. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_storage_resource.yml +0 -266
  21. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_compute_resource.yml +0 -266
  22. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_network_resource.yml +0 -266
  23. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_storage_resource.yml +0 -266
  24. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deploys_an_instance_based_on_OVF_OVA_file.yml +0 -266
  25. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_all_available_mixins.yml +0 -266
  26. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_scoped_os_tpl_mixin.yml +0 -266
  27. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_scoped_resource_tpl_mixin.yml +0 -266
  28. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_unscoped_mixin.yml +0 -266
  29. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_compute_resource_using_type_identifier.yml +0 -266
  30. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_compute_resource_using_type_name.yml +0 -266
  31. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_network_resource_using_type_identifier.yml +0 -266
  32. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_network_resource_using_type_name.yml +0 -266
  33. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_storage_resource_using_type_identifier.yml +0 -266
  34. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_storage_resource_using_type_name.yml +0 -266
  35. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_entity_type_identifiers.yml +0 -266
  36. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_entity_types.yml +0 -266
  37. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_link_type_identifiers.yml +0 -266
  38. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_link_types.yml +0 -266
  39. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixin_type_identifiers.yml +0 -266
  40. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixin_types.yml +0 -266
  41. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixins.yml +0 -266
  42. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_resource_type_identifiers.yml +0 -266
  43. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_resource_types.yml +0 -266
  44. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_os_tpl_mixins.yml +0 -266
  45. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_resource_tpl_mixins.yml +0 -266
  46. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/looks_up_a_mixin_type_identifier_for_os_tpl.yml +0 -266
  47. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/looks_up_a_mixin_type_identifier_for_resource_tpl.yml +0 -266
  48. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/raises_an_error_when_looking_for_a_non-existent_mixin_type.yml +0 -266
  49. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/returns_nil_when_looking_for_a_non-existent_mixin.yml +0 -266
  50. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/returns_nil_when_looking_for_a_non-existent_mixin_of_a_specific_type.yml +0 -266
  51. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_compute_resource.yml +0 -266
  52. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_network_resource.yml +0 -266
  53. data/spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_storage_resource.yml +0 -266
@@ -15,7 +15,7 @@ http_interactions:
15
15
  message: OK
16
16
  headers:
17
17
  Date:
18
- - Thu, 10 Jan 2013 17:44:39 GMT
18
+ - Thu, 01 Jan 1970 00:00:00 GMT
19
19
  Server:
20
20
  - Apache/2.2.20 (Ubuntu)
21
21
  X-Powered-By:
@@ -27,9 +27,9 @@ http_interactions:
27
27
  Accept:
28
28
  - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
29
29
  Set-Cookie:
30
- - GRIDHTTP_PASSCODE=ec9b4b21351052e5aPTUJs; domain=localhost; path=/;
30
+ - GRIDHTTP_PASSCODE=0000000000000000000000; domain=localhost; path=/;
31
31
  secure
32
- - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFZTIyZmM5ZmI2OTliY2JiZWQyMjYz%0AN2IyNTQ3NjMyMDkxYTFkNWVhOGIwYjVkYTNhYTllMTYyYjdkZTZiMzhkY0ki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--24c9906d0e0c02c6976b065151f161a7e299022a;
32
+ - rack.session=000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A00000000000000000000000000000000000000000000000000%3D%3D%0A--0000000000000000000000000000000000000000;
33
33
  path=/; HttpOnly
34
34
  Content-Length:
35
35
  - '294'
@@ -43,7 +43,7 @@ http_interactions:
43
43
  encoding: US-ASCII
44
44
  string: ''
45
45
  http_version:
46
- recorded_at: Thu, 10 Jan 2013 17:44:39 GMT
46
+ recorded_at: Thu, 01 Jan 1970 00:00:00 GMT
47
47
  - request:
48
48
  method: head
49
49
  uri: https://localhost:3300/
@@ -59,7 +59,7 @@ http_interactions:
59
59
  message: OK
60
60
  headers:
61
61
  Date:
62
- - Thu, 10 Jan 2013 17:45:43 GMT
62
+ - Thu, 01 Jan 1970 00:00:00 GMT
63
63
  Server:
64
64
  - Apache/2.2.20 (Ubuntu)
65
65
  X-Powered-By:
@@ -71,9 +71,9 @@ http_interactions:
71
71
  Accept:
72
72
  - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
73
73
  Set-Cookie:
74
- - GRIDHTTP_PASSCODE=23378ddfc811a268qMhXlU; domain=localhost; path=/;
74
+ - GRIDHTTP_PASSCODE=0000000000000000000000; domain=localhost; path=/;
75
75
  secure
76
- - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFZjViYTc3NzA5ZTI3Y2E5YzRiNjcx%0AZDgzNzY4MGFhZWFjNjE0NjBkY2M2MTY5YTMyMjNkYjY5NDc4ODE5MjhlZkki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--90bf7886587ebf007079f5df947e0ceb8a310569;
76
+ - rack.session=000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A00000000000000000000000000000000000000000000000000%3D%3D%0A--0000000000000000000000000000000000000000;
77
77
  path=/; HttpOnly
78
78
  Content-Length:
79
79
  - '294'
@@ -87,7 +87,7 @@ http_interactions:
87
87
  encoding: US-ASCII
88
88
  string: ''
89
89
  http_version:
90
- recorded_at: Thu, 10 Jan 2013 17:45:43 GMT
90
+ recorded_at: Thu, 01 Jan 1970 00:00:00 GMT
91
91
  - request:
92
92
  method: get
93
93
  uri: https://localhost:3300/-/
@@ -103,7 +103,7 @@ http_interactions:
103
103
  message: OK
104
104
  headers:
105
105
  Date:
106
- - Thu, 10 Jan 2013 17:45:43 GMT
106
+ - Thu, 01 Jan 1970 00:00:00 GMT
107
107
  Server:
108
108
  - Apache/2.2.20 (Ubuntu)
109
109
  X-Powered-By:
@@ -115,9 +115,9 @@ http_interactions:
115
115
  Accept:
116
116
  - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
117
117
  Set-Cookie:
118
- - GRIDHTTP_PASSCODE=416d4de7a27bb847NmwMJR; domain=localhost; path=/;
118
+ - GRIDHTTP_PASSCODE=0000000000000000000000; domain=localhost; path=/;
119
119
  secure
120
- - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFNTVhZGFhMWIxNDAxMTA0MjI2OTNh%0AZjZmOWNiNWY0YjA5ZWMyM2I5MDlkMGNiOTE4YjE1YzJmMDg2NjQ1ZmYzM0ki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--25b8a7f39b71ca511baa01b7b561972809e56857;
120
+ - rack.session=000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A00000000000000000000000000000000000000000000000000%3D%3D%0A--0000000000000000000000000000000000000000;
121
121
  path=/; HttpOnly
122
122
  Content-Length:
123
123
  - '8975'
@@ -262,7 +262,7 @@ http_interactions:
262
262
 
263
263
  '
264
264
  http_version:
265
- recorded_at: Thu, 10 Jan 2013 17:45:43 GMT
265
+ recorded_at: Thu, 01 Jan 1970 00:00:00 GMT
266
266
  - request:
267
267
  method: head
268
268
  uri: https://localhost:3300/
@@ -278,7 +278,7 @@ http_interactions:
278
278
  message: OK
279
279
  headers:
280
280
  Date:
281
- - Thu, 10 Jan 2013 17:44:39 GMT
281
+ - Thu, 01 Jan 1970 00:00:00 GMT
282
282
  Server:
283
283
  - Apache/2.2.20 (Ubuntu)
284
284
  X-Powered-By:
@@ -290,9 +290,9 @@ http_interactions:
290
290
  Accept:
291
291
  - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
292
292
  Set-Cookie:
293
- - GRIDHTTP_PASSCODE=ec9b4b21351052e5aPTUJs; domain=localhost; path=/;
293
+ - GRIDHTTP_PASSCODE=0000000000000000000000; domain=localhost; path=/;
294
294
  secure
295
- - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFZTIyZmM5ZmI2OTliY2JiZWQyMjYz%0AN2IyNTQ3NjMyMDkxYTFkNWVhOGIwYjVkYTNhYTllMTYyYjdkZTZiMzhkY0ki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--24c9906d0e0c02c6976b065151f161a7e299022a;
295
+ - rack.session=000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A00000000000000000000000000000000000000000000000000%3D%3D%0A--0000000000000000000000000000000000000000;
296
296
  path=/; HttpOnly
297
297
  Content-Length:
298
298
  - '294'
@@ -306,7 +306,7 @@ http_interactions:
306
306
  encoding: US-ASCII
307
307
  string: ''
308
308
  http_version:
309
- recorded_at: Thu, 10 Jan 2013 17:44:39 GMT
309
+ recorded_at: Thu, 01 Jan 1970 00:00:00 GMT
310
310
  - request:
311
311
  method: get
312
312
  uri: https://localhost:3300/-/
@@ -322,7 +322,7 @@ http_interactions:
322
322
  message: OK
323
323
  headers:
324
324
  Date:
325
- - Thu, 10 Jan 2013 17:45:44 GMT
325
+ - Thu, 01 Jan 1970 00:00:00 GMT
326
326
  Server:
327
327
  - Apache/2.2.20 (Ubuntu)
328
328
  X-Powered-By:
@@ -334,9 +334,9 @@ http_interactions:
334
334
  Accept:
335
335
  - application/occi+json,application/json,text/plain,text/uri-list,application/xml,text/xml,application/occi+xml,text/occi
336
336
  Set-Cookie:
337
- - GRIDHTTP_PASSCODE=a6fae8178008ce22N1w4CG; domain=localhost; path=/;
337
+ - GRIDHTTP_PASSCODE=0000000000000000000000; domain=localhost; path=/;
338
338
  secure
339
- - rack.session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiJFNWExZDg2ZGI2MTBiN2E5Zjc1OTYy%0AMzkyYmE0MDZkZjliMzAwNDY5ODY3MWZiNjFhOWUyNjI5YWYwMmZmN2Q3MUki%0ADXRyYWNraW5nBjsARnsISSIUSFRUUF9VU0VSX0FHRU5UBjsARiItZGEzOWEz%0AZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUND%0ARVBUX0VOQ09ESU5HBjsARiItZGEzOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2%0AMDE4OTBhZmQ4MDcwOUkiGUhUVFBfQUNDRVBUX0xBTkdVQUdFBjsARiItZGEz%0AOWEzZWU1ZTZiNGIwZDMyNTViZmVmOTU2MDE4OTBhZmQ4MDcwOQ%3D%3D%0A--4129ed877cba9333f2f61d5de80461680579fe90;
339
+ - rack.session=000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A00000000000000000000000000000000000000000000000000%3D%3D%0A--0000000000000000000000000000000000000000;
340
340
  path=/; HttpOnly
341
341
  Content-Length:
342
342
  - '8975'
@@ -481,5 +481,5 @@ http_interactions:
481
481
 
482
482
  '
483
483
  http_version:
484
- recorded_at: Thu, 10 Jan 2013 17:45:44 GMT
484
+ recorded_at: Thu, 01 Jan 1970 00:00:00 GMT
485
485
  recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ instantiates_a_storage_resource_using_type_identifier.yml net_http_example_response.yml
2
+ instantiates_a_compute_resource_using_type_identifier.yml net_http_example_response.yml
3
+ creates_a_new_compute_resource.yml net_http_example_response.yml
4
+ lists_all_available_mixin_types.yml net_http_example_response.yml
5
+ instantiates_a_network_resource_using_type_name.yml net_http_example_response.yml
6
+ raises_an_error_when_looking_for_a_non-existent_mixin_type.yml net_http_example_response.yml
7
+ instantiates_a_network_resource_using_type_identifier.yml net_http_example_response.yml
8
+ instantiates_a_storage_resource_using_type_name.yml net_http_example_response.yml
9
+ deletes_a_compute_resource.yml net_http_example_response.yml
10
+ deletes_a_network_resource.yml net_http_example_response.yml
11
+ lists_all_available_entity_types.yml net_http_example_response.yml
12
+ finds_and_describes_scoped_os_tpl_mixin.yml net_http_example_response.yml
13
+ looks_up_a_mixin_type_identifier_for_os_tpl.yml net_http_example_response.yml
14
+ lists_all_available_mixin_type_identifiers.yml net_http_example_response.yml
15
+ creates_a_new_network_resource.yml net_http_example_response.yml
16
+ lists_all_available_link_type_identifiers.yml net_http_example_response.yml
17
+ looks_up_a_mixin_type_identifier_for_resource_tpl.yml net_http_example_response.yml
18
+ triggers_an_action_on_a_storage_resource.yml net_http_example_response.yml
19
+ lists_all_available_entity_type_identifiers.yml net_http_example_response.yml
20
+ lists_all_available_resource_types.yml net_http_example_response.yml
21
+ deploys_an_instance_based_on_OVF_OVA_file.yml net_http_example_response.yml
22
+ returns_nil_when_looking_for_a_non-existent_mixin_of_a_specific_type.yml net_http_example_response.yml
23
+ finds_and_describes_unscoped_mixin.yml net_http_example_response.yml
24
+ finds_and_describes_scoped_resource_tpl_mixin.yml net_http_example_response.yml
25
+ lists_all_available_resource_type_identifiers.yml net_http_example_response.yml
26
+ describes_all_available_mixins.yml net_http_example_response.yml
27
+ lists_resource_tpl_mixins.yml net_http_example_response.yml
28
+ triggers_an_action_on_a_compute_resource.yml net_http_example_response.yml
29
+ triggers_an_action_on_a_network_resource.yml net_http_example_response.yml
30
+ deletes_a_storage_resource.yml net_http_example_response.yml
31
+ returns_nil_when_looking_for_a_non-existent_mixin.yml net_http_example_response.yml
32
+ lists_all_available_link_types.yml net_http_example_response.yml
33
+ net_http_example_response.yml net_http_example_response.yml
34
+ creates_a_new_storage_resource.yml net_http_example_response.yml
35
+ lists_os_tpl_mixins.yml net_http_example_response.yml
36
+ instantiates_a_compute_resource_using_type_name.yml net_http_example_response.yml
37
+ lists_all_available_mixins.yml net_http_example_response.yml
38
+
@@ -0,0 +1,26 @@
1
+ #!/bin/bash
2
+
3
+ if [ "$1" == '-h' ]; then
4
+ printf "This tool searches the specified YML cassette and resets all time/session\nspecific details, making it much easier to find duplicates.\n\nUsage:\n\n$0 <yml_file>\n\n"
5
+ exit 0
6
+ fi
7
+
8
+ INFILE=$1
9
+
10
+ if [ -f "$INFILE" ]; then
11
+
12
+ # Dates
13
+ sed -r -i 's/(Mon|Tue|Wed|Thu|Fri|Sat|Sun).*GMT/Thu, 01 Jan 1970 00:00:00 GMT/' $INFILE
14
+
15
+ #GRIDHTTP_PASSCODE
16
+ sed -r -i 's/GRIDHTTP_PASSCODE=[a-zA-Z0-9]*/GRIDHTTP_PASSCODE=0000000000000000000000/' $INFILE
17
+
18
+ #rack.session
19
+ sed -r -i 's/rack.session=[^;]*/rack.session=000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A000000000000000000000000000000000000000000000000000000000000%0A00000000000000000000000000000000000000000000000000%3D%3D%0A--0000000000000000000000000000000000000000/' $INFILE
20
+
21
+ else
22
+ printf "\n$0: File to generalize must be passed as argument.\n" >&2
23
+ exit 1
24
+ fi
25
+
26
+ exit 0
@@ -0,0 +1,53 @@
1
+ module Occi
2
+ module Api
3
+ module Client
4
+ module Base
5
+ module Stubs
6
+ describe 'Stubs' do
7
+
8
+ context 'list' #do
9
+ # it 'raises NotImplementedError' do
10
+ # expect{ Occi::Api::Client::Base::Stubs.list(nil) }.to raise_exception Occi::Api::Client::Errors::NotImplementedError
11
+ # end
12
+ # end
13
+
14
+ context 'describe' #do
15
+ # describe(resource_type_identifier=nil)
16
+ # end
17
+
18
+ context 'create' #do
19
+ # create(entity)
20
+ # end
21
+
22
+ context 'deploy' #do
23
+ # deploy(location)
24
+ # end
25
+
26
+ context 'deploy_ovf' #do
27
+ # deploy_ovf(descriptor)
28
+ # end
29
+
30
+ context 'deploy_ova' #do
31
+ # deploy_ova(descriptor)
32
+ # end
33
+
34
+ context 'delete' #do
35
+ # delete(resource_type_identifier)
36
+ # end
37
+
38
+ context 'trigger' #do
39
+ # trigger(resource_type_identifier, action_instance)
40
+ # end
41
+
42
+ context 'refresh' #do
43
+ # refresh
44
+ # end
45
+
46
+
47
+
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -4,7 +4,7 @@ module Occi
4
4
  module Api
5
5
  module Client
6
6
 
7
- vcr_options = { :record => :new_episodes }
7
+ vcr_options = { :record => :new_episodes, :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/net_http_example_response" }
8
8
  describe ClientHttp, :vcr => vcr_options do
9
9
 
10
10
  context "using media type text/plain" do
@@ -116,15 +116,15 @@ module Occi
116
116
  )
117
117
  end
118
118
 
119
- it "lists compute resources" do
119
+ it "lists compute resources", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_compute_resources" } do
120
120
  @client.list("compute").should eq ["https://localhost:3300/compute/c62fce01-0d8e-510c-ba07-973b0d6d5034"]
121
121
  end
122
122
 
123
- it "lists network resources" do
123
+ it "lists network resources", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_network_resources" } do
124
124
  @client.list("network").should eq ["https://localhost:3300/network/1e8e0d63-e3c8-5be7-8a46-f4df226bca01"]
125
125
  end
126
126
 
127
- it "lists storage resources" do
127
+ it "lists storage resources", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_storage_resources" } do
128
128
  @client.list("storage").should include(
129
129
  "https://localhost:3300/storage/32fc6c92-88aa-54dc-b814-be0df741278e",
130
130
  "https://localhost:3300/storage/5c1a7099-859e-5c3d-9386-740edbb610b8"
@@ -149,6 +149,26 @@ module Occi
149
149
  expect(@client.get_os_tpls).to eq mixins
150
150
  end
151
151
 
152
+ it "lists mixins including self" do
153
+ mixins = Occi::Core::Mixins.new
154
+ mixins << Occi::Core::Mixin.new("http://schemas.ogf.org/occi/infrastructure#", "os_tpl")
155
+ mixins << Occi::Core::Mixin.new("http://occi.localhost:3300/occi/infrastructure/os_tpl#", "mytesttemplate")
156
+
157
+ expect(@client.get_mixins("os_tpl", true)).to eq mixins
158
+ end
159
+
160
+ it "lists mixins with only self (no related)" do
161
+ mixins = Occi::Core::Mixins.new
162
+ mixins << Occi::Core::Mixin.new("http://occi.localhost:3300/occi/infrastructure/os_tpl#", "mytesttemplate")
163
+
164
+ expect(@client.get_mixins("http://occi.localhost:3300/occi/infrastructure/os_tpl#mytesttemplate", true)).to eq mixins
165
+ end
166
+
167
+ it "fails to list mixins with only self (no related) without include_self=true" do
168
+ mixins = Occi::Core::Mixins.new
169
+ expect(@client.get_mixins("http://occi.localhost:3300/occi/infrastructure/os_tpl#mytesttemplate")).to eq mixins
170
+ end
171
+
152
172
  it "lists resource_tpl mixins" do
153
173
  mixins = Occi::Core::Mixins.new
154
174
  mixins << Occi::Core::Mixin.new("http://occi.localhost:3300/occi/infrastructure/resource_tpl#", "large")
@@ -160,7 +180,7 @@ module Occi
160
180
  expect(@client.get_resource_tpls).to eq mixins
161
181
  end
162
182
 
163
- it "describes compute resources" do
183
+ it "describes compute resources", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_compute_resources" } do
164
184
  cmpts = @client.describe("compute")
165
185
 
166
186
  cmpts.length.should eq 1
@@ -171,7 +191,7 @@ module Occi
171
191
  cmpts.first.attributes['occi.compute.memory'].should eq(1.564)
172
192
  end
173
193
 
174
- it "describes network resources" do
194
+ it "describes network resources", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_network_resources" } do
175
195
  nets = @client.describe "network"
176
196
 
177
197
  nets.length.should eq 1
@@ -181,7 +201,7 @@ module Occi
181
201
  nets.first.attributes['org.opennebula.network.id'].should eq("1")
182
202
  end
183
203
 
184
- it "describes storage resources" do
204
+ it "describes storage resources", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_storage_resources" } do
185
205
  stors = @client.describe "storage"
186
206
 
187
207
  stors.length.should eq 2
@@ -252,7 +272,7 @@ module Occi
252
272
 
253
273
  it "triggers an action on a network resource"
254
274
 
255
- it "refreshes its model" do
275
+ it "refreshes its model", :vcr => { :cassette_name => "Occi_Api_Client_ClientHttp/using_media_type_text_plain/refreshes_its_model" } do
256
276
  @client.refresh
257
277
  end
258
278
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occi-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.beta.6
5
- prerelease: 6
4
+ version: 4.2.0.beta.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Florian Feldhaus
@@ -11,12 +10,11 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-12-10 00:00:00.000000000 Z
13
+ date: 2014-01-09 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: occi-core
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
19
  - - ~>
22
20
  - !ruby/object:Gem::Version
@@ -24,7 +22,6 @@ dependencies:
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
26
  - - ~>
30
27
  - !ruby/object:Gem::Version
@@ -32,7 +29,6 @@ dependencies:
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: httparty
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
33
  - - ! '>='
38
34
  - !ruby/object:Gem::Version
@@ -40,7 +36,6 @@ dependencies:
40
36
  type: :runtime
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
40
  - - ! '>='
46
41
  - !ruby/object:Gem::Version
@@ -48,7 +43,6 @@ dependencies:
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: json
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
47
  - - ! '>='
54
48
  - !ruby/object:Gem::Version
@@ -56,7 +50,6 @@ dependencies:
56
50
  type: :runtime
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
54
  - - ! '>='
62
55
  - !ruby/object:Gem::Version
@@ -120,51 +113,19 @@ files:
120
113
  - lib/occi/api/dsl/type_methods.rb
121
114
  - lib/occi/api/version.rb
122
115
  - occi-api.gemspec
123
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_compute_resource.yml
124
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_network_resource.yml
125
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/creates_a_new_storage_resource.yml
126
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_compute_resource.yml
127
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_network_resource.yml
128
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deletes_a_storage_resource.yml
129
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/deploys_an_instance_based_on_OVF_OVA_file.yml
130
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_all_available_mixins.yml
131
116
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_compute_resources.yml
132
117
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_network_resources.yml
133
118
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/describes_storage_resources.yml
134
119
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/establishes_connection.yml
135
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_scoped_os_tpl_mixin.yml
136
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_scoped_resource_tpl_mixin.yml
137
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/finds_and_describes_unscoped_mixin.yml
138
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_compute_resource_using_type_identifier.yml
139
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_compute_resource_using_type_name.yml
140
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_network_resource_using_type_identifier.yml
141
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_network_resource_using_type_name.yml
142
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_storage_resource_using_type_identifier.yml
143
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/instantiates_a_storage_resource_using_type_name.yml
144
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_entity_type_identifiers.yml
145
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_entity_types.yml
146
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_link_type_identifiers.yml
147
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_link_types.yml
148
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixin_type_identifiers.yml
149
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixin_types.yml
150
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_mixins.yml
151
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_resource_type_identifiers.yml
152
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_all_available_resource_types.yml
153
120
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_compute_resources.yml
154
121
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_network_resources.yml
155
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_os_tpl_mixins.yml
156
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_resource_tpl_mixins.yml
157
122
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/lists_storage_resources.yml
158
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/looks_up_a_mixin_type_identifier_for_os_tpl.yml
159
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/looks_up_a_mixin_type_identifier_for_resource_tpl.yml
160
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/raises_an_error_when_looking_for_a_non-existent_mixin_type.yml
123
+ - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/net_http_example_response.yml
161
124
  - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/refreshes_its_model.yml
162
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/returns_nil_when_looking_for_a_non-existent_mixin.yml
163
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/returns_nil_when_looking_for_a_non-existent_mixin_of_a_specific_type.yml
164
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_compute_resource.yml
165
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_network_resource.yml
166
- - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/triggers_an_action_on_a_storage_resource.yml
125
+ - spec/cassettes/Occi_Api_Client_ClientHttp/using_media_type_text_plain/replacements.txt
126
+ - spec/cassettes/tools/generalize_yml.sh
167
127
  - spec/occi/api/client/authn_utils_spec.rb
128
+ - spec/occi/api/client/base/stubs_spec.rb
168
129
  - spec/occi/api/client/client_http_spec.rb
169
130
  - spec/occi/api/client/http/httparty_fix_spec.rb
170
131
  - spec/occi/api/client/http/net_http_fix_spec.rb
@@ -177,26 +138,25 @@ files:
177
138
  homepage: https://github.com/gwdg/rOCCI-api
178
139
  licenses:
179
140
  - Apache License, Version 2.0
141
+ metadata: {}
180
142
  post_install_message:
181
143
  rdoc_options: []
182
144
  require_paths:
183
145
  - lib
184
146
  required_ruby_version: !ruby/object:Gem::Requirement
185
- none: false
186
147
  requirements:
187
148
  - - ! '>='
188
149
  - !ruby/object:Gem::Version
189
150
  version: 1.9.3
190
151
  required_rubygems_version: !ruby/object:Gem::Requirement
191
- none: false
192
152
  requirements:
193
153
  - - ! '>'
194
154
  - !ruby/object:Gem::Version
195
155
  version: 1.3.1
196
156
  requirements: []
197
157
  rubyforge_project:
198
- rubygems_version: 1.8.25
158
+ rubygems_version: 2.1.11
199
159
  signing_key:
200
- specification_version: 3
160
+ specification_version: 4
201
161
  summary: OCCI development library providing a high-level API
202
162
  test_files: []