occi-core 4.1.3 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/.gitignore +1 -0
  2. data/Gemfile +8 -0
  3. data/README.md +49 -17
  4. data/lib/occi/collection.rb +37 -21
  5. data/lib/occi/core/action.rb +5 -5
  6. data/lib/occi/core/action_instance.rb +45 -3
  7. data/lib/occi/core/actions.rb +2 -1
  8. data/lib/occi/core/attributes.rb +253 -73
  9. data/lib/occi/core/categories.rb +1 -0
  10. data/lib/occi/core/category.rb +25 -8
  11. data/lib/occi/core/entities.rb +1 -0
  12. data/lib/occi/core/entity.rb +51 -74
  13. data/lib/occi/core/kind.rb +15 -11
  14. data/lib/occi/core/kinds.rb +1 -1
  15. data/lib/occi/core/link.rb +14 -15
  16. data/lib/occi/core/links.rb +1 -1
  17. data/lib/occi/core/mixin.rb +5 -5
  18. data/lib/occi/core/mixins.rb +2 -2
  19. data/lib/occi/core/properties.rb +90 -12
  20. data/lib/occi/core/resource.rb +7 -3
  21. data/lib/occi/core/resources.rb +2 -2
  22. data/lib/occi/errors/attribute_definitions_converted_error.rb +5 -0
  23. data/lib/occi/errors/attribute_missing_error.rb +5 -0
  24. data/lib/occi/errors/attribute_name_invalid_error.rb +5 -0
  25. data/lib/occi/errors/attribute_not_defined_error.rb +5 -0
  26. data/lib/occi/errors/attribute_property_type_error.rb +5 -0
  27. data/lib/occi/errors/attribute_type_error.rb +5 -0
  28. data/lib/occi/errors/kind_not_defined_error.rb +5 -0
  29. data/lib/occi/errors/parser_input_error.rb +5 -0
  30. data/lib/occi/errors/parser_type_error.rb +5 -0
  31. data/lib/occi/errors.rb +1 -0
  32. data/lib/occi/extensions/hashie.rb +25 -0
  33. data/lib/occi/helpers/comparators/action_instance.rb +22 -0
  34. data/lib/occi/helpers/comparators/attributes.rb +22 -0
  35. data/lib/occi/helpers/comparators/categories.rb +22 -0
  36. data/lib/occi/helpers/comparators/category.rb +22 -0
  37. data/lib/occi/helpers/comparators/collection.rb +40 -0
  38. data/lib/occi/helpers/comparators/entities.rb +22 -0
  39. data/lib/occi/helpers/comparators/entity.rb +22 -0
  40. data/lib/occi/helpers/comparators/properties.rb +26 -0
  41. data/lib/occi/helpers/comparators.rb +1 -0
  42. data/lib/occi/infrastructure/compute.rb +11 -9
  43. data/lib/occi/infrastructure/network.rb +27 -27
  44. data/lib/occi/infrastructure/networkinterface.rb +22 -23
  45. data/lib/occi/infrastructure/os_tpl.rb +1 -1
  46. data/lib/occi/infrastructure/resource_tpl.rb +1 -1
  47. data/lib/occi/infrastructure/storage.rb +7 -6
  48. data/lib/occi/infrastructure/storagelink.rb +4 -4
  49. data/lib/occi/log.rb +13 -10
  50. data/lib/occi/model.rb +9 -8
  51. data/lib/occi/parser/json.rb +11 -9
  52. data/lib/occi/parser/ova.rb +12 -6
  53. data/lib/occi/parser/ovf.rb +173 -116
  54. data/lib/occi/parser/text/constants.rb +87 -0
  55. data/lib/occi/parser/text.rb +161 -200
  56. data/lib/occi/parser/xml.rb +10 -8
  57. data/lib/occi/parser.rb +100 -50
  58. data/lib/occi/settings.rb +2 -1
  59. data/lib/occi/version.rb +1 -1
  60. data/lib/occi-core.rb +6 -4
  61. data/occi-core.gemspec +0 -7
  62. data/spec/occi/collection_samples/collection1.json +1 -0
  63. data/spec/occi/collection_samples/directory2/collection2.json +1 -0
  64. data/spec/occi/collection_spec.rb +961 -31
  65. data/spec/occi/core/action_instance_spec.rb +317 -0
  66. data/spec/occi/core/action_spec.rb +71 -0
  67. data/spec/occi/core/attributes_spec.rb +582 -27
  68. data/spec/occi/core/category_spec.rb +194 -18
  69. data/spec/occi/core/entities_spec.rb +96 -0
  70. data/spec/occi/core/entity_spec.rb +317 -28
  71. data/spec/occi/core/kind_spec.rb +127 -16
  72. data/spec/occi/core/link_spec.rb +35 -0
  73. data/spec/occi/core/links_spec.rb +130 -0
  74. data/spec/occi/core/mixins_spec.rb +107 -0
  75. data/spec/occi/core/properties_spec.rb +167 -0
  76. data/spec/occi/core/resource_spec.rb +23 -9
  77. data/spec/occi/core_spec.rb +12 -0
  78. data/spec/occi/infrastructure/compute_spec.rb +218 -18
  79. data/spec/occi/infrastructure/network_spec.rb +96 -0
  80. data/spec/occi/infrastructure/networkinterface_spec.rb +96 -0
  81. data/spec/occi/infrastructure/storage_spec.rb +33 -0
  82. data/spec/occi/infrastructure/storagelink_spec.rb +45 -0
  83. data/spec/occi/log_spec.rb +104 -1
  84. data/spec/occi/model_spec.rb +251 -39
  85. data/spec/occi/{test.json → parser/json_samples/test.json} +0 -0
  86. data/spec/occi/parser/ova_samples/test.dump +0 -0
  87. data/spec/occi/{test.ova → parser/ova_samples/test.ova} +0 -0
  88. data/spec/occi/parser/ovf_samples/test.dump +0 -0
  89. data/spec/occi/{test.ovf → parser/ovf_samples/test.ovf} +0 -0
  90. data/spec/occi/parser/text_samples/occi_categories.dump +0 -0
  91. data/spec/occi/parser/text_samples/occi_categories.text +2 -0
  92. data/spec/occi/parser/text_samples/occi_compute_rocci_server.dump +0 -0
  93. data/spec/occi/parser/text_samples/occi_compute_rocci_server.resource.dump +0 -0
  94. data/spec/occi/parser/text_samples/occi_compute_rocci_server.text +10 -0
  95. data/spec/occi/parser/text_samples/occi_link_resource_instance.dump +0 -0
  96. data/spec/occi/parser/text_samples/occi_link_resource_instance.text +7 -0
  97. data/spec/occi/parser/text_samples/occi_link_simple.dump +0 -0
  98. data/spec/occi/parser/text_samples/occi_link_simple.link_string.dump +0 -0
  99. data/spec/occi/parser/text_samples/occi_link_simple.text +1 -0
  100. data/spec/occi/parser/text_samples/occi_link_w_attributes.dump +0 -0
  101. data/spec/occi/parser/text_samples/occi_link_w_attributes.text +7 -0
  102. data/spec/occi/parser/text_samples/occi_link_w_category.dump +0 -0
  103. data/spec/occi/parser/text_samples/occi_link_w_category.text +3 -0
  104. data/spec/occi/parser/text_samples/occi_model_rocci_server.dump +0 -0
  105. data/spec/occi/parser/text_samples/occi_model_rocci_server.text +51 -0
  106. data/spec/occi/parser/text_samples/occi_network_rocci_server.dump +0 -0
  107. data/spec/occi/parser/text_samples/occi_network_rocci_server.resource.dump +0 -0
  108. data/spec/occi/parser/text_samples/occi_network_rocci_server.text +11 -0
  109. data/spec/occi/parser/text_samples/occi_resource_w_attributes.dump +0 -0
  110. data/spec/occi/parser/text_samples/occi_resource_w_attributes.text +11 -0
  111. data/spec/occi/parser/text_samples/occi_resource_w_inline_links.dump +0 -0
  112. data/spec/occi/parser/text_samples/occi_resource_w_inline_links.text +16 -0
  113. data/spec/occi/parser/text_samples/occi_resource_w_inline_links_only.dump +0 -0
  114. data/spec/occi/parser/text_samples/occi_resource_w_inline_links_only.text +13 -0
  115. data/spec/occi/parser/text_samples/occi_storage_rocci_server.dump +0 -0
  116. data/spec/occi/parser/text_samples/occi_storage_rocci_server.resource.dump +0 -0
  117. data/spec/occi/parser/text_samples/occi_storage_rocci_server.text +9 -0
  118. data/spec/occi/parser/text_spec.rb +274 -78
  119. data/spec/occi/parser/xml_samples/test.xml +352 -0
  120. data/spec/occi/parser_spec.rb +255 -104
  121. data/spec/occi-core_spec.rb +31 -0
  122. data/spec/spec_helper.rb +6 -2
  123. metadata +110 -111
  124. checksums.yaml +0 -7
  125. data/spec/occi/core/attribute_spec.rb +0 -0
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occi-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.3
4
+ version: 4.2.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Florian Feldhaus
@@ -10,174 +11,102 @@ authors:
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2014-10-13 00:00:00.000000000 Z
14
+ date: 2013-12-03 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: json
17
18
  requirement: !ruby/object:Gem::Requirement
