nagios-promoo 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 586b15304cbf0325aa52571802a4eecb4c2375f7
4
- data.tar.gz: ed96a9964cfd2d7ffba0e293437d14965a7d88a6
3
+ metadata.gz: 76dff93f07782caaba45b356e3aeef9861565a29
4
+ data.tar.gz: 11f4809f563ca467f4d6010eb1771faf00d5f0f7
5
5
  SHA512:
6
- metadata.gz: 08cbefb1c033f2f00a30efcb71b8de286616b25ccca8dbd4be05caec6a136450adebb7fd8cee7cf8a98c5d5fce258d9745b7487aecbaa3fb11cdec25b2f09014
7
- data.tar.gz: e4eec066e5cde62dcfe199772217965f8b800139583103a0f77a3b532b7cf7b2bb522cec32674045ebf4f141ee3ae2f6bdd209e60312cf9e8f2991a715e86a31
6
+ metadata.gz: f335f41c43a7c827935c8c5eb4a5ab6a72b4d2989d99ec84d1b2d6155180ff78456f7b0e8269958b6e3421299fad652ebb986478fa80cbb12a38ca6b1dafcc1e
7
+ data.tar.gz: 0090b8d4b2f7685f451a2714d47cc430dbe6072a1d29d9a977dec8a449b615b2f8abb8a5d5ed1f969c5f9ea6b0e09c911b1ea9ac92596a50e73686a21f61cc37
@@ -35,6 +35,6 @@ class Nagios::Promoo::Appdb::Probes::AppliancesProbe < Nagios::Promoo::Appdb::Pr
35
35
  private
36
36
 
37
37
  def check_appliances(options)
38
- [appdb_provider(options)['image']].flatten.compact.count
38
+ [appdb_provider(options)['provider:image']].flatten.compact.count
39
39
  end
40
40
  end
@@ -13,8 +13,8 @@ class Nagios::Promoo::Appdb::Probes::BaseProbe
13
13
  fail "Could not get site"\
14
14
  "details from AppDB [#{response.code}]" unless response.success?
15
15
 
16
- @provider = response.parsed_response['broker']['reply']['appdb']['provider'].select do |prov|
17
- prov['endpoint_url'] && (prov['endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
16
+ @provider = response.parsed_response['appdb:broker']['appdb:reply']['appdb:appdb']['virtualization:provider'].select do |prov|
17
+ prov['provider:endpoint_url'] && (prov['provider:endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
18
18
  end.first
19
19
  fail "Could not locate site by endpoint #{options[:endpoint].inspect} in AppDB" unless @provider
20
20
 
@@ -35,6 +35,6 @@ class Nagios::Promoo::Appdb::Probes::SizesProbe < Nagios::Promoo::Appdb::Probes:
35
35
  private
36
36
 
37
37
  def check_sizes(options)
38
- [appdb_provider(options)['template']].flatten.compact.count
38
+ [appdb_provider(options)['provider:template']].flatten.compact.count
39
39
  end
40
40
  end
@@ -79,7 +79,7 @@ class Nagios::Promoo::Appdb::Probes::VmcatcherProbe < Nagios::Promoo::Appdb::Pro
79
79
  end
80
80
 
81
81
  def provider_appliances(options)
82
- images = [appdb_provider(options)['image']].flatten.compact
82
+ images = [appdb_provider(options)['provider:image']].flatten.compact
83
83
  images.collect { |image| image['mp_uri'] }.reject { |mpuri| mpuri.blank? }
84
84
  end
85
85
 
@@ -6,7 +6,7 @@ require File.join(File.dirname(__FILE__), 'mixins_probe')
6
6
  class Nagios::Promoo::Occi::Probes::CategoriesProbe < Nagios::Promoo::Occi::Probes::BaseProbe
7
7
  class << self
8
8
  def description
9
- ['categories', 'Run a probe checking for mandatory OCCI categories definitions']
9
+ ['categories', 'Run a probe checking for mandatory OCCI category definitions']
10
10
  end
11
11
 
12
12
  def options
@@ -110,7 +110,7 @@ class Nagios::Promoo::Occi::Probes::ComputeProbe < Nagios::Promoo::Occi::Probes:
110
110
 
111
111
  def appdb_appliance(options)
112
112
  appliance = nil
113
- appliance = [appdb_provider(options)['image']].flatten.compact.select do |image|
113
+ appliance = [appdb_provider(options)['provider:image']].flatten.compact.select do |image|
114
114
  image['mp_uri'] && (normalize_mpuri(image['mp_uri']) == normalize_mpuri(options[:mpuri]))
115
115
  end.first
116
116
  fail "Site does not have an appliance with MPURI "\
@@ -121,10 +121,10 @@ class Nagios::Promoo::Occi::Probes::ComputeProbe < Nagios::Promoo::Occi::Probes:
121
121
 
122
122
  def appdb_smallest_size(options)
123
123
  sizes = []
124
- [appdb_provider(options)['template']].flatten.compact.each do |template|
124
+ [appdb_provider(options)['provider:template']].flatten.compact.each do |template|
125
125
  sizes << [
126
- template['resource_name'].split('#').last,
127
- template['main_memory_size'].to_i + (template['physical_cpus'].to_i * CPU_SUM_WEIGHT)
126
+ template['provider_template:resource_name'].split('#').last,
127
+ template['provider_template:main_memory_size'].to_i + (template['provider_template:physical_cpus'].to_i * CPU_SUM_WEIGHT)
128
128
  ]
129
129
  end
130
130
  fail "No appliance sizes available in AppDB" if sizes.blank?
@@ -143,8 +143,8 @@ class Nagios::Promoo::Occi::Probes::ComputeProbe < Nagios::Promoo::Occi::Probes:
143
143
  response.parsed_response
144
144
  end
145
145
 
146
- @provider = parsed_response['broker']['reply']['appdb']['provider'].select do |prov|
147
- prov['endpoint_url'] && (prov['endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
146
+ @provider = parsed_response['appdb:broker']['appdb:reply']['appdb:appdb']['virtualization:provider'].select do |prov|
147
+ prov['provider:endpoint_url'] && (prov['provider:endpoint_url'].chomp('/') == options[:endpoint].chomp('/'))
148
148
  end.first
149
149
  fail "Could not locate site by endpoint #{options[:endpoint].inspect} in AppDB" unless @provider
150
150
 
@@ -1,5 +1,5 @@
1
1
  module Nagios
2
2
  module Promoo
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagios-promoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Parak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-08 00:00:00.000000000 Z
11
+ date: 2016-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: occi-api
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  version: '0'
285
285
  requirements: []
286
286
  rubyforge_project:
287
- rubygems_version: 2.4.6
287
+ rubygems_version: 2.4.8
288
288
  signing_key:
289
289
  specification_version: 4
290
290
  summary: Nagios Probes for Monitoring OpenNebula and OCCI