berta 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/berta.gemspec +7 -1
- data/config/berta.yml +2 -2
- data/config/email.erb +1 -1
- data/lib/berta.rb +1 -0
- data/lib/berta/cli.rb +6 -0
- data/lib/berta/notification_manager.rb +4 -4
- data/lib/berta/version.rb +3 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ececb77853659dd54a17d796131da207313ae58d
|
4
|
+
data.tar.gz: a884181a2657eacfc072097d672fbae909abf4ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ccddda1fb68d8c57cadec7240257de7f87f01efa89149718920b7aaa2ab4b1803630543d851e933c6eea22dea0705a5cd384e3298146c4e17bc69d81fadb9f0
|
7
|
+
data.tar.gz: a19d4303d08b671a4deb6c18475ba39a00887b5191cca89790c89bca1e94ce2241028e41b60e62d6d4d658753c584641d2ce5d90415456dd0dcb6757264a0f8b
|
data/berta.gemspec
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'berta/version'
|
6
|
+
|
1
7
|
Gem::Specification.new do |s|
|
2
8
|
s.name = 'berta'
|
3
|
-
s.version =
|
9
|
+
s.version = Berta::VERSION
|
4
10
|
s.summary = 'Berta VM expiration tool'
|
5
11
|
s.description = 'Berta will check all VMs on OpenNebula cloud for expiration date'
|
6
12
|
s.authors = ['Dusan Baran']
|
data/config/berta.yml
CHANGED
@@ -13,7 +13,7 @@ berta:
|
|
13
13
|
groups: # VMs in this groups will be ignored
|
14
14
|
clusters: # VMs in this clusters will be ignored
|
15
15
|
logging:
|
16
|
-
file: /var/log/berta/berta.log # File
|
16
|
+
file: /var/log/berta/berta.log # File to write log to. To turn off file logging leave this field empty
|
17
17
|
level: error # Logging level
|
18
|
-
dry-run: false # Berta
|
18
|
+
dry-run: false # Berta won't change anything on running instance of OpenNebula
|
19
19
|
debug: false # Debug mode
|
data/config/email.erb
CHANGED
data/lib/berta.rb
CHANGED
data/lib/berta/cli.rb
CHANGED
@@ -79,10 +79,10 @@ module Berta
|
|
79
79
|
user_name = user['NAME']
|
80
80
|
raise Berta::Errors::Entities::NoUserEmailError, "User: #{user_name} with id: #{user['ID']} has no email set" \
|
81
81
|
unless user_email
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
email_text = email_template.render(Hash, user_email: user_email, user_name: user_name, vms: vms_data(vms))
|
83
|
+
logger.debug "Sending mail to user: #{user_name} with email: #{user_email}:\n#{email_text}"
|
84
|
+
return if Berta::Settings['dry-run']
|
85
|
+
mail = Mail.new(email_text)
|
86
86
|
mail.delivery_method :sendmail
|
87
87
|
mail.deliver
|
88
88
|
end
|
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.1.
|
4
|
+
version: 1.1.2
|
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-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -278,6 +278,7 @@ files:
|
|
278
278
|
- lib/berta/utils.rb
|
279
279
|
- lib/berta/utils/opennebula.rb
|
280
280
|
- lib/berta/utils/opennebula/helper.rb
|
281
|
+
- lib/berta/version.rb
|
281
282
|
- lib/berta/virtual_machine_handler.rb
|
282
283
|
homepage: https://github.com/dudoslav/berta
|
283
284
|
licenses:
|
@@ -299,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
300
|
version: '0'
|
300
301
|
requirements: []
|
301
302
|
rubyforge_project:
|
302
|
-
rubygems_version: 2.
|
303
|
+
rubygems_version: 2.4.8
|
303
304
|
signing_key:
|
304
305
|
specification_version: 4
|
305
306
|
summary: Berta VM expiration tool
|