Class: Upkeep::HerbSupport::ManifestDiff::Plan

Inherits:
Data
  • Object
show all
Defined in:
lib/upkeep/herb/manifest_diff.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def action
  @action
end

#diff_identicalObject (readonly)

Returns the value of attribute diff_identical

Returns:

  • (Object)

    the current value of diff_identical



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def diff_identical
  @diff_identical
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def error
  @error
end

#new_manifestObject (readonly)

Returns the value of attribute new_manifest

Returns:

  • (Object)

    the current value of new_manifest



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def new_manifest
  @new_manifest
end

#new_topology_signatureObject (readonly)

Returns the value of attribute new_topology_signature

Returns:

  • (Object)

    the current value of new_topology_signature



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def new_topology_signature
  @new_topology_signature
end

#old_manifestObject (readonly)

Returns the value of attribute old_manifest

Returns:

  • (Object)

    the current value of old_manifest



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def old_manifest
  @old_manifest
end

#old_topology_signatureObject (readonly)

Returns the value of attribute old_topology_signature

Returns:

  • (Object)

    the current value of old_topology_signature



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def old_topology_signature
  @old_topology_signature
end

#operation_typesObject (readonly)

Returns the value of attribute operation_types

Returns:

  • (Object)

    the current value of operation_types



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def operation_types
  @operation_types
end

#operationsObject (readonly)

Returns the value of attribute operations

Returns:

  • (Object)

    the current value of operations



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def operations
  @operations
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def path
  @path
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def reason
  @reason
end

#topology_changedObject (readonly)

Returns the value of attribute topology_changed

Returns:

  • (Object)

    the current value of topology_changed



20
21
22
# File 'lib/upkeep/herb/manifest_diff.rb', line 20

def topology_changed
  @topology_changed
end

Instance Method Details

#gate_passed?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/upkeep/herb/manifest_diff.rb', line 34

def gate_passed?
  error.nil?
end

#to_hObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/upkeep/herb/manifest_diff.rb', line 38

def to_h
  {
    path: path,
    action: action,
    reason: reason,
    topology_changed: topology_changed,
    diff_identical: diff_identical,
    operation_types: operation_types,
    operations: operations,
    old_manifest_fingerprint: old_manifest&.fingerprint,
    new_manifest_fingerprint: new_manifest&.fingerprint,
    stable_topology: old_topology_signature == new_topology_signature,
    gate_passed: gate_passed?,
    error: error
  }.compact
end