Sha256: f3dc67610ee2cac37910744c118ab3337cac1c1e7a8058213269bce0bf68ad0f
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
module Fog module Compute class OneAndOne class Real ## # Returns information about a firewall policy # URL: [https://cloudpanel-api.1and1.com/documentation/1and1/v1/en/documentation.html#firewall_policies__firewall_id__get] ## def get_firewall(firewall_id) params = { 'method' => :get, 'endpoint' => "/firewall_policies/#{firewall_id}" } request(params) end end # Real class Mock def get_firewall(firewall_id) # Search for firewall to return if firewall = self.data[:firewalls].find { |hash| hash['id'] == firewall_id } else raise Fog::Errors::NotFound.new('The requested resource could not be found.') end # Return Response Object to User response = Excon::Response.new response.status = 202 response.body = firewall response end end # Mock end # OneAndOne end # Compute end # Fog
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-oneandone-1.2 | lib/oneandone/requests/compute/get_firewall.rb |
fog-oneandone-1.0 | lib/oneandone/requests/compute/get_firewall.rb |