Sha256: 04aaee74de6f8538e13d0e1d71f90f78775ae747a98a8ae503f5340d6e4107d3
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
module Fog module Compute class OracleCloud class Real def get_security_list(name) name.sub! "/Compute-#{@identity_domain}/#{@username}/", '' response = request( :expects => 200, :method => 'GET', :path => "/seclist/Compute-#{@identity_domain}/#{@username}/#{name}", :headers => { 'Content-Type' => 'application/oracle-compute-v3+json', 'Accept' => 'application/oracle-compute-v3+json' } ) response end end class Mock def get_security_list(name) response = Excon::Response.new clean_name = name.sub "/Compute-#{@identity_domain}/#{@username}/", '' if instance = self.data[:security_lists][clean_name] response.status = 200 response.body = instance response else raise Fog::Compute::OracleCloud::NotFound.new("Security List #{name} does not exist"); end 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/get_security_list.rb |
fog-oraclecloud-0.1.16 | lib/fog/oraclecloud/requests/compute/get_security_list.rb |