Sha256: dce72961cdc857923790a8bf4c7507b6c9d97fa2199c4f2641c4ef1d4b78ef5d

Contents?: true

Size: 779 Bytes

Versions: 4

Compression:

Stored size: 779 Bytes

Contents

module Fog
  module Compute
    class HuaweiCloud
      class Real
        def delete_security_group(security_group_id)
          request(
            :expects => 202,
            :method  => 'DELETE',
            :path    => "os-security-groups/#{security_group_id}"
          )
        end
      end

      class Mock
        def delete_security_group(security_group_id)
          data[:security_groups].delete security_group_id.to_s

          response = Excon::Response.new
          response.status = 202
          response.headers = {
            "Content-Type"   => "text/html; charset=UTF-8",
            "Content-Length" => "0",
            "Date"           => Date.new
          }
          response.body = {}
          response
        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/delete_security_group.rb
fog-huaweicloud-0.0.2 lib/fog/compute/huaweicloud/requests/delete_security_group.rb
fog-huaweicloud-0.1.3 lib/fog/compute/huaweicloud/requests/delete_security_group.rb
fog-huaweicloud-0.1.2 lib/fog/compute/huaweicloud/requests/delete_security_group.rb