Sha256: ecb2a6cea7e928eb428d1b063de455294027488ec0dfb4858c8f366d8a3974f9

Contents?: true

Size: 850 Bytes

Versions: 7

Compression:

Stored size: 850 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def remove_instance_group_instance(group_name, zone, instances)
          Fog::Mock.not_implemented
        end
      end

      class Real
        def remove_instance_group_instance(group_name, zone, instance_name)
          api_method = @compute.instance_groups.remove_instances

          parameters = {
            'project' => @project,
            'instanceGroup' => group_name,
            'zone' => zone
          }

          body_object = {
            "instances" => [
              {
                "instance" => "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones/#{zone}/instances/#{instance_name}\n"
              }
            ]
          }

          request(api_method, parameters, body_object)
        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/remove_instance_group_instance.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/remove_instance_group_instance.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/remove_instance_group_instance.rb
fog-google-0.1.3 lib/fog/google/requests/compute/remove_instance_group_instance.rb
fog-google-0.1.2 lib/fog/google/requests/compute/remove_instance_group_instance.rb
fog-google-0.1.1 lib/fog/google/requests/compute/remove_instance_group_instance.rb
fog-google-0.1.0 lib/fog/google/requests/compute/remove_instance_group_instance.rb