Sha256: a892788dfb6e4bf4f9b21e85c0a488f061000e9593808e045a2ff11897119068

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

module Fog
  module Compute
    class OracleCloud
      class Real
      	def list_security_applications(public_list=false)
          path = "/secapplication"
          if public_list then
            path += "/oracle/public/"
          else 
            path += "/Compute-#{@identity_domain}/#{@username}/"
          end
          response = request(
            :expects  => 200,
            :method   => 'GET',
            :path     => path
          )
          response
        end
      end
      class Mock
        def list_security_applications(public_list=false)
          response = Excon::Response.new
          if public_list then check = "/oracle/public" 
          else check = "/Compute-" end
          instances = self.data[:security_applications].values.select { |app| app['name'].include? check}
          response.body = {
            'result' => instances
          }
          response
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-oraclecloud-0.1.17 lib/fog/oraclecloud/requests/compute/list_security_applications.rb
fog-oraclecloud-0.1.16 lib/fog/oraclecloud/requests/compute/list_security_applications.rb