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
/
ipv6address_validator.rb
1
module MCollective
2
module Validator
3
class Ipv6addressValidator
4
require 'ipaddr'
5
6
def self.validate(validator)
7
begin
8
ip = IPAddr.new(validator)
9
raise ValidatorError, "value should be an ipv6 adddress" unless ip.ipv6?
10
rescue
11
raise ValidatorError, "value should be an ipv6 address"
12
end
13
end
14
end
15
end
16
end