occi-core 4.1.3 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,51 +1,263 @@
1
1
  module Occi
2
2
  describe "Model" do
3
3
 
4
- it "initializes Core Model successfully" do
5
- model = Occi::Model.new
6
- model.get_by_id('http://schemas.ogf.org/occi/core#entity').should be_kind_of Occi::Core::Kind
7
- model.get_by_id('http://schemas.ogf.org/occi/core#resource').should be_kind_of Occi::Core::Kind
8
- model.get_by_id('http://schemas.ogf.org/occi/core#link').should be_kind_of Occi::Core::Kind
4
+ context '#get_by_id' do
5
+
6
+ context 'Core model' do
7
+ let(:model){ Occi::Model.new }
8
+ it 'returns correct kind for entity' do
9
+ expect(model.get_by_id('http://schemas.ogf.org/occi/core#entity')).to be_kind_of Occi::Core::Kind
10
+ end
11
+
12
+ it 'returns correct kind for resource' do
13
+ expect(model.get_by_id('http://schemas.ogf.org/occi/core#resource')).to be_kind_of Occi::Core::Kind
14
+ end
15
+
16
+ it 'returns correct kind for resource' do
17
+ expect(model.get_by_id('http://schemas.ogf.org/occi/core#link')).to be_kind_of Occi::Core::Kind
18
+ end
19
+ end
20
+
21
+ context 'Infrastructure model' do
22
+ let(:model){ model = Occi::Model.new
23
+ model.register_infrastructure
24
+ model
25
+ }
26
+
27
+ it 'returns correct kind for compute' do
28
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#compute')).to be_kind_of Occi::Core::Kind
29
+ end
30
+
31
+ it 'returns correct kind for os_tpl' do
32
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#os_tpl')).to be_kind_of Occi::Core::Mixin
33
+ end
34
+
35
+ it 'returns correct kind for resource_tpl' do
36
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#resource_tpl')).to be_kind_of Occi::Core::Mixin
37
+ end
38
+
39
+ it 'returns correct kind for network' do
40
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#network')).to be_kind_of Occi::Core::Kind
41
+ end
42
+
43
+ it 'returns correct kind for ipnetwork' do
44
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure/network#ipnetwork')).to be_kind_of Occi::Core::Mixin
45
+ end
46
+
47
+ it 'returns correct kind for networkinterface' do
48
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#networkinterface')).to be_kind_of Occi::Core::Kind
49
+ end
50
+
51
+ it 'returns correct kind for ipnetworkinterface' do
52
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface')).to be_kind_of Occi::Core::Mixin
53
+ end
54
+
55
+ it 'returns correct kind for storage' do
56
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#storage')).to be_kind_of Occi::Core::Kind
57
+ end
58
+
59
+ it 'returns correct kind for storagelink' do
60
+ expect(model.get_by_id('http://schemas.ogf.org/occi/infrastructure#storagelink')).to be_kind_of Occi::Core::Kind
61
+ end
62
+
63
+ end
9
64
  end
10
65
 