19
+ none: false
18
20
  requirements:
19
- - - ">="
21
+ - - ! '>='
20
22
  - !ruby/object:Gem::Version
21
23
  version: '0'
22
24
  type: :runtime
23
25
  prerelease: false
24
26
  version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
25
28
  requirements:
26
- - - ">="
29
+ - - ! '>='
27
30
  - !ruby/object:Gem::Version
28
31
  version: '0'
29
32
  - !ruby/object:Gem::Dependency
30
33
  name: hashie
31
34
  requirement: !ruby/object:Gem::Requirement
35
+ none: false
32
36
  requirements:
33
- - - ">="
37
+ - - ! '>='
34
38
  - !ruby/object:Gem::Version
35
39
  version: '0'
36
40
  type: :runtime
37
41
  prerelease: false
38
42
  version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
39
44
  requirements:
40
- - - ">="
45
+ - - ! '>='
41
46
  - !ruby/object:Gem::Version
42
47
  version: '0'
43
48
  - !ruby/object:Gem::Dependency
44
49
  name: uuidtools
45
50
  requirement: !ruby/object:Gem::Requirement
51
+ none: false
46
52
  requirements:
47
- - - ">="
53
+ - - ! '>='
48
54
  - !ruby/object:Gem::Version
49
55
  version: 2.1.3
