Sha256: 25b26b0cc3734e9471c573e61fd4f89494772d1d53822e284f2b3b5482883c15

Contents?: true

Size: 383 Bytes

Versions: 44

Compression:

Stored size: 383 Bytes

Contents

module MCollective
  module Validator
    class Ipv4addressValidator
      require 'ipaddr'

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

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
mcollective-client-2.10.2 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.10.1 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.10.0 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.8.7 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.8.5 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.8.8 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.8.6 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.9.1 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.9.0 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.8.9 lib/mcollective/validator/ipv4address_validator.rb
dtk-node-agent-0.7.7 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb
dtk-node-agent-0.7.6 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb
dtk-node-agent-0.7.5 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb
mcollective-client-2.8.4 lib/mcollective/validator/ipv4address_validator.rb
mcollective-client-2.8.3 lib/mcollective/validator/ipv4address_validator.rb
dtk-node-agent-0.7.4.1 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb
dtk-node-agent-0.7.4 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb
mcollective-client-2.8.2 lib/mcollective/validator/ipv4address_validator.rb
dtk-node-agent-0.7.3 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb
dtk-node-agent-0.7.2 mcollective_additions/plugins/v2.2/validator/ipv4address_validator.rb