opsview_rest 0.4.3 → 0.4.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1afb7b8e126d420fca83320f309f7aa1f55de60a
4
- data.tar.gz: 9f1349ac468c4020c6fd62ff1d770228732dceea
3
+ metadata.gz: a5f07bb5d9579733ba504371dcdde50cd397c15d
4
+ data.tar.gz: 15aaae864adbc403135c0af3cf6f3d88b794ae7c
5
5
  SHA512:
6
- metadata.gz: 97d2afc59f4f679bd3fefc90375f700e1fe4c78468e29880922f252d36c4bf882f213ceea785d58242581edf294526b4c4b3e02e4b5b64af0d86e02302fd263a
7
- data.tar.gz: ae610384dfb5cbd8d520efa792ec5710547bb07a81cc83b2b8a1cb1a9f075ff07577b167529d069eaa3ef7c9d2b31073156745abe9704a15df3023df45757935
6
+ metadata.gz: 51e4191a36adb6bc5c5e260a7d458a3eb020384f231bde0a5cdda795ce59a2866e9a97a64ba4b387102e814553e92fcae1edae8cef3d8b6a43b76c6ec1c28439
7
+ data.tar.gz: 1f599e2413800c55569bdc3f9b9343e22e3bb87526fc0eb7bad808a7845f64b3469410b392a519ceb6c975d1563c201b170aab1c6c42111c36227d6d801e8341
@@ -59,9 +59,9 @@ class OpsviewRest
59
59
 
60
60
  @options[:all_servicegroups] = if @options[:all_servicegroups] then 1 else 0 end
61
61
  @options[:all_hostgroups] = if @options[:all_hostgroups] then 1 else 0 end
62
- @options[:servicegroups] = @options[:servicegroups].map { |x| { "name" => x } }
63
- @options[:keywords] = @options[:keywords].map { |x| { "name" => x } }
64
- @options[:hostgroups] = @options[:hostgroups].map { |x| { "name" => x } }
62
+ @options[:servicegroups] = @options[:servicegroups].map { |x| { "name" => x } } unless @options[:servicegroups].nil?
63
+ @options[:keywords] = @options[:keywords].map { |x| { "name" => x } } unless @options[:keywords].nil?
64
+ @options[:hostgroups] = @options[:hostgroups].map { |x| { "name" => x } } unless @options[:hostgroups].nil?
65
65
  @options[:role] = { "name" => @options[:role] }
66
66
 
67
67
  save(@options[:replace]) if @options[:save]
@@ -13,7 +13,7 @@ class OpsviewRest
13
13
  :master => false,
14
14
  :active => true,
15
15
  :command => "notify_by_email",
16
- :contact_variables => "EMAIL"
16
+ :contact_variables => "EMAIL",
17
17
  :save => true,
18
18
  :replace => false
19
19
  }.update options
@@ -29,10 +29,10 @@ class OpsviewRest
29
29
  @opsview = opsview
30
30
  @resource_type = @options[:type]
31
31
 
32
- @option[:servicecheck_notification_periods] = @option[:servicecheck_notification_periods].map { |x| { "name" => x } }
33
- @option[:servicecheck_check_periods] = @option[:servicecheck_check_periods].map { |x| { "name" => x } }
34
- @option[:host_check_periods] = @option[:host_check_periods].map { |x| { "name" => x } }
35
- @option[:host_notification_periods] = @option[:host_notification_periods].map { |x| { "name" => x } }
32
+ @options[:servicecheck_notification_periods] = @options[:servicecheck_notification_periods].map { |x| { "name" => x } } unless @options[:servicecheck_notification_periods].nil?
33
+ @options[:servicecheck_check_periods] = @options[:servicecheck_check_periods].map { |x| { "name" => x } } unless @options[:servicecheck_check_periods].nil?
34
+ @options[:host_check_periods] = @options[:host_check_periods].map { |x| { "name" => x } } unless @options[:host_check_periods].nil?
35
+ @options[:host_notification_periods] = @options[:host_notification_periods].map { |x| { "name" => x } } unless @options[:host_notification_periods].nil?
36
36
 
37
37
  save(@options[:replace]) if @options[:save]
38
38
  end
data/lib/opsview_rest.rb CHANGED
@@ -57,8 +57,8 @@ class OpsviewRest
57
57
  when :monitoring_server
58
58
  require 'opsview_rest/monitoring_server'
59
59
  OpsviewRest::MonitoringServer.new(self, options)
60
- when :notification_method
61
- require 'opsview_rest/notification_method'
60
+ when :notificationmethod
61
+ require 'opsview_rest/notificationmethod'
62
62
  OpsviewRest::NotificationMethod.new(self, options)
63
63
  when :role
64
64
  require 'opsview_rest/role'
data/opsview_rest.gemspec CHANGED
@@ -24,5 +24,5 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency 'json', '~> 1.7.7'
25
25
  gem.add_dependency 'rest-client', '~> 1.6.6'
26
26
 
27
- gem.version = '0.4.3'
27
+ gem.version = '0.4.4'
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsview_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Paredes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake