Sha256: 7d52af4ce696ad7aeb39b8a2c3b64488309651fd2333cd47bafdeee79ccda744

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

module Fog
  module Compute
    class Google

      class Mock

        def insert_network(network_name, ip_range, options = {})
          Fog::Mock.not_implemented
        end

      end

      class Real

        def insert_network(network_name, ip_range, options = {})
          api_method = @compute.networks.insert
          parameters = {
            'project' => @project,
          }
          body_object = {
            'name' => network_name,
            'IPv4Range' => ip_range
          }

          body_object['description'] = options[:description] if options[:description]
          body_object['gatewayIPv4'] = options[:gateway_ipv4] if options[:gateway_ipv4]

          result = self.build_result(api_method, parameters, body_object)
          response = self.build_response(result)
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-1.22.0 lib/fog/google/requests/compute/insert_network.rb