50
56
  type: :runtime
51
57
  prerelease: false
52
58
  version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
53
60
  requirements:
54
- - - ">="
61
+ - - ! '>='
55
62
  - !ruby/object:Gem::Version
56
63
  version: 2.1.3
57
64
  - !ruby/object:Gem::Dependency
58
65
  name: nokogiri
59
66
  requirement: !ruby/object:Gem::Requirement
67
+ none: false
60
68
  requirements:
61
- - - "~>"
69
+ - - ~>
62
70
  - !ruby/object:Gem::Version
63
71
  version: 1.6.0
64
72
  type: :runtime
65
73
  prerelease: false
66
74
  version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
67
76
  requirements:
68
- - - "~>"
77
+ - - ~>
69
78
  - !ruby/object:Gem::Version
70
79
  version: 1.6.0
71
80
  - !ruby/object:Gem::Dependency
72
81
  name: activesupport
73
82
  requirement: !ruby/object:Gem::Requirement
83
+ none: false
74
84
  requirements:
75
- - - "~>"
85
+ - - ~>
76
86
  - !ruby/object:Gem::Version
77
87
  version: 4.0.0
78
88
  type: :runtime
79
89
  prerelease: false
80
90
  version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
81
92
  requirements:
82
- - - "~>"
93
+ - - ~>
83
94
  - !ruby/object:Gem::Version
