Class: Google::Apis::VmmigrationV1alpha1::ComputeScheduling

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/vmmigration_v1alpha1/classes.rb,
lib/google/apis/vmmigration_v1alpha1/representations.rb,
lib/google/apis/vmmigration_v1alpha1/representations.rb

Overview

Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes. Options for instance behavior when the host machine undergoes maintenance that may temporarily impact instance performance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ComputeScheduling



1625
1626
1627
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1625

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#automatic_restartBoolean Also known as: automatic_restart?

Corresponds to the JSON property automaticRestart



1596
1597
1598
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1596

def automatic_restart
  @automatic_restart
end

#min_node_cpusFixnum

The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured. Corresponds to the JSON property minNodeCpus



1603
1604
1605
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1603

def min_node_cpus
  @min_node_cpus
end

#node_affinitiesArray<Google::Apis::VmmigrationV1alpha1::SchedulingNodeAffinity>

A set of node affinity and anti-affinity configurations for sole tenant nodes. Corresponds to the JSON property nodeAffinities



1608
1609
1610
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1608

def node_affinities
  @node_affinities
end

#on_host_maintenanceString

How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance. Corresponds to the JSON property onHostMaintenance



1614
1615
1616
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1614

def on_host_maintenance
  @on_host_maintenance
end

#restart_typeString

Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical to automaticRestart field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart. Corresponds to the JSON property restartType



1623
1624
1625
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1623

def restart_type
  @restart_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1630
1631
1632
1633
1634
1635
1636
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1630

def update!(**args)
  @automatic_restart = args[:automatic_restart] if args.key?(:automatic_restart)
  @min_node_cpus = args[:min_node_cpus] if args.key?(:min_node_cpus)
  @node_affinities = args[:node_affinities] if args.key?(:node_affinities)
  @on_host_maintenance = args[:on_host_maintenance] if args.key?(:on_host_maintenance)
  @restart_type = args[:restart_type] if args.key?(:restart_type)
end