Sha256: 344bf2c0eb8c06efdcf9a6e5a7adfe6676fc6ebbf74ee6eaec7d02227425d6dd

Contents?: true

Size: 383 Bytes

Versions: 44

Compression:

Stored size: 383 Bytes

Contents

module MCollective
  module Validator
    class Ipv6addressValidator
      require 'ipaddr'

      def self.validate(validator)
        begin
          ip = IPAddr.new(validator)
          raise ValidatorError, "value should be an ipv6 adddress" unless ip.ipv6?
        rescue
          raise ValidatorError, "value should be an ipv6 address"
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
dtk-node-agent-0.7.1 mcollective_additions/plugins/v2.2/validator/ipv6address_validator.rb
mcollective-client-2.8.1 lib/mcollective/validator/ipv6address_validator.rb
dtk-node-agent-0.7.0 mcollective_additions/plugins/v2.2/validator/ipv6address_validator.rb
mcollective-client-2.8.0 lib/mcollective/validator/ipv6address_validator.rb