Sha256: 77c53b166707d173eb1121397d6cdfb001080ef17f9b06e57542d17b2c17804b

Contents?: true

Size: 1.9 KB

Versions: 45

Compression:

Stored size: 1.9 KB

Contents

module Fog
  module Network
    class OpenStack
      class Real
        # Get details about a security group rule
        #
        # ==== Parameters
        # * 'security_group_rule_id'<~String> - UUID of the security group rule
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #   * 'security_group_rule'<~Hash>:
        #     * '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 get_security_group_rule(security_group_rule_id)
          request(
            :expects  => 200,
            :method   => "GET",
            :path     => "security-group-rules/#{security_group_rule_id}"
          )
        end
      end

      class Mock
        def get_security_group_rule(security_group_rule_id)
          response = Excon::Response.new
          if sec_group_rule = self.data[:security_group_rules][security_group_rule_id]
            response.status = 200
            response.body   = {"security_group_rule" => sec_group_rule}
            response
          else
            raise Fog::Network::OpenStack::NotFound
          end
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 6 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.30.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.29.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.28.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.27.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.26.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.25.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
nsidc-fog-1.24.1 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.24.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.11 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.10 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.9 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.8 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.7 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.6 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.23.0 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.4 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.3 lib/fog/openstack/requests/network/get_security_group_rule.rb
ns-fog-1.22.2 lib/fog/openstack/requests/network/get_security_group_rule.rb
fog-1.22.1 lib/fog/openstack/requests/network/get_security_group_rule.rb