1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
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
|