Sha256: 331500b2cd827b70c6b20bfb6e35bdc7f45f8e504bc7a791f3e3816aeb29bb16

Contents?: true

Size: 999 Bytes

Versions: 12

Compression:

Stored size: 999 Bytes

Contents

require 'fog/core/model'

module Fog
  module Compute
  	class OracleCloud
	    class SecurityRule < Fog::Model
	      identity  :name

	      attribute :dst_list
	      attribute :name
	      attribute :src_list
	      attribute :uri
	      attribute :disabled
	      attribute :application
        attribute :proxyuri
        attribute :action

	      # Only used in create
	      attribute :description

 				def save
          #identity ? update : create
          create
        end

				def create
        	requires :name, :src_list, :dst_list, :application, :action
          
          data = service.create_security_rule(name, src_list, dst_list, application, action,
                                            :description => description,
                                            :disabled => disabled)
        end

        def destroy
          requires :name
          service.delete_security_rule(name)
        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/models/compute/security_rule.rb
fog-oraclecloud-0.1.11 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.10 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.9 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.8 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.7 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.6 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.5 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.4 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.3 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.2 lib/fog/oraclecloud/models/compute/security_rule.rb
fog-oraclecloud-0.1.1 lib/fog/oraclecloud/models/compute/security_rule.rb