Sha256: 4838dec801b8657cfaf70f28a05ef6f48103ca4815ff203d8dbdd65f6f60572c

Contents?: true

Size: 680 Bytes

Versions: 4

Compression:

Stored size: 680 Bytes

Contents

module Fog
  module Compute
    class Cloudstack

      class Real
        # Creates a firewall rule for a given ip address
        #
        # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createFirewallRule.html]
        def create_firewall_rule(*args)
          options = {}
          if args[0].is_a? Hash
            options = args[0]
            options.merge!('command' => 'createFirewallRule') 
          else
            options.merge!('command' => 'createFirewallRule', 
            'ipaddressid' => args[0], 
            'protocol' => args[1])
          end
          request(options)
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fog-1.26.0 lib/fog/cloudstack/requests/compute/create_firewall_rule.rb
fog-1.25.0 lib/fog/cloudstack/requests/compute/create_firewall_rule.rb
nsidc-fog-1.24.1 lib/fog/cloudstack/requests/compute/create_firewall_rule.rb
fog-1.24.0 lib/fog/cloudstack/requests/compute/create_firewall_rule.rb