Sha256: ad97a970250e2555adbebb45386619c29cb572ea2814b9ddd0b5d82b95745f1c
Contents?: true
Size: 839 Bytes
Versions: 4
Compression:
Stored size: 839 Bytes
Contents
module Fog module Introspection class HuaweiCloud class Real def create_rules(attributes) attributes_valid = [ :actions, :conditions, :uuid, :description ] # Filter only allowed creation attributes data = attributes.select do |key, _| attributes_valid.include?(key.to_sym) end request( :body => Fog::JSON.encode(data), :expects => 200, :method => "POST", :path => "rules" ) end end class Mock def create_rules(_) response = Excon::Response.new response.status = 200 response.body = {"rules" => data[:rules].first} response end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems