genesis_collector 0.1.25 → 0.1.27

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: 7602c0fc0f67b5e6820d907360da9995cee68a3a
4
- data.tar.gz: 834951276ac3f0358f72766bc89553db787d6406
3
+ metadata.gz: 794cf9b7336cdf2230c6a0dac7dabcd713728f1c
4
+ data.tar.gz: 66a0922e1a18e79edc407526ed96f8a5bc492ac8
5
5
  SHA512:
6
- metadata.gz: ca38d56d58acbc02ad078cb5eb8d343b2feb0eb34c1c7f0bb2ab77b4c08b53201db3ff634c86138846fc135899624b0fbe1b2bc0b896a9dbab18c793945fb052
7
- data.tar.gz: 11fa50f3547154a9d49e42fd9226c85e7e8bb9837a43b3a5e65a133f9c020a54ebe2a3b2581fc0ff4596df7b04e804dbc5d8be58b07fc185db6ced2a077bc389
6
+ metadata.gz: 636cc95d095a07df45cf6910d192c318f7628f96fa1f8f12a55ad4352e13dcb45cdeef8b02c1d65e8ee56391fde121a0f2a7401a9343ee1a6ec84dd4704e0f33
7
+ data.tar.gz: d5f2f0350ed6686157d390ebb012294500e2c2af2ad490e35c0b939b15a091d758836977de6d6f5e43620d6751ecaad33f87002eea25b02ce0a2730e84d9acc6
@@ -16,6 +16,9 @@ OptionParser.new do |opts|
16
16
  opts.on('--submit', 'Submit data to Genesis server') do
17
17
  options[:submit] = true
18
18
  end
19
+ opts.on('--json', 'Output JSON') do
20
+ options[:json] = true
21
+ end
19
22
  opts.on_tail('-h', '--help', 'Show this message') do
20
23
  puts opts
21
24
  exit
@@ -36,7 +39,11 @@ end
36
39
  collector = GenesisCollector::Collector.new(config)
37
40
  collector.collect!
38
41
 
39
- puts "SKU: #{collector.sku}"
40
- pp collector.payload
42
+ if options[:json]
43
+ puts JSON.generate(collector.payload)
44
+ else
45
+ puts "SKU: #{collector.sku}"
46
+ pp collector.payload
47
+ end
41
48
 
42
49
  collector.submit! if true == options[:submit]
@@ -10,9 +10,9 @@ module GenesisCollector
10
10
  next if ifaddr.addr.nil?
11
11
  interfaces[ifaddr.name] ||= {}
12
12
  interfaces[ifaddr.name][:addresses] ||= []
13
- next unless ifaddr.addr.ipv4?
13
+ next unless ifaddr.addr.ip?
14
14
  interfaces[ifaddr.name][:addresses] << {
15
- address: ifaddr.addr.ip_address,
15
+ address: ifaddr.addr.ip_address.split('%').first,
16
16
  netmask: ifaddr.netmask.ip_address
17
17
  }
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module GenesisCollector
2
- VERSION = '0.1.25'
2
+ VERSION = '0.1.27'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genesis_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Radcliffe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-26 00:00:00.000000000 Z
11
+ date: 2016-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,9 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.6.3
119
+ rubygems_version: 2.5.1
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Agent to collect information about bare metal servers and send it to Genesis.
123
123
  test_files: []
124
- has_rdoc: