Class: Google::Apis::ComputeV1::SchedulingNodeAffinity

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

Overview

Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SchedulingNodeAffinity

Returns a new instance of SchedulingNodeAffinity.



36543
36544
36545
# File 'lib/google/apis/compute_v1/classes.rb', line 36543

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

Instance Attribute Details

#keyString

Corresponds to the label key of Node resource. Corresponds to the JSON property key

Returns:

  • (String)


36530
36531
36532
# File 'lib/google/apis/compute_v1/classes.rb', line 36530

def key
  @key
end

#operatorString

Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity. Corresponds to the JSON property operator

Returns:

  • (String)


36536
36537
36538
# File 'lib/google/apis/compute_v1/classes.rb', line 36536

def operator
  @operator
end

#valuesArray<String>

Corresponds to the label values of Node resource. Corresponds to the JSON property values

Returns:

  • (Array<String>)


36541
36542
36543
# File 'lib/google/apis/compute_v1/classes.rb', line 36541

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



36548
36549
36550
36551
36552
# File 'lib/google/apis/compute_v1/classes.rb', line 36548

def update!(**args)
  @key = args[:key] if args.key?(:key)
  @operator = args[:operator] if args.key?(:operator)
  @values = args[:values] if args.key?(:values)
end