11
- it "initializes Infrastructure Model successfully" do
12
- model = Occi::Model.new
13
- model.register_infrastructure
14
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#compute').should be_kind_of Occi::Core::Kind
15
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#os_tpl').should be_kind_of Occi::Core::Mixin
16
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#resource_tpl').should be_kind_of Occi::Core::Mixin
17
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#network').should be_kind_of Occi::Core::Kind
18
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure/network#ipnetwork').should be_kind_of Occi::Core::Mixin
19
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#networkinterface').should be_kind_of Occi::Core::Kind
20
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface').should be_kind_of Occi::Core::Mixin
21
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#storage').should be_kind_of Occi::Core::Kind
22
- model.get_by_id('http://schemas.ogf.org/occi/infrastructure#storagelink').should be_kind_of Occi::Core::Kind
66
+ context '#get' do
67
+ it "returns all registered categories" do
68
+ model = Occi::Model.new
69
+ collection = model.get
70
+ expected=Marshal.restore("\x04\bo:\x10Occi::Model\n:\v@kindso:\x16Occi::Core::Kinds\x06:\n@hash{\bo:\x15Occi::Core::Kind\x0E:\f@schemeI\"&http://schemas.ogf.org/occi/core#\x06:\x06EF:\n@termI\"\ventity\x06;\vF:\v@titleI\"\ventity\x06;\vF:\x10@attributesC:\eOcci::Core::Attributes{\x06I\"\tocci\x06;\vFC;\x0F{\x06I\"\tcore\x06;\vFC;\x0F{\tI\"\aid\x06;\vFo:\eOcci::Core::Properties\v:\r@default0:\n@typeI\"\vstring\x06;\vF:\x0E@requiredF:\r@mutableF:\r@patternI\"A[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\x06;\vF:\x11@description0I\"\b_id\x06;\vFo;\x10\v;\x110;\x12@\x13;\x13F;\x14F;\x15@\x14;\x160I\"\ntitle\x06;\vFo;\x10\v;\x110;\x12I\"\vstring\x06;\vF;\x13F;\x14T;\x15I\"\a.*\x06;\vF;\x160I\"\v_title\x06;\vFo;\x10\v;\x110;\x12@\x19;\x13F;\x14T;\x15@\x1A;\x160:\f@parent0:\r@actionso:\x18Occi::Core::Actions\x06;\b{\x00:\x0E@entitieso:\x19Occi::Core::Entities\x06;\b{\x00:\x0E@locationI\"\r/entity/\x06;\vF:\v@model@\x00To;\t\x0E;\nI\"&http://schemas.ogf.org/occi/core#\x06;\vF;\fI\"\rresource\x06;\vF;\rI\"\rresource\x06;\vF;\x0EC;\x0F{\x06@\rC;\x0F{\x06@\x0FC;\x0F{\v@\x11@\x12@\x15@\x16@\x17@\x18@\e@\x1CI\"\fsummary\x06;\vFo;\x10\v;\x110;\x12I\"\vstring\x06;\vF;\x13F;\x14T;\x15I\"\a.*\x06;\vF;\x160I\"\r_summary\x06;\vFo;\x10\v;\x110;\x12@+;\x13F;\x14T;\x15@,;\x160;\x17@\b;\x18o;\x19\x06;\b{\x00;\x1Ao;\e\x06;\b{\x06o:\x19Occi::Core::Resource\r:\n@kind@\":\f@mixinso:\x17Occi::Core::Mixins\b;\b{\x00;\x1Do;\x00\n;\x06o;\a\x06;\b{\b@\bT@\"To;\t\x0E;\nI\"&http://schemas.ogf.org/occi/core#\x06;\vF;\fI\"\tlink\x06;\vF;\rI\"\tlink\x06;\vF;\x0EC;\x0F{\x06@\rC;\x0F{\x06@\x0FC;\x0F{\r@\x11@\x12@\x15@\x16@\x17@\x18@\e@\x1CI\"\vtarget\x06;\vFo;\x10\v;\x110;\x12I\"\vstring\x06;\vF;\x13F;\x14T;\x15I\"\a.*\x06;\vF;\x160I\"\f_target\x06;\vFo;\x10\v;\x110;\x12@B;\x13F;\x14T;\x15@C;\x160I\"\vsource\x06;\vFo;\x10\v;\x110;\x12I\"\vstring\x06;\vF;\x13F;\x14T;\x15I\"\a.*\x06;\vF;\x160I\"\f_source\x06;\vFo;\x10\v;\x110;\x12@H;\x13F;\x14T;\x15@I;\x160;\x17@\b;\x18o;\x19\x06;\b{\x00;\x1Ao;\e\x06;\b{\x06o:\x15Occi::Core::Link\x0F;\x1F@9; o;!\b;\b{\x00;\x1D@6:\f@entity@P;\x0EIC;\x0F{\x06@\rIC;\x0F{\x06@\x0FIC;\x0F{\r@\x11I\")45284ebc-3397-468b-9d3b-863a24075ea2\x06;\vT@\x15@\x16@\x170@\e@\x1C@@0@D@E@F0@J@K\x06:\x0F@convertedT\x06;$T\x06;$T;\x18o;\x19\a;\b{\x00;\x1D@6;\x1C0:\t@rel@9:\f@target0;\x1D@6:\b@id@V:\f@source0T;\x1CI\"\v/link/\x06;\vF;\x1D@\x00T; o;!\x06;\b{\x00;\x18o;\x19\x06;\b{\x00:\x0F@resourceso:\x1AOcci::Core::Resources\x06;\b{\x00:\v@linkso:\x16Occi::Core::Links\x06;\b{\x00;\#@3;\x0EIC;\x0F{\x06@\rIC;\x0F{\x06@\x0FIC;\x0F{\v@\x11I\")aa7baa55-23dc-42fe-aa2d-45fba74d1a4e\x06;\vT@\x15@\x16@\x170@\e@\x1C@)0@-@.\x06;$T\x06;$T\x06;$T;\x18o;\x19\a;\b{\x00;\x1D@6;\x1C0;+o;,\a;\b{\x00;\x1D@6;\x1D@6;'@eT;\x1CI\"\x0F/resource/\x06;\vF;\x1D@\x00T@9T; o;!\x06;\b{\x00;\x18o;\x19\x06;\b{\x00;)o;*\x06;\b{\x00;+o;,\x06;\b{\x00")
71
+ expect(collection).to eql expected
72
+ end
73
+
74
+ context "for categories with filter" do
75
+ model = Occi::Model.new
76
+ model.register_infrastructure
77
+ network = Occi::Infrastructure::Network.kind
78
+ collection = model.get(network)
79
+
80
+ it 'returns the right kind' do
81
+ expect(collection).to be_kind_of Occi::Collection
82
+ end
83
+
84
+ it 'returns the right number of kinds' do
85
+ expect(collection.kinds.count).to eql 1
86
+ end
87
+
88
+ it 'starts with a network kind' do
89
+ expect(collection.kinds.first).to eql network
90
+ end
91
+
92
+ it 'has empty mixins' do
93
+ expect(collection.mixins).to be_empty
94
+ end
95
+
96
+ it 'has empty actions' do
97
+ expect(collection.actions).to be_empty
98
+ end
99
+
100
+ it 'has empty resources' do
101
+ expect(collection.resources).to be_empty
102
+ end
103
+
104
+ it 'has empty links' do
105
+ expect(collection.links).to be_empty
106
+ end
107
+ end
23
108
  end
