Sha256: e4774775f63b297d311451cf61943f8ed647f973cea2af2c4169fef0d1642737

Contents?: true

Size: 682 Bytes

Versions: 7

Compression:

Stored size: 682 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def insert_global_address(_address_name, _options = {})
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        INSERTABLE_ADDRESS_FIELDS = %i{description ip_version}.freeze

        def insert_global_address(address_name, options = {})
          opts = options.select { |k, _| INSERTABLE_ADDRESS_FIELDS.include? k }
                        .merge(:name => address_name)
          @compute.insert_global_address(
            @project, ::Google::Apis::ComputeV1::Address.new(opts)
          )
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
gitlab-fog-google-1.14.0 lib/fog/compute/google/requests/insert_global_address.rb
fog-google-1.13.0 lib/fog/compute/google/requests/insert_global_address.rb
gitlab-fog-google-1.13.0 lib/fog/compute/google/requests/insert_global_address.rb
fog-google-1.12.1 lib/fog/compute/google/requests/insert_global_address.rb
fog-google-1.12.0 lib/fog/compute/google/requests/insert_global_address.rb
fog-google-1.11.0 lib/fog/compute/google/requests/insert_global_address.rb
fog-google-1.10.0 lib/fog/compute/google/requests/insert_global_address.rb