occi-core 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -14
- data/.rubocop_todo.yml +5 -0
- data/CHANGELOG.md +6 -0
- data/README.md +1 -0
- data/lib/occi/core/action_instance.rb +3 -2
- data/lib/occi/core/entity.rb +5 -5
- data/lib/occi/core/helpers/error_handler.rb +1 -1
- data/lib/occi/core/helpers/raw_json_parser.rb +1 -1
- data/lib/occi/core/locations.rb +2 -2
- data/lib/occi/core/parsers/json/validator.rb +1 -1
- data/lib/occi/core/parsers/json_parser.rb +1 -1
- data/lib/occi/core/version.rb +1 -1
- data/lib/occi/core/warehouse.rb +1 -1
- data/lib/occi/core/warehouse/kinds/attributes/occi.core.title.yml +1 -1
- data/lib/occi/infrastructure/warehouse.rb +1 -1
- data/lib/occi/infrastructure/warehouse/actions/compute_save.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.hostname.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.compute.state.message.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.network.label.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.network.state.message.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.networkinterface.interface.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.networkinterface.state.message.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storage.state.message.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storagelink.deviceid.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storagelink.mountpoint.yml +1 -1
- data/lib/occi/infrastructure/warehouse/kinds/attributes/occi.storagelink.state.message.yml +1 -1
- data/lib/occi/infrastructure_ext/warehouse.rb +1 -1
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.ipreservation.state.message.yml +1 -1
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.securitygroup.state.message.yml +1 -1
- data/lib/occi/infrastructure_ext/warehouse/kinds/attributes/occi.securitygrouplink.state.message.yml +1 -1
- data/occi-core.gemspec +0 -1
- metadata +3 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 136ea405fc28df1ba974238e15868846e6b9c642
|
4
|
+
data.tar.gz: d143cff13d9d828ff10b8b895d01a096e9c5795e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c71d4e04e3b60b555e0f81f21eeedb536c748d09cb25039dfa4e8e1e05e9b6d2b2f8d35baf785cfd106fb87bdd89cb99645b2359679c78e418dd503a6c2d5a70
|
7
|
+
data.tar.gz: 5141b7ed36095b8d3a2ac55aed12e050a2d8eeae87c6414b7662b9434969a5a226ea1b03bad5d205293e466c27ee567b864097919b7b3ca09078c19b9e1e76c1
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require: rubocop-rspec
|
2
1
|
inherit_from: .rubocop_todo.yml
|
3
2
|
|
4
3
|
Metrics/ModuleLength:
|
@@ -44,7 +43,7 @@ Style/NilComparison:
|
|
44
43
|
Exclude:
|
45
44
|
- 'spec/occi/core/category_spec.rb'
|
46
45
|
|
47
|
-
|
46
|
+
Naming/FileName:
|
48
47
|
Exclude:
|
49
48
|
- 'lib/occi/infrastructure-ext.rb'
|
50
49
|
|
@@ -52,16 +51,6 @@ Style/YodaCondition:
|
|
52
51
|
Exclude:
|
53
52
|
- 'lib/occi/core/helpers/parser_dereferencer.rb'
|
54
53
|
|
55
|
-
|
56
|
-
Max: 5
|
57
|
-
|
58
|
-
RSpec/MessageSpies:
|
59
|
-
EnforcedStyle: receive
|
60
|
-
|
61
|
-
RSpec/SubjectStub:
|
62
|
-
Exclude:
|
63
|
-
- 'spec/**/*'
|
64
|
-
|
65
|
-
RSpec/MessageExpectation:
|
54
|
+
Lint/Void:
|
66
55
|
Exclude:
|
67
|
-
|
56
|
+
- '**/*'
|
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[![Gemnasium](https://img.shields.io/gemnasium/the-rocci-project/rOCCI-core.svg?style=flat-square)](https://gemnasium.com/the-rocci-project/rOCCI-core)
|
4
4
|
[![Gem](https://img.shields.io/gem/v/occi-core.svg?style=flat-square)](https://rubygems.org/gems/occi-core)
|
5
5
|
[![Code Climate](https://img.shields.io/codeclimate/github/the-rocci-project/rOCCI-core.svg?style=flat-square)](https://codeclimate.com/github/the-rocci-project/rOCCI-core)
|
6
|
+
[![DOI](https://zenodo.org/badge/101084614.svg)](https://zenodo.org/badge/latestdoi/101084614)
|
6
7
|
|
7
8
|
## Requirements
|
8
9
|
### Ruby
|
@@ -16,7 +16,8 @@ module Occi
|
|
16
16
|
include Helpers::ArgumentValidator
|
17
17
|
include Helpers::InstanceAttributeResetter
|
18
18
|
|
19
|
-
|
19
|
+
attr_reader :action
|
20
|
+
attr_accessor :attributes
|
20
21
|
|
21
22
|
ERRORS = [
|
22
23
|
Occi::Core::Errors::AttributeValidationError,
|
@@ -133,7 +134,7 @@ module Occi
|
|
133
134
|
# :nodoc:
|
134
135
|
def valid_attribute!(name, attribute)
|
135
136
|
attribute.valid!
|
136
|
-
rescue => ex
|
137
|
+
rescue StandardError => ex
|
137
138
|
raise ex, "Attribute #{name.inspect} invalid: #{ex}", ex.backtrace
|
138
139
|
end
|
139
140
|
end
|
data/lib/occi/core/entity.rb
CHANGED
@@ -24,8 +24,9 @@ module Occi
|
|
24
24
|
include Helpers::InstanceAttributeResetter
|
25
25
|
include Helpers::MixinSelector
|
26
26
|
|
27
|
-
|
27
|
+
attr_reader :kind, :mixins
|
28
28
|
attr_writer :location
|
29
|
+
attr_accessor :actions, :attributes
|
29
30
|
|
30
31
|
ERRORS = [
|
31
32
|
Occi::Core::Errors::AttributeValidationError, Occi::Core::Errors::AttributeDefinitionError,
|
@@ -295,7 +296,7 @@ module Occi
|
|
295
296
|
#
|
296
297
|
# @return [NilClass] when entity instance is valid
|
297
298
|
def valid!
|
298
|
-
%i[kind
|
299
|
+
%i[kind attributes mixins actions].each do |attr|
|
299
300
|
unless send(attr)
|
300
301
|
raise Occi::Core::Errors::InstanceValidationError,
|
301
302
|
"Missing valid #{attr}"
|
@@ -334,7 +335,7 @@ module Occi
|
|
334
335
|
# :nodoc:
|
335
336
|
def valid_attribute!(name, attribute)
|
336
337
|
attribute.valid!
|
337
|
-
rescue => ex
|
338
|
+
rescue StandardError => ex
|
338
339
|
raise ex, "Attribute #{name.inspect} invalid: #{ex}", ex.backtrace
|
339
340
|
end
|
340
341
|
|
@@ -376,8 +377,7 @@ module Occi
|
|
376
377
|
# @return [URI] generated location
|
377
378
|
def generate_location
|
378
379
|
if id.blank?
|
379
|
-
raise Occi::Core::Errors::MandatoryArgumentError,
|
380
|
-
'Cannot generate default location without an `id`'
|
380
|
+
raise Occi::Core::Errors::MandatoryArgumentError, 'Cannot generate default location without an `id`'
|
381
381
|
end
|
382
382
|
URI.parse "#{kind.location}#{id}"
|
383
383
|
end
|
data/lib/occi/core/locations.rb
CHANGED
@@ -61,7 +61,7 @@ module Occi
|
|
61
61
|
def valid?
|
62
62
|
valid!
|
63
63
|
true
|
64
|
-
rescue => ex
|
64
|
+
rescue StandardError => ex
|
65
65
|
logger.warn "Location invalid: #{ex.message}"
|
66
66
|
false
|
67
67
|
end
|
@@ -73,7 +73,7 @@ module Occi
|
|
73
73
|
# @raise [Occi::Core::Errors::LocationValidationError] if some location is invalid
|
74
74
|
def valid!
|
75
75
|
map! { |uri| return_or_convert uri }
|
76
|
-
rescue => ex
|
76
|
+
rescue StandardError => ex
|
77
77
|
raise Occi::Core::Errors::LocationValidationError, ex.message
|
78
78
|
end
|
79
79
|
alias convert! valid!
|
@@ -11,7 +11,7 @@ module Occi
|
|
11
11
|
|
12
12
|
# Repository constants
|
13
13
|
SCHEMA_DIR = 'validator'.freeze
|
14
|
-
SCHEMA_REPO = File.join(
|
14
|
+
SCHEMA_REPO = File.join(__dir__, SCHEMA_DIR)
|
15
15
|
BASE_SCHEMAS = %i[occi-schema].freeze
|
16
16
|
|
17
17
|
class << self
|
data/lib/occi/core/version.rb
CHANGED
@@ -2,7 +2,7 @@ module Occi
|
|
2
2
|
module Core
|
3
3
|
MAJOR_VERSION = 5 # Major update constant
|
4
4
|
MINOR_VERSION = 0 # Minor update constant
|
5
|
-
PATCH_VERSION =
|
5
|
+
PATCH_VERSION = 2 # Patch/Fix version constant
|
6
6
|
STAGE_VERSION = nil # use `nil` for production releases
|
7
7
|
|
8
8
|
unless defined?(::Occi::Core::VERSION)
|
data/lib/occi/core/warehouse.rb
CHANGED
data/occi-core.gemspec
CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.add_development_dependency 'simplecov', '>= 0.11', '< 1'
|
29
29
|
gem.add_development_dependency 'pry', '>= 0.10', '< 1'
|
30
30
|
gem.add_development_dependency 'rubocop', '>= 0.32', '< 1'
|
31
|
-
gem.add_development_dependency 'rubocop-rspec', '>= 1.5', '< 2'
|
32
31
|
gem.add_development_dependency 'rubygems-tasks', '>= 0.2', '< 1'
|
33
32
|
gem.add_development_dependency 'yard', '>= 0.8', '< 1'
|
34
33
|
gem.add_development_dependency 'fasterer', '>= 0.3.2', '< 0.4'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: occi-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Parak
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -211,26 +211,6 @@ dependencies:
|
|
211
211
|
- - "<"
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '1'
|
214
|
-
- !ruby/object:Gem::Dependency
|
215
|
-
name: rubocop-rspec
|
216
|
-
requirement: !ruby/object:Gem::Requirement
|
217
|
-
requirements:
|
218
|
-
- - ">="
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
version: '1.5'
|
221
|
-
- - "<"
|
222
|
-
- !ruby/object:Gem::Version
|
223
|
-
version: '2'
|
224
|
-
type: :development
|
225
|
-
prerelease: false
|
226
|
-
version_requirements: !ruby/object:Gem::Requirement
|
227
|
-
requirements:
|
228
|
-
- - ">="
|
229
|
-
- !ruby/object:Gem::Version
|
230
|
-
version: '1.5'
|
231
|
-
- - "<"
|
232
|
-
- !ruby/object:Gem::Version
|
233
|
-
version: '2'
|
234
214
|
- !ruby/object:Gem::Dependency
|
235
215
|
name: rubygems-tasks
|
236
216
|
requirement: !ruby/object:Gem::Requirement
|
@@ -594,7 +574,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
594
574
|
version: '0'
|
595
575
|
requirements: []
|
596
576
|
rubyforge_project:
|
597
|
-
rubygems_version: 2.6.
|
577
|
+
rubygems_version: 2.6.13
|
598
578
|
signing_key:
|
599
579
|
specification_version: 4
|
600
580
|
summary: The rOCCI core toolkit
|