Sha256: da29e9fd2466c19a36c3b79125a767efb39cc2558e41665dc369ca2953f95af6

Contents?: true

Size: 842 Bytes

Versions: 7

Compression:

Stored size: 842 Bytes

Contents

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

      class Real
        def add_instance_group_instance(group_name, zone, instance_name)
          api_method = @compute.instance_groups.add_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/add_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/add_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/add_instance_group_instance.rb
fog-google-0.1.3 lib/fog/google/requests/compute/add_instance_group_instance.rb
fog-google-0.1.2 lib/fog/google/requests/compute/add_instance_group_instance.rb
fog-google-0.1.1 lib/fog/google/requests/compute/add_instance_group_instance.rb
fog-google-0.1.0 lib/fog/google/requests/compute/add_instance_group_instance.rb