Sha256: 68225255712b1d3200391094af8105d725056ac7086743d971cc5a1a95bb112a

Contents?: true

Size: 1.81 KB

Versions: 40

Compression:

Stored size: 1.81 KB

Contents

module Fog
  module Network
    class OpenStack
      class Real
        # List all security group rules
        #
        # ==== Parameters
        # * options<~Hash>:
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #   * 'security_group_rules'<~Array>:
        #     * 'id'<~String> - UUID of the security group rule
        #     * 'direction'<~String> - Direction of traffic, must be in ['ingress', 'egress']
        #     * 'port_range_min'<~Integer> - Start port for rule i.e. 22 (or -1 for ICMP wildcard)
        #     * 'port_range_max'<~Integer> - End port for rule i.e. 22 (or -1 for ICMP wildcard)
        #     * 'protocol'<~String> - IP protocol for rule, must be in ['tcp', 'udp', 'icmp']
        #     * 'ethertype'<~String> - Type of ethernet support, must be in ['IPv4', 'IPv6']
        #     * 'security_group_id'<~String> - UUID of the parent security group
        #     * 'remote_group_id'<~String> - UUID of the remote security group
        #     * 'remote_ip_prefix'<~String> - IP cidr range address i.e. '0.0.0.0/0'
        #     * 'tenant_id'<~String> - Tenant id that owns the security group rule
        def list_security_group_rules(options = {})
          request(
            :expects  => 200,
            :method   => 'GET',
            :path     => 'security-group-rules',
            :query    => options
          )
        end
      end

      class Mock
        def list_security_group_rules(options = {})
          response = Excon::Response.new

          sec_group_rules = []
          sec_group_rules = self.data[:security_group_rules].values unless self.data[:security_group_rules].nil?

          response.status = 200
          response.body = { 'security_group_rules' => sec_group_rules }
          response
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 5 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.37.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.36.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.35.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-2.0.0.pre.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.34.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.33.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.32.0 lib/fog/openstack/requests/network/list_security_group_rules.rb
fog-1.31.0 lib/fog/openstack/requests/network/list_security_group_rules.rb