Sha256: 14ebf43e476dfe406143b6f66ea722b11816f4add20f3f05f490381e93b3328e

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 Bytes

Contents

module Fog
  module Compute
    class HuaweiCloud
      class Real
        def get_os_interface(server_id,port_id)
          request(
            :expects => [200, 202, 203],
            :method  => 'GET',
            :path    => "servers/#{server_id}/os-interface/#{port_id}"
          )
        end
      end

      class Mock
        def get_os_interface(server_id,port_id)
          Excon::Response.new(
            :body   => {'interfaceAttachment' => data[:os_interfaces].first},
            :status => 200
          )
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/compute/huaweicloud/requests/get_os_interface.rb
fog-huaweicloud-0.0.2 lib/fog/compute/huaweicloud/requests/get_os_interface.rb
fog-huaweicloud-0.1.3 lib/fog/compute/huaweicloud/requests/get_os_interface.rb
fog-huaweicloud-0.1.2 lib/fog/compute/huaweicloud/requests/get_os_interface.rb