berta 1.2.0 → 1.3.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/expiration_manager.rb +1 -1
- data/lib/berta/service.rb +2 -0
- data/lib/berta/version.rb +1 -1
- data/lib/berta/virtual_machine_handler.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddb138a3a440ced8f3cac19a172dc852553bf6d7
|
4
|
+
data.tar.gz: d03578fdc338e243fa153094632a10e08f4e6925
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d39ec846445b8e28c9431aded6a925de3ecc61fb520e1f959964ee8ad917856761f7186573def0e85b9587d6785f860c7fbd944f2e5e617695965c23e2a627b
|
7
|
+
data.tar.gz: 12b40d29cb3e5549fa9ad8299af378d5b9a9f8b05d4a8eb434b3f76e501237eff5a236c73cdef1588b189ad2478aeda1cb184305981eb9c8e31566540770c859
|
@@ -34,7 +34,7 @@ module Berta
|
|
34
34
|
# @param exps [Array<Berta::Entities::Expiration>] VMs expirations to modify
|
35
35
|
# @return Expirations with default expiration
|
36
36
|
def add_default_expiration(vm, exps)
|
37
|
-
return
|
37
|
+
return [] if vm.default_expiration
|
38
38
|
exps << Berta::Entities::Expiration.new(vm.next_expiration_id,
|
39
39
|
Time.now.to_i + Berta::Settings.expiration_offset,
|
40
40
|
Berta::Settings.expiration.action)
|
data/lib/berta/service.rb
CHANGED
@@ -66,9 +66,11 @@ module Berta
|
|
66
66
|
# @raise [Berta::Errors::OpenNebula::ResourceStateError]
|
67
67
|
# @raise [Berta::Errors::OpenNebula::ResourceRetrievalError]
|
68
68
|
def clusters
|
69
|
+
return @cached_clusters if @cached_clusters
|
69
70
|
logger.debug 'Fetching clusters'
|
70
71
|
cluster_pool = OpenNebula::ClusterPool.new(client)
|
71
72
|
Berta::Utils::OpenNebula::Helper.handle_error { cluster_pool.info }
|
73
|
+
@cached_clusters = cluster_pool
|
72
74
|
cluster_pool
|
73
75
|
end
|
74
76
|
|
data/lib/berta/version.rb
CHANGED
@@ -66,7 +66,7 @@ module Berta
|
|
66
66
|
template = ''
|
67
67
|
exps.each { |exp| template += exp.template }
|
68
68
|
return if template == ''
|
69
|
-
logger.debug "Setting multiple expirations:\n#{template}"
|
69
|
+
logger.debug "Setting multiple expirations on vm with id=#{handle['ID']} :\n#{template}"
|
70
70
|
return if Berta::Settings['dry-run']
|
71
71
|
Berta::Utils::OpenNebula::Helper.handle_error do
|
72
72
|
handle.update(template, true)
|
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.3.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-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
300
|
version: '0'
|
301
301
|
requirements: []
|
302
302
|
rubyforge_project:
|
303
|
-
rubygems_version: 2.
|
303
|
+
rubygems_version: 2.6.8
|
304
304
|
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: Berta VM expiration tool
|