24
109
 
25
- it "returns all registered categories" do
26
- model = Occi::Model.new
27
- collection = model.get
28
- collection.kind_of? Occi::Collection
29
- collection.kinds.should have(3).kinds
30
- collection.mixins.should be_empty
31
- collection.actions.should be_empty
32
- collection.resources.should be_empty
33
- collection.links.should be_empty
110
+ context '#register' do
111
+ let(:kind){ Occi::Core::Kind.new }
112
+ let(:mixin){ Occi::Core::Mixin.new }
113
+ let(:action){ Occi::Core::Action.new }
114
+ let(:model){ model = Occi::Model.new
115
+ model.register(kind)
116
+ model.register(mixin)
117
+ model.register(action)
118
+ model
119
+ }
120
+
121
+ it 'registers a kind' do
122
+ expect(model.kinds.include?(kind)).to eql true
123
+ end
124
+
125
+ it 'registers a mixin' do
126
+ expect(model.mixins.include?(mixin)).to eql true
127
+ end
128
+
129
+ it 'registers an action' do
130
+ expect(model.actions.include?(action)).to eql true
131
+ end
132
+ end
133
+
134
+ context '#unregister' do
135
+ let(:kind){ Occi::Core::Kind.new }
136
+ let(:mixin){ Occi::Core::Mixin.new }
137
+ let(:action){ Occi::Core::Action.new }
138
+ let(:model){ model = Occi::Model.new
139
+ model.register(kind)
140
+ model.register(mixin)
141
+ model.register(action)
142
+ model
143
+ }
144
+
145
+ it 'unregisters a kind' do
146
+ model.unregister(kind)
147
+ expect(model.kinds.include?(kind)).to eql false
148
+ end
149
+
150
+ it 'unregisters a mixin' do
151
+ model.unregister(mixin)
152
+ expect(model.mixins.include?(mixin)).to eql false
153
+ end
154
+
155
+ it 'unregisters an action' do
156
+ model.unregister(action)
157
+ expect(model.actions.include?(action)).to eql false
158
+ end
159
+ end
160
+
161
+ context '#register_collection' do
162
+ let(:kind){ Occi::Core::Kind.new }
163
+ let(:mixin){ Occi::Core::Mixin.new }
164
+ let(:action){ Occi::Core::Action.new }
165
+ let(:collection) { collection = Occi::Collection.new
166
+ collection << kind
167
+ collection << mixin
168
+ collection << action
169
+ collection
170
+ }
171
+ let(:model){ model = Occi::Model.new
172
+ model.register_collection(collection)
173
+ model
174
+ }
175
+
176
+ it 'registers a kind' do
177
+ expect(model.kinds.include?(kind)).to eql true
178
+ end
179
+
180
+ it 'registers a mixin' do
181
+ expect(model.mixins.include?(mixin)).to eql true
182
+ end
183
+
184
+ it 'registers an action' do
185
+ expect(model.actions.include?(action)).to eql true
186
+ end
34
187
  end
35
188
 
36
- it "returns categories with filter" do
37
- model = Occi::Model.new
38
- model.register_infrastructure
39
- network = Occi::Infrastructure::Network.kind
40
- collection = model.get(network)
41
- collection.kind_of? Occi::Collection
42
- collection.kinds.should have(1).kind
43
- collection.kinds.first.should == network
44
- collection.mixins.should be_empty
45
- collection.actions.should be_empty
46
- collection.resources.should be_empty
47
- collection.links.should be_empty
189
+ context '#reset' do
190
+ let(:entity){ Occi::Core::Entity.new 'http://example.org/test/schema#testentity' }
191
+ let(:kind){ kind = Occi::Core::Kind.new
192
+ kind.entities << entity
193
+ kind }
194
+ let(:mixin){ mixin = Occi::Core::Mixin.new
195
+ mixin.entities << entity
196
+ mixin }
197
+ let(:action){ Occi::Core::Action.new }
198
+ let(:model){ model = Occi::Model.new
199
+ model.register(kind)
200
+ model.register(mixin)
201
+ model.register(action)
202
+ model
203
+ }
204
+
205
+ before(:each){ model.reset }
206
+
207
+ it 'unregisters entities from kinds' do
208
+ found = false
209
+ model.kinds.each { |kind| found = true if kind.entities.include?(entity) }
210
+ expect(found).to eql false
211
+ end
212
+
213
+ it 'unregisters entities from mixins' do
214
+ found = false
215
+ model.mixins.each { |mixin| found = true if mixin.entities.include?(entity) }
216
+ expect(found).to eql false
217
+ end
48
218
  end
49
219
 
