Access to temporarily offline cause is impossible

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • 2.340

      Issue
      When creating plugins that handle node availability it is necessary to access a node's temporaryOfflineCause so that it can be examined (e.g. to find out which user set it etc.).
      This can be easily done if the node is still connected (== still has a channel) but if another OfflineCause is set (e.g. because of a connection termination) it is impossible to retrieve the temporaryOfflineCause set previously using a Computer's getOfflineCause method which is the only method available to retrieve OfflineCauses.

      Solution
      Currently temporaryOfflineCause is a private attribute of the Node class and has been since it was added 11 years ago.

      The attribute could either be made public or a getter could be added.
      Since the attribute should most likely not be messed with directly from outside - since setTemporarilyOffline should be used for that - I would propose introducing a simple getter.

            Assignee:
            Unassigned
            Reporter:
            Tim Ploss
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: