dyntool 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dyntool.rb +9 -1
- metadata +3 -3
data/lib/dyntool.rb
CHANGED
@@ -109,7 +109,7 @@ class Parameters
|
|
109
109
|
@sconf.SetConfFile
|
110
110
|
@sconf.GetHandler
|
111
111
|
end
|
112
|
-
def SendEvent(user,suffix,key)
|
112
|
+
def SendEvent(user,suffix,key,comment)
|
113
113
|
@data = []
|
114
114
|
@notify_apps = []
|
115
115
|
@flag = "false"
|
@@ -118,6 +118,7 @@ class Parameters
|
|
118
118
|
end
|
119
119
|
@data << " #{user}"
|
120
120
|
@data << " DNS"
|
121
|
+
@data << "#{comment}"
|
121
122
|
@dcs = @sconf.GetDcs
|
122
123
|
@dcs.each do |dc|
|
123
124
|
@result = `echo "Key73512383ghtyA1109 #{@data} " | nc -w 1 event.#{dc}.#{suffix} 7279 2> /dev/null`
|
@@ -199,6 +200,13 @@ class Parameters
|
|
199
200
|
@valid = arg
|
200
201
|
end
|
201
202
|
end
|
203
|
+
def ValidateComment(flag,comment)
|
204
|
+
if flag != "-m"
|
205
|
+
DisplayUsage()
|
206
|
+
else
|
207
|
+
@comment = comment
|
208
|
+
end
|
209
|
+
end
|
202
210
|
def GetZone(fqdn)
|
203
211
|
@fqdn_parts = fqdn.split('.')
|
204
212
|
@zone = "#{@fqdn_parts[-2]}" + "." + "#{@fqdn_parts[-1]}"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ariel Moskovich
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2014-01-
|
17
|
+
date: 2014-01-17 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|