Class: ArgoWorkflows::IoArgoprojWorkflowV1alpha1NodeStatus
- Inherits:
-
Object
- Object
- ArgoWorkflows::IoArgoprojWorkflowV1alpha1NodeStatus
- Defined in:
- lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb
Overview
NodeStatus contains status information about an individual node in the workflow
Instance Attribute Summary collapse
-
#boundary_id ⇒ Object
BoundaryID indicates the node ID of the associated template root node in which this node belongs to.
-
#children ⇒ Object
Children is a list of child node IDs.
-
#daemoned ⇒ Object
Daemoned tracks whether or not this node was daemoned and need to be terminated.
-
#display_name ⇒ Object
DisplayName is a human readable representation of the node.
-
#estimated_duration ⇒ Object
EstimatedDuration in seconds.
-
#finished_at ⇒ Object
Time at which this node completed.
-
#host_node_name ⇒ Object
HostNodeName name of the Kubernetes node on which the Pod is running, if applicable.
-
#id ⇒ Object
ID is a unique identifier of a node within the worklow It is implemented as a hash of the node name, which makes the ID deterministic.
-
#inputs ⇒ Object
Inputs captures input parameter values and artifact locations supplied to this template invocation.
-
#memoization_status ⇒ Object
MemoizationStatus holds information about cached nodes.
-
#message ⇒ Object
A human readable message indicating details about why the node is in this condition.
-
#name ⇒ Object
Name is unique name in the node tree used to generate the node ID.
-
#node_flag ⇒ Object
NodeFlag tracks some history of node.
-
#outbound_nodes ⇒ Object
OutboundNodes tracks the node IDs which are considered "outbound" nodes to a template invocation.
-
#outputs ⇒ Object
Outputs captures output parameter values and artifact locations produced by this template invocation.
-
#phase ⇒ Object
Phase a simple, high-level summary of where the node is in its lifecycle.
-
#pod_ip ⇒ Object
PodIP captures the IP of the pod for daemoned steps.
-
#progress ⇒ Object
Progress to completion.
-
#resources_duration ⇒ Object
ResourcesDuration is indicative, but not accurate, resource duration.
-
#started_at ⇒ Object
Time at which this node started.
-
#synchronization_status ⇒ Object
SynchronizationStatus is the synchronization status of the node.
-
#template_name ⇒ Object
TemplateName is the template name which this node corresponds to.
-
#template_ref ⇒ Object
TemplateRef is the reference to the template resource which this node corresponds to.
-
#template_scope ⇒ Object
TemplateScope is the template scope in which the template of this node was retrieved.
-
#type ⇒ Object
Type indicates type of node.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IoArgoprojWorkflowV1alpha1NodeStatus
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ IoArgoprojWorkflowV1alpha1NodeStatus
Initializes the object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 157 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'boundaryID') self.boundary_id = attributes[:'boundaryID'] end if attributes.has_key?(:'children') if (value = attributes[:'children']).is_a?(Array) self.children = value end end if attributes.has_key?(:'daemoned') self.daemoned = attributes[:'daemoned'] end if attributes.has_key?(:'displayName') self.display_name = attributes[:'displayName'] end if attributes.has_key?(:'estimatedDuration') self.estimated_duration = attributes[:'estimatedDuration'] end if attributes.has_key?(:'finishedAt') self.finished_at = attributes[:'finishedAt'] end if attributes.has_key?(:'hostNodeName') self.host_node_name = attributes[:'hostNodeName'] end if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'inputs') self.inputs = attributes[:'inputs'] end if attributes.has_key?(:'memoizationStatus') self.memoization_status = attributes[:'memoizationStatus'] end if attributes.has_key?(:'message') self. = attributes[:'message'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'nodeFlag') self.node_flag = attributes[:'nodeFlag'] end if attributes.has_key?(:'outboundNodes') if (value = attributes[:'outboundNodes']).is_a?(Array) self.outbound_nodes = value end end if attributes.has_key?(:'outputs') self.outputs = attributes[:'outputs'] end if attributes.has_key?(:'phase') self.phase = attributes[:'phase'] end if attributes.has_key?(:'podIP') self.pod_ip = attributes[:'podIP'] end if attributes.has_key?(:'progress') self.progress = attributes[:'progress'] end if attributes.has_key?(:'resourcesDuration') if (value = attributes[:'resourcesDuration']).is_a?(Hash) self.resources_duration = value end end if attributes.has_key?(:'startedAt') self.started_at = attributes[:'startedAt'] end if attributes.has_key?(:'synchronizationStatus') self.synchronization_status = attributes[:'synchronizationStatus'] end if attributes.has_key?(:'templateName') self.template_name = attributes[:'templateName'] end if attributes.has_key?(:'templateRef') self.template_ref = attributes[:'templateRef'] end if attributes.has_key?(:'templateScope') self.template_scope = attributes[:'templateScope'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end end |
Instance Attribute Details
#boundary_id ⇒ Object
BoundaryID indicates the node ID of the associated template root node in which this node belongs to
19 20 21 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 19 def boundary_id @boundary_id end |
#children ⇒ Object
Children is a list of child node IDs
22 23 24 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 22 def children @children end |
#daemoned ⇒ Object
Daemoned tracks whether or not this node was daemoned and need to be terminated
25 26 27 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 25 def daemoned @daemoned end |
#display_name ⇒ Object
DisplayName is a human readable representation of the node. Unique within a template boundary
28 29 30 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 28 def display_name @display_name end |
#estimated_duration ⇒ Object
EstimatedDuration in seconds.
31 32 33 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 31 def estimated_duration @estimated_duration end |
#finished_at ⇒ Object
Time at which this node completed
34 35 36 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 34 def finished_at @finished_at end |
#host_node_name ⇒ Object
HostNodeName name of the Kubernetes node on which the Pod is running, if applicable
37 38 39 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 37 def host_node_name @host_node_name end |
#id ⇒ Object
ID is a unique identifier of a node within the worklow It is implemented as a hash of the node name, which makes the ID deterministic
40 41 42 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 40 def id @id end |
#inputs ⇒ Object
Inputs captures input parameter values and artifact locations supplied to this template invocation
43 44 45 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 43 def inputs @inputs end |
#memoization_status ⇒ Object
MemoizationStatus holds information about cached nodes
46 47 48 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 46 def memoization_status @memoization_status end |
#message ⇒ Object
A human readable message indicating details about why the node is in this condition.
49 50 51 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 49 def @message end |
#name ⇒ Object
Name is unique name in the node tree used to generate the node ID
52 53 54 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 52 def name @name end |
#node_flag ⇒ Object
NodeFlag tracks some history of node. e.g.) hooked, retried, etc.
55 56 57 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 55 def node_flag @node_flag end |
#outbound_nodes ⇒ Object
OutboundNodes tracks the node IDs which are considered "outbound" nodes to a template invocation. For every invocation of a template, there are nodes which we considered as "outbound". Essentially, these are last nodes in the execution sequence to run, before the template is considered completed. These nodes are then connected as parents to a following step. In the case of single pod steps (i.e. container, script, resource templates), this list will be nil since the pod itself is already considered the "outbound" node. In the case of DAGs, outbound nodes are the "target" tasks (tasks with no children). In the case of steps, outbound nodes are all the containers involved in the last step group. NOTE: since templates are composable, the list of outbound nodes are carried upwards when a DAG/steps template invokes another DAG/steps template. In other words, the outbound nodes of a template, will be a superset of the outbound nodes of its last children.
58 59 60 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 58 def outbound_nodes @outbound_nodes end |
#outputs ⇒ Object
Outputs captures output parameter values and artifact locations produced by this template invocation
61 62 63 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 61 def outputs @outputs end |
#phase ⇒ Object
Phase a simple, high-level summary of where the node is in its lifecycle. Can be used as a state machine. Will be one of these values "Pending", "Running" before the node is completed, or "Succeeded", "Skipped", "Failed", "Error", or "Omitted" as a final state.
64 65 66 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 64 def phase @phase end |
#pod_ip ⇒ Object
PodIP captures the IP of the pod for daemoned steps
67 68 69 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 67 def pod_ip @pod_ip end |
#progress ⇒ Object
Progress to completion
70 71 72 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 70 def progress @progress end |
#resources_duration ⇒ Object
ResourcesDuration is indicative, but not accurate, resource duration. This is populated when the nodes completes.
73 74 75 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 73 def resources_duration @resources_duration end |
#started_at ⇒ Object
Time at which this node started
76 77 78 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 76 def started_at @started_at end |
#synchronization_status ⇒ Object
SynchronizationStatus is the synchronization status of the node
79 80 81 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 79 def synchronization_status @synchronization_status end |
#template_name ⇒ Object
TemplateName is the template name which this node corresponds to. Not applicable to virtual nodes (e.g. Retry, StepGroup)
82 83 84 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 82 def template_name @template_name end |
#template_ref ⇒ Object
TemplateRef is the reference to the template resource which this node corresponds to. Not applicable to virtual nodes (e.g. Retry, StepGroup)
85 86 87 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 85 def template_ref @template_ref end |
#template_scope ⇒ Object
TemplateScope is the template scope in which the template of this node was retrieved.
88 89 90 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 88 def template_scope @template_scope end |
#type ⇒ Object
Type indicates type of node
91 92 93 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 91 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 94 def self.attribute_map { :'boundary_id' => :'boundaryID', :'children' => :'children', :'daemoned' => :'daemoned', :'display_name' => :'displayName', :'estimated_duration' => :'estimatedDuration', :'finished_at' => :'finishedAt', :'host_node_name' => :'hostNodeName', :'id' => :'id', :'inputs' => :'inputs', :'memoization_status' => :'memoizationStatus', :'message' => :'message', :'name' => :'name', :'node_flag' => :'nodeFlag', :'outbound_nodes' => :'outboundNodes', :'outputs' => :'outputs', :'phase' => :'phase', :'pod_ip' => :'podIP', :'progress' => :'progress', :'resources_duration' => :'resourcesDuration', :'started_at' => :'startedAt', :'synchronization_status' => :'synchronizationStatus', :'template_name' => :'templateName', :'template_ref' => :'templateRef', :'template_scope' => :'templateScope', :'type' => :'type' } end |
.swagger_types ⇒ Object
Attribute type mapping.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 125 def self.swagger_types { :'boundary_id' => :'String', :'children' => :'Array<String>', :'daemoned' => :'BOOLEAN', :'display_name' => :'String', :'estimated_duration' => :'Integer', :'finished_at' => :'IoK8sApimachineryPkgApisMetaV1Time', :'host_node_name' => :'String', :'id' => :'String', :'inputs' => :'IoArgoprojWorkflowV1alpha1Inputs', :'memoization_status' => :'IoArgoprojWorkflowV1alpha1MemoizationStatus', :'message' => :'String', :'name' => :'String', :'node_flag' => :'IoArgoprojWorkflowV1alpha1NodeFlag', :'outbound_nodes' => :'Array<String>', :'outputs' => :'IoArgoprojWorkflowV1alpha1Outputs', :'phase' => :'String', :'pod_ip' => :'String', :'progress' => :'String', :'resources_duration' => :'Hash<String, Integer>', :'started_at' => :'IoK8sApimachineryPkgApisMetaV1Time', :'synchronization_status' => :'IoArgoprojWorkflowV1alpha1NodeSynchronizationStatus', :'template_name' => :'String', :'template_ref' => :'IoArgoprojWorkflowV1alpha1TemplateRef', :'template_scope' => :'String', :'type' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 300 def ==(o) return true if self.equal?(o) self.class == o.class && boundary_id == o.boundary_id && children == o.children && daemoned == o.daemoned && display_name == o.display_name && estimated_duration == o.estimated_duration && finished_at == o.finished_at && host_node_name == o.host_node_name && id == o.id && inputs == o.inputs && memoization_status == o.memoization_status && == o. && name == o.name && node_flag == o.node_flag && outbound_nodes == o.outbound_nodes && outputs == o.outputs && phase == o.phase && pod_ip == o.pod_ip && progress == o.progress && resources_duration == o.resources_duration && started_at == o.started_at && synchronization_status == o.synchronization_status && template_name == o.template_name && template_ref == o.template_ref && template_scope == o.template_scope && type == o.type end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 366 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = ArgoWorkflows.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 432 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 345 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
332 333 334 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 332 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
338 339 340 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 338 def hash [boundary_id, children, daemoned, display_name, estimated_duration, finished_at, host_node_name, id, inputs, memoization_status, , name, node_flag, outbound_nodes, outputs, phase, pod_ip, progress, resources_duration, started_at, synchronization_status, template_name, template_ref, template_scope, type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 272 def list_invalid_properties invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
412 413 414 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 412 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
418 419 420 421 422 423 424 425 426 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 418 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
406 407 408 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 406 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
291 292 293 294 295 296 |
# File 'lib/argo_workflows/models/io_argoproj_workflow_v1alpha1_node_status.rb', line 291 def valid? return false if @id.nil? return false if @name.nil? return false if @type.nil? true end |