Sha256: 351b524a4388fea7ce040eb070fe2300e649b9a26af4580df2855ca56a7361ae

Contents?: true

Size: 833 Bytes

Versions: 7

Compression:

Stored size: 833 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def insert_instance_group(group_name, zone, options = {})
          Fog::Mock.not_implemented
        end
      end

      class Real
        def insert_instance_group(group_name, zone, options = {})
          api_method = @compute.instance_groups.insert
          parameters = {
            'project' => @project,
            'zone' => zone
          }

          id = Fog::Mock.random_numbers(19).to_s

          body = {
            'name' => group_name,
            'network' => "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/global/networks/default",
          }
          body['description'] = options['description'] if options['description']

          request(api_method, parameters, body)
        end
      end
    end
  end
end

Version data entries

7 entries across 5 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/insert_instance_group.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/insert_instance_group.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/insert_instance_group.rb
fog-google-0.1.3 lib/fog/google/requests/compute/insert_instance_group.rb
fog-google-0.1.2 lib/fog/google/requests/compute/insert_instance_group.rb
fog-google-0.1.1 lib/fog/google/requests/compute/insert_instance_group.rb
fog-google-0.1.0 lib/fog/google/requests/compute/insert_instance_group.rb