Sha256: 0c83e8573bca26edd924207b97c1db38035413671f6ce3776d32dc9e234984d2

Contents?: true

Size: 818 Bytes

Versions: 25

Compression:

Stored size: 818 Bytes

Contents

module Fog
  module DNS
    class Rackspace
      class Real
        def add_records(domain_id, records)

          validate_path_fragment :domain_id, domain_id

          data = {
            'records' => records.collect do |record|
              record_data = {
                'name' => record[:name],
                'type' => record[:type],
                'data' => record[:data]
              }

              if record.has_key? :priority
                record_data['priority'] = record[:priority]
              end
              record_data
            end
          }

          request(
            :expects  => 202,
            :method   => 'POST',
            :path     => "domains/#{domain_id}/records",
            :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/add_records.rb
michiels-fog-1.3.1 lib/fog/rackspace/requests/dns/add_records.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
fog-1.3.1 lib/fog/rackspace/requests/dns/add_records.rb
fog-1.3.0 lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
fog-1.2.0 lib/fog/rackspace/requests/dns/add_records.rb
ktheory-fog-1.1.2 lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
fog-1.1.2 lib/fog/rackspace/requests/dns/add_records.rb
fog_tractical-1.1.4 lib/fog/rackspace/requests/dns/add_records.rb
fog_tractical-1.1.3 lib/fog/rackspace/requests/dns/add_records.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/rackspace/requests/dns/add_records.rb
fog-1.1.1 lib/fog/rackspace/requests/dns/add_records.rb
fog-1.1.0 lib/fog/rackspace/requests/dns/add_records.rb