Class: Google::Apis::BatchV1::PlacementPolicy
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::PlacementPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy.
Instance Attribute Summary collapse
-
#collocation ⇒ String
UNSPECIFIED vs.
-
#max_distance ⇒ Fixnum
When specified, causes the job to fail if more than max_distance logical switches are required between VMs.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PlacementPolicy
constructor
A new instance of PlacementPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PlacementPolicy
Returns a new instance of PlacementPolicy.
1479 1480 1481 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1479 def initialize(**args) update!(**args) end |
Instance Attribute Details
#collocation ⇒ String
UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you want
VMs to be located close to each other for low network latency between the VMs.
No placement policy will be generated when collocation is UNSPECIFIED.
Corresponds to the JSON property collocation
1468 1469 1470 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1468 def collocation @collocation end |
#max_distance ⇒ Fixnum
When specified, causes the job to fail if more than max_distance logical
switches are required between VMs. Batch uses the most compact possible
placement of VMs even when max_distance is not specified. An explicit
max_distance makes that level of compactness a strict requirement. Not yet
implemented
Corresponds to the JSON property maxDistance
1477 1478 1479 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1477 def max_distance @max_distance end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1484 1485 1486 1487 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1484 def update!(**args) @collocation = args[:collocation] if args.key?(:collocation) @max_distance = args[:max_distance] if args.key?(:max_distance) end |