Class: Google::Apis::VmmigrationV1alpha1::ComputeScheduling
- Inherits:
-
Object
- Object
- Google::Apis::VmmigrationV1alpha1::ComputeScheduling
- 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.
Instance Attribute Summary collapse
-
#automatic_restart ⇒ Boolean
(also: #automatic_restart?)
Corresponds to the JSON property
automaticRestart. -
#min_node_cpus ⇒ Fixnum
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
-
#node_affinities ⇒ Array<Google::Apis::VmmigrationV1alpha1::SchedulingNodeAffinity>
A set of node affinity and anti-affinity configurations for sole tenant nodes.
-
#on_host_maintenance ⇒ String
How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
-
#restart_type ⇒ String
Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).
Instance Method Summary collapse
-
#initialize(**args) ⇒ ComputeScheduling
constructor
A new instance of ComputeScheduling.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ComputeScheduling
Returns a new instance of ComputeScheduling.
934 935 936 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 934 def initialize(**args) update!(**args) end |
Instance Attribute Details
#automatic_restart ⇒ Boolean Also known as: automatic_restart?
Corresponds to the JSON property automaticRestart
905 906 907 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 905 def automatic_restart @automatic_restart end |
#min_node_cpus ⇒ Fixnum
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
912 913 914 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 912 def min_node_cpus @min_node_cpus end |
#node_affinities ⇒ Array<Google::Apis::VmmigrationV1alpha1::SchedulingNodeAffinity>
A set of node affinity and anti-affinity configurations for sole tenant nodes.
Corresponds to the JSON property nodeAffinities
917 918 919 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 917 def node_affinities @node_affinities end |
#on_host_maintenance ⇒ String
How the instance should behave when the host machine undergoes maintenance
that may temporarily impact instance performance.
Corresponds to the JSON property onHostMaintenance
923 924 925 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 923 def on_host_maintenance @on_host_maintenance end |
#restart_type ⇒ String
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
932 933 934 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 932 def restart_type @restart_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
939 940 941 942 943 944 945 |
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 939 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 |