Sha256: 66585f68446fbba82f5b3aaab207c1282102f38708852031f701c707c1702d2c

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

module Fog
  module Compute
    class Google
      class Mock
        def add_instance_group_instances(_group, _zone, _instances)
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        def remove_instance_group_instances(group_name, zone, instances)
          instances.map! do |instance|
            if instance.start_with?("https:")
              ::Google::Apis::ComputeV1::InstanceReference.new(instance: instance)
            else
              ::Google::Apis::ComputeV1::InstanceReference.new(
                instance: "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones/#{zone}/instances/#{instance}\n"
              )
            end
          end

          request = ::Google::Apis::ComputeV1::InstanceGroupsRemoveInstancesRequest.new(
            instances: instances
          )
          @compute.remove_instance_group_instances(
            @project,
            zone,
            group_name,
            request
          )
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-1.24.1 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.24.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.23.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.22.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.21.1 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.21.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.20.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.19.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.18.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.17.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.16.1 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.16.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.15.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb
fog-google-1.14.0 lib/fog/compute/google/requests/remove_instance_group_instances.rb