Sha256: 874e800102bb6644449cdbf9129d007127485b57143791e1d8c79c59a275fd64

Contents?: true

Size: 788 Bytes

Versions: 14

Compression:

Stored size: 788 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def insert_forwarding_rule(_rule_name, _region, _opts = {})
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        ##
        # Create a forwarding rule.
        #
        # @see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert
        def insert_forwarding_rule(rule_name, region, opts = {})
          region = region.split("/")[-1] if region.start_with? "http"
          @compute.insert_forwarding_rule(
            @project, region,
            ::Google::Apis::ComputeV1::ForwardingRule.new(
              **opts.merge(:name => rule_name)
            )
          )
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-1.24.1 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.24.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.23.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.22.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.21.1 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.21.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.20.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.19.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.18.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.17.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.16.1 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.16.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.15.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb
fog-google-1.14.0 lib/fog/compute/google/requests/insert_forwarding_rule.rb