Sha256: 8397ff3409591b2cf19966fb8b2b7cd1a84b42c3dc0dd48e2fd878c6fe0314af

Contents?: true

Size: 848 Bytes

Versions: 2

Compression:

Stored size: 848 Bytes

Contents

module Fog
  module Compute
    class OracleCloud
      class Real
      	def delete_security_list(name)
      		# Just in case it's already set
      		name.sub! "/Compute-#{@identity_domain}/#{@username}/", ''
	      	request(
            :method   => 'DELETE',
            :expects  => 204,
            :path     => "/seclist/Compute-#{@identity_domain}/#{@username}/#{name}",
            :headers  => {
              'Content-Type' => 'application/oracle-compute-v3+json'
            }
          )
      	end
      end
      class Mock
        def delete_security_list(name)
          response = Excon::Response.new
          clean_name = name.sub "/Compute-#{@identity_domain}/#{@username}/", ''
          self.data[:security_lists].delete(clean_name)
          response.status = 204
          response
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.17 lib/fog/oraclecloud/requests/compute/delete_security_list.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/requests/compute/delete_security_list.rb