Sha256: 8b4dc22dc4109eaa75fcbacc3cac35216addc9657e3c2d85932dc94cf37ccbee

Contents?: true

Size: 695 Bytes

Versions: 21

Compression:

Stored size: 695 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def set_server_machine_type(_instance, _zone, _machine_type)
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        def set_server_machine_type(instance, zone, machine_type)
          request = ::Google::Apis::ComputeV1::InstancesSetMachineTypeRequest.new
          zone = zone.split("/")[-1]
          machine_type = machine_type.split("/")[-1]
          request.machine_type = "zones/#{zone}/machineTypes/#{machine_type}"
          @compute.set_instance_machine_type(@project, zone, instance, request)
        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_server_machine_type.rb
fog-google-1.24.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.23.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.22.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.21.1 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.21.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.20.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.19.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.18.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.17.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.16.1 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.16.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.15.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.14.0 lib/fog/compute/google/requests/set_server_machine_type.rb
gitlab-fog-google-1.14.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.13.0 lib/fog/compute/google/requests/set_server_machine_type.rb
gitlab-fog-google-1.13.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.12.1 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.12.0 lib/fog/compute/google/requests/set_server_machine_type.rb
fog-google-1.11.0 lib/fog/compute/google/requests/set_server_machine_type.rb