Sha256: 6892ea04257c6a287d0b9e515ad8706c904096948e674a9a0d487436fe7094e1

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

require 'fog/core/model'

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

	      attribute :protocol
	      attribute :name
	      attribute :uri
	      attribute :icmptype
	      attribute :proxyuri
	      attribute :dport
	      attribute :icmpcode

	      # Only used in create
	      attribute :description

 				def save
          #identity ? update : create
          create
        end

				def create
        	requires :name, :protocol
          
          data = service.create_security_application(name, protocol,
                                            :dport => dport,
                                            :icmptype => icmptype,
                                            :icmpcode => icmpcode,
                                            :description => description)
        end

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