Sha256: b7aa681b06dd1b66d17936cebf6eb49895f2054190def3fb964aa71787816848

Contents?: true

Size: 920 Bytes

Versions: 4

Compression:

Stored size: 920 Bytes

Contents

module Fog
  module Network
    class HuaweiCloud
      class Real
        # Delete a security group rule
        #
        # ==== Parameters
        # * 'security_group_rule_id'<~String> - UUID of the security group rule to delete
        def delete_security_group_rule(security_group_rule_id)
          request(
            :expects => 204,
            :method  => "DELETE",
            :path    => "security-group-rules/#{security_group_rule_id}"
          )
        end
      end

      class Mock
        def delete_security_group_rule(security_group_rule_id)
          response = Excon::Response.new
          if data[:security_group_rules][security_group_rule_id]
            data[:security_group_rules].delete(security_group_rule_id)
            response.status = 204
            response
          else
            raise Fog::Network::HuaweiCloud::NotFound
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/network/huaweicloud/requests/delete_security_group_rule.rb
fog-huaweicloud-0.0.2 lib/fog/network/huaweicloud/requests/delete_security_group_rule.rb
fog-huaweicloud-0.1.3 lib/fog/network/huaweicloud/requests/delete_security_group_rule.rb
fog-huaweicloud-0.1.2 lib/fog/network/huaweicloud/requests/delete_security_group_rule.rb