Sha256: a98217517f4a32c91482ac0df66db896634d710ab52ce836b15f2545926a9dd8

Contents?: true

Size: 847 Bytes

Versions: 14

Compression:

Stored size: 847 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def set_server_scheduling(_identity, _zone, _on_host_maintenance, _automatic_restart, _preemptible)
          Fog::Mock.not_implemented
        end
      end

      class Real
        def set_server_scheduling(identity, zone, on_host_maintenance, automatic_restart, preemptible)
          api_method = @compute.instances.set_scheduling
          parameters = {
            "project"  => @project,
            "instance" => identity,
            "zone"     => zone.split("/")[-1]
          }

          body_object = {
            "onHostMaintenance" => on_host_maintenance,
            "automaticRestart"  => automatic_restart,
            "preemptible" => preemptible
          }

          request(api_method, parameters, body_object)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.5.5 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.5.4 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.5.3 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.5.2 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.5.1 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.5.0 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.4.2 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.4.1 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.4.0 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.3.2 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.3.1 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.3.0 lib/fog/compute/google/requests/set_server_scheduling.rb
fog-google-0.2.0 lib/fog/compute/google/requests/set_server_scheduling.rb