220
+ context '#register_files' do
221
+ context 'for correct and existing files' do
222
+ let(:model){ model = Occi::Model.new
223
+ model.register_files('spec/occi/collection_samples')
224
+ model
225
+ }
226
+
227
+ it 'read the right number of mixins' do
228
+ expect(model.mixins.count).to eql 2
229
+ end
230
+
231
+ it 'read the right number of actions' do
232
+ expect(model.actions.count).to eql 2
233
+ end
234
+
235
+ it 'read the right number of resources' do
236
+ expect(model.resources.count).to eql 2
237
+ end
238
+
239
+ it 'read the right number of links' do
240
+ expect(model.links.count).to eql 2
241
+ end
242
+
243
+ it 'read the action' do
244
+ expect(model.action.blank?).to eql false
245
+ end
246
+ end
247
+
248
+ context 'for inexistent directory' do
249
+ it 'fails gracefully' do
250
+ model = Occi::Model.new
251
+ expect{ model.register_files('this/directory/does/not/exist') }.to raise_exception(ArgumentError)
252
+ end
253
+ end
254
+
255
+ context 'for invalid input' do
256
+ it 'fails gracefully' do
257
+ model = Occi::Model.new
258
+ expect{ model.register_files('spec/occi') }.to raise_exception(ArgumentError)
259
+ end
260
+ end
261
+ end
50
262
  end
