Record Class RollbackReport

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.plan.RollbackReport
Record Components:
removed - resources deleted and confirmed gone, in deletion order
orphans - resources that still exist or whose deletion is unconfirmed, each with its uuid and reason

public record RollbackReport(List<RemovedResource> removed, List<OrphanedResource> orphans) extends Record
What a rollback removed and what it had to leave behind.

Connections are deleted first and each delete is polled to DEPROVISIONED (or HTTP 404) within a bounded timeout; a Cloud Router is deleted only after every connection attached to it is confirmed gone. A connection whose delete fails or is not confirmed in time is an orphan, and so is the router it attaches to (deleting it would fail or strand the connection), and so are its routing protocols.

  • Constructor Details

  • Method Details

    • empty

      public static RollbackReport empty()
      An empty report: nothing to roll back.
      Returns:
      a report with no entries
    • isClean

      public boolean isClean()
      Whether everything was removed.
      Returns:
      true when there is no orphan
    • toMarkdown

      public String toMarkdown()
      A readable report listing every removed resource and every orphan with its uuid.
      Returns:
      Markdown
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • removed

      public List<RemovedResource> removed()
      Returns the value of the removed record component.
      Returns:
      the value of the removed record component
    • orphans

      public List<OrphanedResource> orphans()
      Returns the value of the orphans record component.
      Returns:
      the value of the orphans record component