84
95
  version: 4.0.0
85
96
  - !ruby/object:Gem::Dependency
86
97
  name: settingslogic
87
98
  requirement: !ruby/object:Gem::Requirement
99
+ none: false
88
100
  requirements:
89
- - - ">="
101
+ - - ! '>='
90
102
  - !ruby/object:Gem::Version
91
103
  version: '0'
92
104
  type: :runtime
93
105
  prerelease: false
94
106
  version_requirements: !ruby/object:Gem::Requirement
107
+ none: false
95
108
  requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: '0'
99
- - !ruby/object:Gem::Dependency
100
- name: rspec
101
- requirement: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: '0'
106
- type: :development
107
- prerelease: false
108
- version_requirements: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '0'
113
- - !ruby/object:Gem::Dependency
114
- name: rake
115
- requirement: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: '0'
120
- type: :development
121
- prerelease: false
122
- version_requirements: !ruby/object:Gem::Requirement
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
- - !ruby/object:Gem::Dependency
128
- name: builder
129
- requirement: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- version: '0'
141
- - !ruby/object:Gem::Dependency
142
- name: simplecov
143
- requirement: !ruby/object:Gem::Requirement
144
- requirements:
145
- - - ">="
146
- - !ruby/object:Gem::Version
147
- version: '0'
148
- type: :development
149
- prerelease: false
150
- version_requirements: !ruby/object:Gem::Requirement
151
- requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- version: '0'
155
- - !ruby/object:Gem::Dependency
156
- name: yard
157
- requirement: !ruby/object:Gem::Requirement
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- version: '0'
162
- type: :development
163
- prerelease: false
164
- version_requirements: !ruby/object:Gem::Requirement
165
- requirements:
166
- - - ">="
167
- - !ruby/object:Gem::Version
168
- version: '0'
169
- - !ruby/object:Gem::Dependency
170
- name: yard-rspec
171
- requirement: !ruby/object:Gem::Requirement
172
- requirements:
173
- - - ">="
174
- - !ruby/object:Gem::Version
175
- version: '0'
176
- type: :development
177
- prerelease: false
178
- version_requirements: !ruby/object:Gem::Requirement
179
- requirements:
180
- - - ">="
109
+ - - ! '>='
181
110
  - !ruby/object:Gem::Version
182
111
  version: '0'
183
112
  description: OCCI is a collection of classes to simplify the implementation of the
@@ -190,10 +119,10 @@ executables: []
190
119
  extensions: []
191
120
  extra_rdoc_files: []
192
121
  files:
193
- - ".gitignore"
194
- - ".rspec"
195
- - ".travis.yml"
196
- - ".yardopts"
122
+ - .gitignore
123
+ - .rspec
124
+ - .travis.yml
125
+ - .yardopts
197
126
  - AUTHORS
198
127
  - Gemfile
199
128
  - LICENSE
@@ -221,6 +150,26 @@ files:
221
150
  - lib/occi/core/properties.rb
222
151
  - lib/occi/core/resource.rb
223
152
  - lib/occi/core/resources.rb
