opsviewconfig 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/opsviewconfig.rb +9 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b17b6d80713970a4dc2f24fc124afab39eb853c7
4
- data.tar.gz: 1e6d9bae38a263d173f5ae154548f794b7cb8a19
3
+ metadata.gz: dd87152d4b0708291706fea937e4429facbf8ac8
4
+ data.tar.gz: e2bbad4b05f6e96bbb5c3a54379c6e026eb192e7
5
5
  SHA512:
6
- metadata.gz: 0f289f0b1ec3e0378d5f1b9135a8cddb6ecab111815316343f5d82268e7d162e061ca8524be02d8f817a97ad2c547e129ff40df693fc47799702a9f8248efb56
7
- data.tar.gz: 82c754a94fdb1ba60813946a7cbdb5acb1f2410af9af7fc85a30862e859db51d3a9535a11a7b3edb75462566139ee992501c2d9defd5ee76ba37f958a25ddb70
6
+ metadata.gz: 5a1410456db6793e4cb49422c534a14b7b365e63a66e58c56163680a849cf1eec0cc7b66b43f9ec46aeb708142a2ae0f896043a4410c13d78c99c859172a1481
7
+ data.tar.gz: 479e4f09865eded6937a7178e71cb173a50ca89a6763365944c5e6377e378ab29781423a288d57fa391352dc94b18bfbbeba2e95505b22398a89d306c9e100ae
@@ -55,9 +55,15 @@ class Opsviewconfig
55
55
  resource.delete("hosttemplates")
56
56
  end
57
57
 
58
- # Don't save if this is an EC2 host instance, those should be generated automatically and we don't need to version control them
59
- if resourcetype == "host" && !resource["hosttemplates"].nil?
60
- next if resource["hosttemplates"].find { |h| h['name'] == 'ec2instance'}
58
+ if resourcetype == "host"
59
+ # Don't save if this is an EC2 host instance, those should be generated automatically and we don't need to version control them
60
+ unless resource["hosttemplates"].nil?
61
+ next if resource["hosttemplates"].find { |h| h['name'] == 'ec2instance' }
62
+ end
63
+ # Remove id's from the host attributes since they are auto-generated
64
+ unless resource["hostattributes"].nil?
65
+ resource["hostattributes"].each { |attr| attr.delete("id") }
66
+ end
61
67
  end
62
68
 
63
69
  # Don't save this if this is one of the default timeperiods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsviewconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy M
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple class to import and export OpsView config
14
14
  email: dmitriy.mar@gmail.com
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  version: '0'
38
38
  requirements: []
39
39
  rubyforge_project:
40
- rubygems_version: 2.0.14
40
+ rubygems_version: 2.0.14.1
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: OpsView configuration import and export class