Sha256: 5abb828a208cf91277c6a653b017a397fd2903387a149dfd1a57fefed3fdeea9

Contents?: true

Size: 1.06 KB

Versions: 33

Compression:

Stored size: 1.06 KB

Contents

module Fog
  module DNS
    class Dynect
      class Real
        def post_session
          request(
            :expects  => 200,
            :idempotent => true,
            :method   => :post,
            :path     => "Session",
            :body     => Fog::JSON.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

33 entries across 31 versions & 6 rubygems

Version Path
fog-dynect-0.4.0 lib/fog/dynect/requests/dns/post_session.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-dynect-0.0.3/lib/fog/dynect/requests/dns/post_session.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-dynect-0.0.3/lib/fog/dynect/requests/dns/post_session.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-dynect-0.0.3/lib/fog/dynect/requests/dns/post_session.rb
fog-dynect-0.3.0 lib/fog/dynect/requests/dns/post_session.rb
fog-dynect-0.2.0 lib/fog/dynect/requests/dns/post_session.rb
fog-dynect-0.1.0 lib/fog/dynect/requests/dns/post_session.rb
fog-dynect-0.0.3 lib/fog/dynect/requests/dns/post_session.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/dynect/requests/dns/post_session.rb
fog-dynect-0.0.2 lib/fog/dynect/requests/dns/post_session.rb
fog-dynect-0.0.1 lib/fog/dynect/requests/dns/post_session.rb
fog-1.32.0 lib/fog/dynect/requests/dns/post_session.rb
fog-1.31.0 lib/fog/dynect/requests/dns/post_session.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/dynect/requests/dns/post_session.rb
fog-1.30.0 lib/fog/dynect/requests/dns/post_session.rb
fog-1.29.0 lib/fog/dynect/requests/dns/post_session.rb
fog-1.28.0 lib/fog/dynect/requests/dns/post_session.rb
fog-1.27.0 lib/fog/dynect/requests/dns/post_session.rb
fog-1.26.0 lib/fog/dynect/requests/dns/post_session.rb
fog-1.25.0 lib/fog/dynect/requests/dns/post_session.rb