Sha256: e157c4d74db9cb68873906c88b275b9c195ac269f53266b2c5b489255ab90a71

Contents?: true

Size: 953 Bytes

Versions: 12

Compression:

Stored size: 953 Bytes

Contents

module Fog
  module Compute
    class OracleCloud
      class Real
      	def create_security_rule(name, src_list, dst_list, application, action, options={})
          body_data     = {
            'name'             		=> name,
            'src_list'						=> src_list,
            'dst_list'						=> dst_list,
            'application'					=> application,
            'action'					   	=> action,
            'description'         => options[:description],
            'disabled'            => options[:disabled]
          }
          body_data = body_data.reject {|key, value| value.nil?}
          request(
            :method   => 'POST',
            :expects  => 201,
            :path     => "/secrule/",
            :body     => Fog::JSON.encode(body_data),
            :headers  => {
              'Content-Type' => 'application/oracle-compute-v3+json'
            }
          )
      	end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.12 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.11 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.10 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.9 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.8 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.7 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.6 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.5 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.4 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.3 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.2 lib/fog/oraclecloud/requests/compute/create_security_rule.rb
fog-oraclecloud-0.1.1 lib/fog/oraclecloud/requests/compute/create_security_rule.rb