opsviewconfig 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opsviewconfig.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e91608cf94b439c211a03ed30366530fb4838ff
|
4
|
+
data.tar.gz: 36490a2345ec07839731b4843be96c67ab4d7c76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 955a2fe2398455be4ebf0e444c87e2bd5c65c12ca12629d445daafb6927403b70a75405270c3d3ad45f51c86983101d21f13c54d81c8f381f1e8fece75ef33c0
|
7
|
+
data.tar.gz: 71b156a605d4aed686761ee63974b86145c1073a762f75c539994046bd5f91d54d9d7f56bd83fafd544a09bb489e7446c5aed2ad7f7cabe6d0141ed6f72fe1a4
|
data/lib/opsviewconfig.rb
CHANGED
@@ -29,6 +29,7 @@ class Opsviewconfig
|
|
29
29
|
# Need to parse out junk we don't need to export
|
30
30
|
res = export_parse(res,resourcetype)
|
31
31
|
res.each do |resource|
|
32
|
+
p resource['name']
|
32
33
|
filename = resource['name'].dup
|
33
34
|
filename.gsub!(/[^0-9A-Za-z.\-]/, '_')
|
34
35
|
#puts "Exporting #{resource['name']} to #{filename}"
|
@@ -59,6 +60,12 @@ class Opsviewconfig
|
|
59
60
|
if resourcetype == "host" && !resource["hosttemplates"].nil?
|
60
61
|
next if resource["hosttemplates"].find { |h| h['name'] == 'ec2instance'}
|
61
62
|
end
|
63
|
+
|
64
|
+
# Don't save this if this is one of the default timeperiods
|
65
|
+
if resourcetype == "timeperiod"
|
66
|
+
next if ["workhours","nonworkhours","none","24x7"].include? resource["name"]
|
67
|
+
end
|
68
|
+
|
62
69
|
# Save
|
63
70
|
cleanexport << resource.sort_by_key(true)
|
64
71
|
end
|
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.
|
4
|
+
version: 0.0.7
|
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-
|
11
|
+
date: 2015-12-30 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
|