Sha256: 89de6cc5483cf2ca1eba3ac57a729efd1860db3764997fd905dac8f890dee085

Contents?: true

Size: 960 Bytes

Versions: 30

Compression:

Stored size: 960 Bytes

Contents

module Fog
  module DNS
    class OpenStack
      class V2
        class Real
          def create_zone_transfer_request(zone_id, options = {})
            vanilla_options = [:target_project_id, :description, :project_id]
            data = vanilla_options.inject({}) do |result,option|
              result[option] = options[option] if options[option]
              result
            end

            request(
              :body    => Fog::JSON.encode(data),
              :expects => 201,
              :method  => 'POST',
              :path    => "zones/#{zone_id}/tasks/transfer_requests"
            )
          end
        end

        class Mock
          def create_zone_transfer_request(zone_id, options = {})
            response = Excon::Response.new
            response.status = 201
            response.body = data[:zone_transfer_requests]["transfer_requests"].first
            response
          end
        end
      end
    end
  end
end

Version data entries

30 entries across 28 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.10 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.1.30 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.1.29 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.9 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.1.28 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.8 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.7 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.6 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.5 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.4 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.3 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.2 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.3.0 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.2.4 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.2.3 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.2.2 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.2.1 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-openstack-0.2.0 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb
fog-zj-0.1.28 lib/fog/dns/openstack/v2/requests/create_zone_transfer_request.rb