berta 1.5.2 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/berta/utils/filter.rb +3 -9
- data/lib/berta/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8df6d853b8b26247ece5370a887b57f983f8680
|
4
|
+
data.tar.gz: 6c643a92a154fd50bbee3e2fd306db34273d89f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e09339128c099ccbbf4ea5145e9c5f9a870a02a41912f0088a5d3b27f6f4f8df3b4a27a7b3ec0b1d72c9124add90de81f28d5e8c8ee222876d27e8660636860
|
7
|
+
data.tar.gz: fb69818b1b5e4781d8c28bd3fc441e5f5853252a77fc991e36ceb7180d0ab23056eb183cffdddc697518c348b6c859508f38dac4d9d0a53bc50225b6f15251c7
|
data/lib/berta/utils/filter.rb
CHANGED
@@ -2,12 +2,8 @@ module Berta
|
|
2
2
|
module Utils
|
3
3
|
# Base Filter class, filters out invalid states
|
4
4
|
class Filter
|
5
|
-
# VM states
|
6
|
-
|
7
|
-
# Active state has some lcm states that should not expire
|
8
|
-
ACTIVE_STATE = 'ACTIVE'.freeze
|
9
|
-
# LCM states in which active state shouldn't expire
|
10
|
-
NON_RESOURCE_ACTIVE_LCM_STATES = %w[EPILOG SHUTDOWN STOP UNDEPLOY FAILURE].freeze
|
5
|
+
# VM states to ignore
|
6
|
+
IGNORED_STATES = %w[PENDING HOLD].freeze
|
11
7
|
|
12
8
|
# Constructs Filter object.
|
13
9
|
#
|
@@ -83,9 +79,7 @@ module Berta
|
|
83
79
|
private
|
84
80
|
|
85
81
|
def takes_resources?(vmh)
|
86
|
-
|
87
|
-
true if vmh.handle.state_str == ACTIVE_STATE &&
|
88
|
-
NON_RESOURCE_ACTIVE_LCM_STATES.none? { |state| vmh.handle.lcm_state_str.include? state }
|
82
|
+
!IGNORED_STATES.include?(vmh.handle.state_str)
|
89
83
|
end
|
90
84
|
|
91
85
|
def log_filter
|
data/lib/berta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dusan Baran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|