Sha256: 2425ad1ada3591c449b0d4b9d19537f1fd1591210dc530b393d9906b4f3283f5

Contents?: true

Size: 867 Bytes

Versions: 25

Compression:

Stored size: 867 Bytes

Contents

module Fog
  module DNS
    class Rackspace
      class Real
        def modify_record(domain_id, record_id, options={})

          validate_path_fragment :domain_id, domain_id
          validate_path_fragment :record_id, record_id

          path = "domains/#{domain_id}/records/#{record_id}"
          data = {}

          if options.has_key? :ttl
            data['ttl'] = options[:ttl]
          end
          if options.has_key? :name
            data['name'] = options[:name]
          end
          if options.has_key? :data
            data['data'] = options[:data]
          end

          if data.empty?
            return
          end

          request(
            :expects  => [202, 204],
            :method   => 'PUT',
            :path     => path,
            :body     => MultiJson.encode(data)
          )
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
michiels-fog-1.3.1 lib/fog/rackspace/requests/dns/modify_record.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
fog-1.3.1 lib/fog/rackspace/requests/dns/modify_record.rb
fog-1.3.0 lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
fog-1.2.0 lib/fog/rackspace/requests/dns/modify_record.rb
ktheory-fog-1.1.2 lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
fog-1.1.2 lib/fog/rackspace/requests/dns/modify_record.rb
fog_tractical-1.1.4 lib/fog/rackspace/requests/dns/modify_record.rb
fog_tractical-1.1.3 lib/fog/rackspace/requests/dns/modify_record.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/modify_record.rb
fog-1.1.1 lib/fog/rackspace/requests/dns/modify_record.rb
fog-1.1.0 lib/fog/rackspace/requests/dns/modify_record.rb