Sha256: a9cc36e734704c767c49adc1485ebdf9e099ebedf8fb0dd22b681c139ee89cb9

Contents?: true

Size: 843 Bytes

Versions: 10

Compression:

Stored size: 843 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

10 entries across 8 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/set_server_scheduling.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/set_server_scheduling.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/lib/fog/google/requests/compute/set_server_scheduling.rb
fog-google-0.1.3 lib/fog/google/requests/compute/set_server_scheduling.rb
fog-google-0.1.2 lib/fog/google/requests/compute/set_server_scheduling.rb
fog-google-0.1.1 lib/fog/google/requests/compute/set_server_scheduling.rb
fog-google-0.1.0 lib/fog/google/requests/compute/set_server_scheduling.rb
fog-google-0.0.9 lib/fog/google/requests/compute/set_server_scheduling.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/lib/fog/google/requests/compute/set_server_scheduling.rb
fog-google-0.0.7 lib/fog/google/requests/compute/set_server_scheduling.rb