Sha256: b905aa831c2d546b977d1d8f6d8f88dd869cb35d5ece2382709baa3653fb814c

Contents?: true

Size: 1.03 KB

Versions: 25

Compression:

Stored size: 1.03 KB

Contents

module Fog
  module DNS
    class Dynect
      class Real

        def post_session
          request(
            :expects  => 200,
            :method   => :post,
            :path     => "Session",
            :body     => MultiJson.encode({
              :customer_name  => @dynect_customer,
              :user_name      => @dynect_username,
              :password       => @dynect_password
            })
          )
        end
      end

      class Mock
        def post_session
          response = Excon::Response.new
          response.status = 200
          response.body = {
            "status" => "success",
            "data" => {
              "token" => auth_token,
              "version" => Fog::Dynect::Mock.version
            },
            "job_id" => Fog::Dynect::Mock.job_id,
            "msgs"=>[{
              "INFO"=>"login: Login successful",
              "SOURCE"=>"BLL",
              "ERR_CD"=>nil,
              "LVL"=>"INFO"
            }]
          }
          response
        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/dynect/requests/dns/post_session.rb
michiels-fog-1.3.1 lib/fog/dynect/requests/dns/post_session.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
fog-1.3.1 lib/fog/dynect/requests/dns/post_session.rb
fog-1.3.0 lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
fog-1.2.0 lib/fog/dynect/requests/dns/post_session.rb
ktheory-fog-1.1.2 lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
fog-1.1.2 lib/fog/dynect/requests/dns/post_session.rb
fog_tractical-1.1.4 lib/fog/dynect/requests/dns/post_session.rb
fog_tractical-1.1.3 lib/fog/dynect/requests/dns/post_session.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/dynect/requests/dns/post_session.rb
fog-1.1.1 lib/fog/dynect/requests/dns/post_session.rb
fog-1.1.0 lib/fog/dynect/requests/dns/post_session.rb