Code Review
/
packages
/
precise
/
mcollective.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Update version according to OSCI-856
[packages/precise/mcollective.git]
/
plugins
/
mcollective
/
validator
/
ipv4address_validator.rb
1
module MCollective
2
module Validator
3
class Ipv4addressValidator
4
require 'ipaddr'
5
6
def self.validate(validator)
7
begin
8
ip = IPAddr.new(validator)
9
raise ValidatorError, "value should be an ipv4 adddress" unless ip.ipv4?
10
rescue
11
raise ValidatorError, "value should be an ipv4 address"
12
end
13
end
14
end
15
end
16
end