153
+ - lib/occi/errors.rb
154
+ - lib/occi/errors/attribute_definitions_converted_error.rb
155
+ - lib/occi/errors/attribute_missing_error.rb
156
+ - lib/occi/errors/attribute_name_invalid_error.rb
157
+ - lib/occi/errors/attribute_not_defined_error.rb
158
+ - lib/occi/errors/attribute_property_type_error.rb
159
+ - lib/occi/errors/attribute_type_error.rb
160
+ - lib/occi/errors/kind_not_defined_error.rb
161
+ - lib/occi/errors/parser_input_error.rb
162
+ - lib/occi/errors/parser_type_error.rb
163
+ - lib/occi/extensions/hashie.rb
164
+ - lib/occi/helpers/comparators.rb
165
+ - lib/occi/helpers/comparators/action_instance.rb
166
+ - lib/occi/helpers/comparators/attributes.rb
167
+ - lib/occi/helpers/comparators/categories.rb
168
+ - lib/occi/helpers/comparators/category.rb
169
+ - lib/occi/helpers/comparators/collection.rb
170
+ - lib/occi/helpers/comparators/entities.rb
171
+ - lib/occi/helpers/comparators/entity.rb
172
+ - lib/occi/helpers/comparators/properties.rb
224
173
  - lib/occi/helpers/inspect.rb
225
174
  - lib/occi/infrastructure.rb
226
175
  - lib/occi/infrastructure/compute.rb
@@ -239,49 +188,99 @@ files:
239
188
  - lib/occi/parser/ova.rb
240
189
  - lib/occi/parser/ovf.rb
241
190
  - lib/occi/parser/text.rb
191
+ - lib/occi/parser/text/constants.rb
242
192
  - lib/occi/parser/xml.rb
243
193
  - lib/occi/settings.rb
244
194
  - lib/occi/version.rb
245
195
  - occi-core.gemspec
196
+ - spec/occi-core_spec.rb
197
+ - spec/occi/collection_samples/collection1.json
198
+ - spec/occi/collection_samples/directory2/collection2.json
246
199
  - spec/occi/collection_spec.rb
247
- - spec/occi/core/attribute_spec.rb
200
+ - spec/occi/core/action_instance_spec.rb
201
+ - spec/occi/core/action_spec.rb
248
202
  - spec/occi/core/attributes_spec.rb
249
203
  - spec/occi/core/categories_spec.rb
250
204
  - spec/occi/core/category_spec.rb
205
+ - spec/occi/core/entities_spec.rb
251
206
  - spec/occi/core/entity_spec.rb
252
207
  - spec/occi/core/kind_spec.rb
208
+ - spec/occi/core/link_spec.rb
209
+ - spec/occi/core/links_spec.rb
210
+ - spec/occi/core/mixins_spec.rb
211
+ - spec/occi/core/properties_spec.rb
253
212
  - spec/occi/core/resource_spec.rb
213
+ - spec/occi/core_spec.rb
254
214
  - spec/occi/infrastructure/compute_spec.rb
215
+ - spec/occi/infrastructure/network_spec.rb
216
+ - spec/occi/infrastructure/networkinterface_spec.rb
217
+ - spec/occi/infrastructure/storage_spec.rb
218
+ - spec/occi/infrastructure/storagelink_spec.rb
255
219
  - spec/occi/log_spec.rb
256
220
  - spec/occi/model_spec.rb
