Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-4546

Sanitize Update Control Maps when calling DBus endpoint

    XMLWordPrintable

    Details

      Description

      Acceptance criteria:

      • In the SetUpdateControlMap from MEN-4535, implement parameter checking and return error if input is incorrect.
      • The format is:
        {
          "priority": 0, # default: 0
          "states": {
            "ArtifactInstall_Enter/ArtifactReboot_Enter/ArtifactCommit_Enter": {
              # default: continue
              "action": "continue/force_continue/pause/fail",
        
              # default depends on action: continue=continue, force_continue=force_continue, pause/fail=fail
              "on_map_expire": "continue/force_continue/fail",
        
              # default: same as action
              "on_action_executed": "continue/force_continue/pause/fail"
            }
          },
          "id": "01234567-89ab-cdef-0123-456789abcdef" # no default, required
        }
        

        Non-required fields are allowed to be missing, but other than that, the structure and values must conform to the above example.

      • If all keys of all states resolve to their default values, the map should be removed from the pool.
      • Unit tests
      • Feature branch: feature-dbus_update_control

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lluis LluĂ­s Campos
              Reporter:
              a10040 Kristian Amlie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: