Sha256: 5f0c474609e06e91f0c9d145f9d92b5d6739145504999062b3d7dd9d4178675c

Contents?: true

Size: 1.04 KB

Versions: 21

Compression:

Stored size: 1.04 KB

Contents

module Fog
  module Compute
    class Google
      class Mock
        def set_instance_template(_instance_group_manager, _instance_template)
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        def set_instance_template(instance_group_manager, instance_template)
          request = ::Google::Apis::ComputeV1::InstanceGroupManagersSetInstanceTemplateRequest.new(
            :instance_template => instance_template.class == String ? instance_template : instance_template.self_link
          )
          if instance_group_manager.zone
            zone = instance_group_manager.zone.split("/")[-1]
            @compute.set_instance_group_manager_instance_template(@project, zone, instance_group_manager.name, request)
          else
            region = instance_group_manager.region.split("/")[-1]
            @compute.set_region_instance_group_manager_instance_template(@project, region, instance_group_manager.name, request)
          end
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
fog-google-1.24.1 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.24.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.23.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.22.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.21.1 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.21.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.20.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.19.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.18.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.17.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.16.1 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.16.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.15.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.14.0 lib/fog/compute/google/requests/set_instance_template.rb
gitlab-fog-google-1.14.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.13.0 lib/fog/compute/google/requests/set_instance_template.rb
gitlab-fog-google-1.13.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.12.1 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.12.0 lib/fog/compute/google/requests/set_instance_template.rb
fog-google-1.11.0 lib/fog/compute/google/requests/set_instance_template.rb