51
- end
263
+ end
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ Category: a_a1-_;scheme="http://a.a/a#";class="kind";title="aA1!\"§$%&/()=?`´ß+*#-_.:,;<>";rel="http://a.a/b#a";location="/a1-A/";attributes="a_1-_.a1-_a a-1.a.b";actions="http://a.a/a1#a1 http://a.b1/b1#b2"
2
+ Category: a_a2-_;scheme="http://a.a/a#";class="kind";title="aA2!\"§$%&/()=?`´ß+*#-_.:,;<>";rel="http://a.a/b#a";location="/a2-A/";attributes="a_2-_.a2-_a a-2.a.b";actions="http://a.a/a2#a2 http://a.b2/b2#b2"
@@ -0,0 +1,10 @@
1
+ Category: compute;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"
2
+ Category: compute;scheme="http://opennebula.org/occi/infrastructure#";class="mixin"
3
+ X-OCCI-Attribute: occi.core.id="4ddbfeae-22d7-5e50-8f85-ba18589e876b"
4
+ X-OCCI-Attribute: occi.core.title="MonTest1"
5
+ X-OCCI-Attribute: occi.compute.cores=1
6
+ X-OCCI-Attribute: occi.compute.memory=0.256
7
+ X-OCCI-Attribute: occi.compute.state="active"
8
+ X-OCCI-Attribute: org.opennebula.compute.cpu=1.0
9
+ Link: </storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac>;rel="http://schemas.ogf.org/occi/infrastructure#storage";self="/storagelink/b2f7f1de-c60c-5b08-879c-81f52429c4ef";category="http://schemas.ogf.org/occi/infrastructure#storagelink";occi.core.id="b2f7f1de-c60c-5b08-879c-81f52429c4ef" occi.core.title="monitoring" occi.storagelink.deviceid="xvda" occi.storagelink.state="inactive" org.opennebula.storagelink.bus="ide" org.opennebula.storagelink.driver="tap2:tapdisk:aio:"
10
+ Link: </network/e4bd81c4-adda-5626-840d-39bb7959db97>;rel="http://schemas.ogf.org/occi/infrastructure#network";self="/networkinterface/e75ab249-9325-511c-82b8-a7e4430381e3";category="http://schemas.ogf.org/occi/infrastructure#networkinterface";occi.core.id="e75ab249-9325-511c-82b8-a7e4430381e3" occi.core.title="monitoring" occi.networkinterface.address="192.168.254.1" occi.networkinterface.mac="02:00:c0:a8:fe:01" occi.networkinterface.state="inactive" org.opennebula.networkinterface.bridge="xenbr0"
@@ -0,0 +1,7 @@
1
+ Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind";
2
+ X-OCCI-Attribute: occi.core.id="b2f7f1de-c60c-5b08-879c-81f52429c4ef";
3
+ X-OCCI-Attribute: occi.networkinterface.interface="eth0";
4
+ X-OCCI-Attribute: occi.networkinterface.mac="00:11:22:33:44:55";
5
+ X-OCCI-Attribute: occi.networkinterface.state="active";
6
+ X-OCCI-Attribute: occi.core.source="/vms/foo/vm1"
7
+ X-OCCI-Attribute: occi.core.target="/network/123"
@@ -0,0 +1 @@
1
+ Link: </storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac>;rel="http://schemas.ogf.org/occi/infrastructure#storage";self="/storagelink/b2f7f1de-c60c-5b08-879c-81f52429c4ef";category="http://schemas.ogf.org/occi/infrastructure#storagelink";occi.core.id="b2f7f1de-c60c-5b08-879c-81f52429c4ef" occi.core.title="monitoring" occi.storagelink.deviceid="xvda" occi.storagelink.state="inactive" org.opennebula.storagelink.bus="ide" org.opennebula.storagelink.driver="tap2:tapdisk:aio:"
@@ -0,0 +1,7 @@
1
+ Link: </storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac>;rel="http://schemas.ogf.org/occi/infrastructure#storage";self="/storagelink/b2f7f1de-c60c-5b08-879c-81f52429c4ef";category="http://schemas.ogf.org/occi/infrastructure#storagelink";occi.core.id="b2f7f1de-c60c-5b08-879c-81f52429c4ef" occi.core.title="monitoring" occi.storagelink.deviceid="xvda" occi.storagelink.state="inactive" org.opennebula.storagelink.bus="ide" org.opennebula.storagelink.driver="tap2:tapdisk:aio:"
2
+ X-OCCI-Attribute: occi.storage.state="online"
3
+ X-OCCI-Attribute: org.opennebula.storage.id="116"
4
+ X-OCCI-Attribute: org.opennebula.storage.dev_prefix="xvd"
5
+ X-OCCI-Attribute: org.opennebula.storage.driver="tap2:tapdisk:aio:"
6
+ X-OCCI-Attribute: org.opennebula.storage.persistent="NO"
7
+
@@ -0,0 +1,3 @@
1
+ Link: </storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac>;rel="http://schemas.ogf.org/occi/infrastructure#storage";self="/storagelink/b2f7f1de-c60c-5b08-879c-81f52429c4ef";category="http://schemas.ogf.org/occi/infrastructure#storagelink";occi.core.id="b2f7f1de-c60c-5b08-879c-81f52429c4ef" occi.core.title="monitoring" occi.storagelink.deviceid="xvda" occi.storagelink.state="inactive" org.opennebula.storagelink.bus="ide" org.opennebula.storagelink.driver="tap2:tapdisk:aio:"
2
+ Category: a_a1-_;scheme="http://a.a/a#";class="kind";title="aA1!\"§$%&/()=?`´ß+*#-_.:,;<>";rel="http://a.a/b#a";location="/a1-A/";attributes="a_1-_.a1-_a a-1.a.b";actions="http://a.a/a1#a1 http://a.b1/b1#b2"
3
+
@@ -0,0 +1,51 @@
1
+ Category: entity;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="Entity";location="/entity/";attributes="occi.core.id occi.core.title"
2
+ Category: resource;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="Resource";rel="http://schemas.ogf.org/occi/core#entity";location="/resource/";attributes="occi.core.summary"
3
+ Category: link;scheme="http://schemas.ogf.org/occi/core#";class="kind";title="Link";rel="http://schemas.ogf.org/occi/core#entity";location="/link/";attributes="occi.core.target occi.core.source"
4
+ Category: compute;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Compute Resource";rel="http://schemas.ogf.org/occi/core#resource";location="/compute/";attributes="occi.compute.architecture occi.compute.cores occi.compute.hostname occi.compute.speed occi.compute.memory occi.compute.state";actions="http://schemas.ogf.org/occi/infrastructure/compute/action#start http://schemas.ogf.org/occi/infrastructure/compute/action#stop http://schemas.ogf.org/occi/infrastructure/compute/action#restart http://schemas.ogf.org/occi/infrastructure/compute/action#suspend"
5
+ Category: storagelink;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Storage Link";rel="http://schemas.ogf.org/occi/core#link";location="/storagelink/";attributes="occi.storagelink.deviceid occi.storagelink.mountpoint occi.storagelink.state"
6
+ Category: network;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Network Resource";rel="http://schemas.ogf.org/occi/core#resource";location="/network/";attributes="occi.network.vlan occi.network.label occi.network.state";actions="http://schemas.ogf.org/occi/infrastructure/network/action#up http://schemas.ogf.org/occi/infrastructure/network/action#down"
7
+ Category: storage;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Storage Resource";rel="http://schemas.ogf.org/occi/core#resource";location="/storage/";attributes="occi.storage.size occi.storage.state";actions="http://schemas.ogf.org/occi/infrastructure/storage/action#online http://schemas.ogf.org/occi/infrastructure/storage/action#offline http://schemas.ogf.org/occi/infrastructure/storage/action#backup http://schemas.ogf.org/occi/infrastructure/storage/action#snapshot http://schemas.ogf.org/occi/infrastructure/storage/action#resize"
8
+ Category: networkinterface;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind";title="Networkinterface";rel="http://schemas.ogf.org/occi/core#link";location="/networkinterface/";attributes="occi.networkinterface.interface occi.networkinterface.mac occi.networkinterface.state"
9
+ Category: console;scheme="http://schemas.ogf.org/occi/infrastructure/compute#";class="kind";title="Link to the VM's console";rel="http://schemas.ogf.org/occi/core#link";location="/console/"
10
+ Category: os_tpl;scheme="http://schemas.ogf.org/occi/infrastructure#";class="mixin";title="Operating System Template";location="/mixins/os_tpl/"
11
+ Category: ipnetwork;scheme="http://schemas.ogf.org/occi/infrastructure/network#";class="mixin";title="IP Network Mixin";location="/mixins/ipnetwork/";attributes="occi.network.address occi.network.gateway occi.network.allocation occi.network.state"
12
+ Category: ipnetworkinterface;scheme="http://schemas.ogf.org/occi/infrastructure/networkinterface#";class="mixin";title="IP Networkinterface Mixin";location="/mixins/ipnetworkinterface/";attributes="occi.networkinterface.address occi.networkinterface.gateway occi.networkinterface.allocation occi.networkinterface.state"
13
+ Category: resource_tpl;scheme="http://schemas.ogf.org/occi/infrastructure#";class="mixin";title="Resource Template";location="/mixins/resource_tpl/"
14
+ Category: compute;scheme="http://opennebula.org/occi/infrastructure#";class="mixin";title="OpenNebula specific Compute attributes";location="/mixins/compute/";attributes="org.opennebula.compute.cpu org.opennebula.compute.kernel org.opennebula.compute.initrd org.opennebula.compute.root org.opennebula.compute.kernel_cmd org.opennebula.compute.bootloader org.opennebula.compute.boot"
15
+ Category: storagelink;scheme="http://opennebula.org/occi/infrastructure#";class="mixin";title="OpenNebula specific Storagelink attributes";location="/mixins/storagelink/";attributes="org.opennebula.storagelink.bus org.opennebula.storagelink.driver"
16
+ Category: network;scheme="http://opennebula.org/occi/infrastructure#";class="mixin";title="OpenNebula specific Network attributes";location="/mixins/network/";attributes="org.opennebula.network.id org.opennebula.network.bridge org.opennebula.network.vlan org.opennebula.network.phydev org.opennebula.network.ip_start org.opennebula.network.ip_end"
17
+ Category: storage;scheme="http://opennebula.org/occi/infrastructure#";class="mixin";title="OpenNebula specific Storage attributes";location="/mixins/storage/";attributes="org.opennebula.storage"
18
+ Category: networkinterface;scheme="http://opennebula.org/occi/infrastructure#";class="mixin";title="OpenNebula specific Networkinterface attributes";location="/mixins/networkinterface/";attributes="org.opennebula.networkinterface.bridge org.opennebula.networkinterface.script org.opennebula.networkinterface.model org.opennebula.networkinterface.white_ports_tcp org.opennebula.networkinterface.black_ports_tcp org.opennebula.networkinterface.white_ports_udp org.opennebula.networkinterface.black_ports_udp org.opennebula.networkinterface.icmp"
19
+ Category: large;scheme="https://occi.localhost/occi/infrastructure/resource_tpl#";class="mixin";title="Large Instance - 2 cores and 7.5 GB of RAM";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/large/";attributes="occi.compute.architecture occi.compute.cores occi.compute.speed occi.compute.memory"
20
+ Category: extra_large;scheme="https://occi.localhost/occi/infrastructure/resource_tpl#";class="mixin";title="Extra Large Instance - 4 cores and 15 GB of RAM";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/extra_large/";attributes="occi.compute.architecture occi.compute.cores occi.compute.speed occi.compute.memory"
21
+ Category: larger;scheme="https://occi.localhost/occi/infrastructure/resource_tpl#";class="mixin";title="Larger Instance - 4 cores and 10 GB of RAM";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/larger/";attributes="occi.compute.architecture occi.compute.cores occi.compute.speed occi.compute.memory"
22
+ Category: medium;scheme="https://occi.localhost/occi/infrastructure/resource_tpl#";class="mixin";title="Medium Instance - 2 cores and 3.75 GB of RAM";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/medium/";attributes="occi.compute.architecture occi.compute.cores occi.compute.speed occi.compute.memory"
23
+ Category: small;scheme="https://occi.localhost/occi/infrastructure/resource_tpl#";class="mixin";title="Small Instance - 1 core and 1.7 GB of RAM";rel="http://schemas.ogf.org/occi/infrastructure#resource_tpl";location="/mixins/small/";attributes="occi.compute.architecture occi.compute.cores occi.compute.speed occi.compute.memory"
24
+ Category: monitoring;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="monitoring";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/monitoring/"
25
+ Category: debianvm;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="debianvm";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/debianvm/"
26
+ Category: egicf2012_demo;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="egicf2012-demo";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/egicf2012_demo/"
27
+ Category: oxfordcorpusserver;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="OxfordCorpusServer";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/oxfordcorpusserver/"
28
+ Category: omserver;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="OMServer";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/omserver/"
29
+ Category: wenmr_demo_cesnet;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="WeNMR-Demo-CESNET";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/wenmr_demo_cesnet/"
30
+ Category: egi_sl6goldenimage_cesnet;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="EGI-SL6GoldenImage-CESNET";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/egi_sl6goldenimage_cesnet/"
31
+ Category: hadoop;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="hadoop";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/hadoop/"
32
+ Category: clever_unime;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="clever-unime";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/clever_unime/"
33
+ Category: generic_vm;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="generic_vm";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/generic_vm/"
34
+ Category: octave;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="octave";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/octave/"
35
+ Category: r;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="r";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/r/"
36
+ Category: egi_compss_cesnet;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="EGI-COMPSs-CESNET";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/egi_compss_cesnet/"
37
+ Category: esa_sl64_cesnet;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="ESA-SL64-CESNET";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/esa_sl64_cesnet/"
38
+ Category: generic_www;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="generic_www";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/generic_www/"
39
+ Category: egi_compss;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="EGI-COMPSs";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/egi_compss/"
40
+ Category: debianvm_private;scheme="https://occi.localhost/occi/infrastructure/os_tpl#";class="mixin";title="debianvm_private";rel="http://schemas.ogf.org/occi/infrastructure#os_tpl";location="/mixins/debianvm_private/"
41
+ Category: start;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Start Compute instance"
42
+ Category: stop;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Stop Compute instance";attributes="method"
43
+ Category: restart;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Restart Compute instance";attributes="method"
44
+ Category: suspend;scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#";class="action";title="Suspend Compute instance";attributes="method"
45
+ Category: up;scheme="http://schemas.ogf.org/occi/infrastructure/network/action#";class="action";title="Activate network"
46
+ Category: down;scheme="http://schemas.ogf.org/occi/infrastructure/network/action#up";class="action";title="Activate network"
47
+ Category: online;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Activate Storage"
48
+ Category: offline;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Deactivate Storage"
49
+ Category: backup;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Backup Storage"
50
+ Category: snapshot;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Snapshot Storage"
51
+ Category: resize;scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#";class="action";title="Resize Storage";attributes="size"
@@ -0,0 +1,11 @@
1
+ Category: network;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"
2
+ Category: network;scheme="http://opennebula.org/occi/infrastructure#";class="mixin"
3
+ Category: ipnetwork;scheme="http://schemas.ogf.org/occi/infrastructure#";class="mixin"
4
+ X-OCCI-Attribute: occi.core.id="e4bd81c4-adda-5626-840d-39bb7959db97"
5
+ X-OCCI-Attribute: occi.core.title="monitoring"
6
+ X-OCCI-Attribute: occi.network.address="192.168.254.0"
7
+ X-OCCI-Attribute: occi.network.allocation="dynamic"
8
+ X-OCCI-Attribute: occi.network.state="active"
9
+ X-OCCI-Attribute: org.opennebula.network.id="6"
10
+ X-OCCI-Attribute: org.opennebula.network.bridge="xenbr0"
11
+ X-OCCI-Attribute: org.opennebula.network.vlan="NO"
@@ -0,0 +1,11 @@
1
+ Category: compute;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"\nCategory: compute;scheme="http://opennebula.org/occi/infrastructure#";class="mixin"
2
+ Category: monitoring;scheme="https://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#";class="mixin"
3
+ Category: small;scheme="https://occi.carach5.ics.muni.cz/occi/infrastructure/resource_tpl#";class="mixin"
4
+ X-OCCI-Attribute: occi.core.id="ee13808d-7708-4341-a4ba-0e42e4818218"
5
+ X-OCCI-Attribute: occi.core.title="TestVM"
6
+ X-OCCI-Attribute: occi.compute.cores=1
7
+ X-OCCI-Attribute: occi.compute.memory=1.7
8
+ X-OCCI-Attribute: occi.compute.architecture="x86"
9
+ X-OCCI-Attribute: occi.compute.speed=1
10
+ X-OCCI-Attribute: occi.compute.state="active"
11
+ X-OCCI-Attribute: org.opennebula.compute.cpu=1.0
@@ -0,0 +1,16 @@
1
+ Category: compute; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"; title="Compute Resource"; rel="http://schemas.ogf.org/occi/core#resource"; location="https://egi-cloud.zam.kfa-juelich.de:8787/compute/"; attributes="occi.compute.architecture occi.compute.state{immutable} occi.compute.speed occi.compute.memory occi.compute.cores occi.compute.hostname"; actions="http://schemas.ogf.org/occi/infrastructure/compute/action#start http://schemas.ogf.org/occi/infrastructure/compute/action#stop http://schemas.ogf.org/occi/infrastructure/compute/action#restart http://schemas.ogf.org/occi/infrastructure/compute/action#suspend"
2
+ Category: os_vms; scheme="http://schemas.openstack.org/compute/instance#"; class="mixin"; location="https://egi-cloud.zam.kfa-juelich.de:8787/os_vms/"; attributes="org.openstack.compute.console.vnc{immutable} org.openstack.compute.state{immutable}"; actions="http://schemas.openstack.org/instance/action#chg_pwd http://schemas.openstack.org/instance/action#create_image"
3
+ Link: </compute/04106bce-87eb-4f8f-a665-2f624e54ba46?action=stop>; rel="http://schemas.ogf.org/occi/infrastructure/compute/action#stop"
4
+ Link: </compute/04106bce-87eb-4f8f-a665-2f624e54ba46?action=suspend>; rel="http://schemas.ogf.org/occi/infrastructure/compute/action#suspend"
5
+ Link: </compute/04106bce-87eb-4f8f-a665-2f624e54ba46?action=restart>; rel="http://schemas.ogf.org/occi/infrastructure/compute/action#restart"
6
+ Link: </network/public>; rel="http://schemas.ogf.org/occi/infrastructure#network"; self="/network/interface/6a7a9446-a146-4faf-a961-52f66d2808df"; category="http://schemas.ogf.org/occi/infrastructure#networkinterface http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface"; occi.networkinterface.gateway="0.0.0.0"; occi.networkinterface.mac="aa:bb:cc:dd:ee:ff"; occi.networkinterface.interface="eth0"; occi.networkinterface.state="active"; occi.networkinterface.allocation="static"; occi.networkinterface.address="134.94.32.154"; occi.core.source="/compute/04106bce-87eb-4f8f-a665-2f624e54ba46"; occi.core.target="/network/public"; occi.core.id="/network/interface/6a7a9446-a146-4faf-a961-52f66d2808df"
7
+ Link: </network/admin>; rel="http://schemas.ogf.org/occi/infrastructure#network"; self="/network/interface/02b630f6-087e-4969-b04c-1e22d9480dec"; category="http://schemas.ogf.org/occi/infrastructure#networkinterface http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface"; occi.networkinterface.gateway="192.168.16.1"; occi.networkinterface.mac="fa:16:3e:45:1c:26"; occi.networkinterface.interface="eth0"; occi.networkinterface.state="active"; occi.networkinterface.allocation="static"; occi.networkinterface.address="192.168.16.103"; occi.core.source="/compute/04106bce-87eb-4f8f-a665-2f624e54ba46"; occi.core.target="/network/admin"; occi.core.id="/network/interface/02b630f6-087e-4969-b04c-1e22d9480dec"
8
+ X-OCCI-Attribute: org.openstack.compute.console.vnc="http://134.94.32.4:6080/vnc_auto.html?token=9923dc1b-eca0-4c62-81a8-a0dd6848341a"
9
+ X-OCCI-Attribute: occi.compute.architecture="x86"
10
+ X-OCCI-Attribute: occi.compute.state="active"
11
+ X-OCCI-Attribute: occi.compute.speed="0.0"
12
+ X-OCCI-Attribute: occi.compute.cores="1"
13
+ X-OCCI-Attribute: occi.compute.memory="1.0"
14
+ X-OCCI-Attribute: org.openstack.compute.state="active"
15
+ X-OCCI-Attribute: occi.compute.hostname="openmodeller-test-bjoernh"
16
+ X-OCCI-Attribute: occi.core.id="04106bce-87eb-4f8f-a665-2f624e54ba46"
@@ -0,0 +1,13 @@
1
+ Category: compute;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"\nCategory: compute;scheme="http://opennebula.org/occi/infrastructure#";class="mixin"
2
+ Category: monitoring;scheme="https://occi.carach5.ics.muni.cz/occi/infrastructure/os_tpl#";class="mixin"
3
+ Category: small;scheme="https://occi.carach5.ics.muni.cz/occi/infrastructure/resource_tpl#";class="mixin"
4
+ X-OCCI-Attribute: occi.core.id="ee13808d-7708-4341-a4ba-0e42e4818218"
5
+ X-OCCI-Attribute: occi.core.title="TestVM"
6
+ X-OCCI-Attribute: occi.compute.cores=1
7
+ X-OCCI-Attribute: occi.compute.memory=1.7
8
+ X-OCCI-Attribute: occi.compute.architecture="x86"
9
+ X-OCCI-Attribute: occi.compute.speed=1
10
+ X-OCCI-Attribute: occi.compute.state="active"
11
+ X-OCCI-Attribute: org.opennebula.compute.cpu=1.0
12
+ Link: </storage/e60aa2b8-0c86-5973-b93e-30c5c46d6eac>;rel="http://schemas.ogf.org/occi/infrastructure#storage";self="/storagelink/b2f7f1de-c60c-5b08-879c-81f52429c4ef";category="http://schemas.ogf.org/occi/infrastructure#storagelink";occi.core.id="b2f7f1de-c60c-5b08-879c-81f52429c4ef" occi.core.title="link to storage" occi.storagelink.deviceid="xvda" occi.storagelink.state="inactive" org.opennebula.storagelink.bus="ide" org.opennebula.storagelink.driver="tap2:tapdisk:aio:"
13
+ Link: </network/e4bd81c4-adda-5626-840d-39bb7959db97>;rel="http://schemas.ogf.org/occi/infrastructure#network";self="/networkinterface/e75ab249-9325-511c-82b8-a7e4430381e3";category="http://schemas.ogf.org/occi/infrastructure#networkinterface";occi.core.id="e75ab249-9325-511c-82b8-a7e4430381e3" occi.core.title="link to network interface" occi.networkinterface.address="192.168.254.8" occi.networkinterface.mac="02:00:c0:a8:fe:08" occi.networkinterface.state="inactive" org.opennebula.networkinterface.bridge="xenbr0"
@@ -0,0 +1,9 @@
1
+ Category: storage;scheme="http://schemas.ogf.org/occi/infrastructure#";class="kind"
2
+ Category: storage;scheme="http://opennebula.org/occi/infrastructure#";class="mixin"
3
+ X-OCCI-Attribute: occi.core.id="33601efd-1c81-5547-8e65-6f8ef3dcb8c6"
4
+ X-OCCI-Attribute: occi.core.title="EGI-COMPSs-CESNET_NFS_3"
5
+ X-OCCI-Attribute: occi.storage.state="online"
6
+ X-OCCI-Attribute: org.opennebula.storage.id="116"
7
+ X-OCCI-Attribute: org.opennebula.storage.dev_prefix="xvd"
8
+ X-OCCI-Attribute: org.opennebula.storage.driver="tap2:tapdisk:aio:"
9
+ X-OCCI-Attribute: org.opennebula.storage.persistent="NO"