Sha256: c60f139793b200a1d2098d05cffb9982fa8850d14e508f70ab17cc90a5765120
Contents?: true
Size: 641 Bytes
Versions: 22
Compression:
Stored size: 641 Bytes
Contents
module Fog module OpenStack class Network class Real def delete_port(port_id) request( :expects => 204, :method => 'DELETE', :path => "ports/#{port_id}" ) end end class Mock def delete_port(port_id) response = Excon::Response.new if list_ports.body['ports'].map { |r| r['id'] }.include? port_id data[:ports].delete(port_id) response.status = 204 response else raise Fog::OpenStack::Network::NotFound end end end end end end
Version data entries
22 entries across 22 versions & 3 rubygems