221
+ - spec/occi/parser/json_samples/test.json
222
+ - spec/occi/parser/ova_samples/test.dump
223
+ - spec/occi/parser/ova_samples/test.ova
224
+ - spec/occi/parser/ovf_samples/test.dump
225
+ - spec/occi/parser/ovf_samples/test.ovf
226
+ - spec/occi/parser/text_samples/occi_categories.dump
227
+ - spec/occi/parser/text_samples/occi_categories.text
228
+ - spec/occi/parser/text_samples/occi_compute_rocci_server.dump
229
+ - spec/occi/parser/text_samples/occi_compute_rocci_server.resource.dump
230
+ - spec/occi/parser/text_samples/occi_compute_rocci_server.text
231
+ - spec/occi/parser/text_samples/occi_link_resource_instance.dump
232
+ - spec/occi/parser/text_samples/occi_link_resource_instance.text
233
+ - spec/occi/parser/text_samples/occi_link_simple.dump
234
+ - spec/occi/parser/text_samples/occi_link_simple.link_string.dump
235
+ - spec/occi/parser/text_samples/occi_link_simple.text
236
+ - spec/occi/parser/text_samples/occi_link_w_attributes.dump
237
+ - spec/occi/parser/text_samples/occi_link_w_attributes.text
238
+ - spec/occi/parser/text_samples/occi_link_w_category.dump
239
+ - spec/occi/parser/text_samples/occi_link_w_category.text
240
+ - spec/occi/parser/text_samples/occi_model_rocci_server.dump
241
+ - spec/occi/parser/text_samples/occi_model_rocci_server.text
242
+ - spec/occi/parser/text_samples/occi_network_rocci_server.dump
243
+ - spec/occi/parser/text_samples/occi_network_rocci_server.resource.dump
244
+ - spec/occi/parser/text_samples/occi_network_rocci_server.text
245
+ - spec/occi/parser/text_samples/occi_resource_w_attributes.dump
246
+ - spec/occi/parser/text_samples/occi_resource_w_attributes.text
247
+ - spec/occi/parser/text_samples/occi_resource_w_inline_links.dump
248
+ - spec/occi/parser/text_samples/occi_resource_w_inline_links.text
249
+ - spec/occi/parser/text_samples/occi_resource_w_inline_links_only.dump
250
+ - spec/occi/parser/text_samples/occi_resource_w_inline_links_only.text
251
+ - spec/occi/parser/text_samples/occi_storage_rocci_server.dump
252
+ - spec/occi/parser/text_samples/occi_storage_rocci_server.resource.dump
253
+ - spec/occi/parser/text_samples/occi_storage_rocci_server.text
257
254
  - spec/occi/parser/text_spec.rb
255
+ - spec/occi/parser/xml_samples/test.xml
258
256
  - spec/occi/parser_spec.rb
259
- - spec/occi/test.json
260
- - spec/occi/test.ova
261
- - spec/occi/test.ovf
262
257
  - spec/spec_helper.rb
263
258
  homepage: https://github.com/gwdg/rOCCI-core
264
259
  licenses:
265
260
  - Apache License, Version 2.0
266
- metadata: {}
267
261
  post_install_message:
268
262
  rdoc_options: []
269
263
  require_paths:
270
264
  - lib
271
265
  required_ruby_version: !ruby/object:Gem::Requirement
266
+ none: false
272
267
  requirements:
273
- - - ">="
268
+ - - ! '>='
274
269
  - !ruby/object:Gem::Version
275
270
  version: 1.9.3
276
271
  required_rubygems_version: !ruby/object:Gem::Requirement
272
+ none: false
277
273
  requirements:
278
- - - ">="
274
+ - - ! '>='
279
275
  - !ruby/object:Gem::Version
280
276
  version: '0'
277
+ segments:
278
+ - 0
279
+ hash: 4355296233870800416
281
280
  requirements: []
282
281
  rubyforge_project:
283
- rubygems_version: 2.2.2
282
+ rubygems_version: 1.8.25
284
283
  signing_key:
285
- specification_version: 4
284
+ specification_version: 3
286
285
  summary: OCCI toolkit
287
286
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 55193e61a404bde23ad87389d4a7211bfb9361ab
4
- data.tar.gz: 836fd7feeb5d45e1809f4416a5b3107f3aa617a7
5
- SHA512:
6
- metadata.gz: 09b0320da7a2c4bf931cd077a77ada66794fe074ef1c79770467cebec65497b0eee29d032a53b4db402d9354bc266288bb24d087b51381e5372e9c3d70b855e0
7
- data.tar.gz: 903d240f897e55af9e6d772b94194629ffec7301c118906562ccc756604458e6624b78300461bc00c32f928af293e3c82b51a61d8c5e85e864bf375d39d2ac9d
File without changes