Sha256: e90c8509ae22016ca6c81e7cb26e38f3cd618f3cfecc45d93d07cc9e291a1692

Contents?: true

Size: 502 Bytes

Versions: 25

Compression:

Stored size: 502 Bytes

Contents

module Fog
  module Baremetal
    class OpenStack
      class Real
        def get_port(port_id)
          request(
            :expects => [200, 204],
            :method  => 'GET',
            :path    => "ports/#{port_id}"
          )
        end
      end

      class Mock
        def get_port(_port_id)
          response = Excon::Response.new
          response.status = [200, 204][rand(2)]
          response.body = data[:ports].first
          response
        end
      end
    end
  end
end

Version data entries

25 entries across 23 versions & 3 rubygems

Version Path
fog-openstack-0.1.27 lib/fog/baremetal/openstack/requests/get_port.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/baremetal/openstack/requests/get_port.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/baremetal/openstack/requests/get_port.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/baremetal/openstack/requests/get_port.rb
fog-openstack-0.1.26 lib/fog/baremetal/openstack/requests/get_port.rb