description: >
    Simple definition of a Software or Firmware version. Note that this
    interface may be implemented by D-Bus objects that do not necessarily
    contain a software level. For example an OpenBMC log may implement this
    interface to store the software level of the BMC or Host for debug purposes.
    If looking for real software versions associated with a device then ensure
    this interface is under the /xyz/openbmc_project/software object path.
properties:
    - name: Version
      type: string
      description: >
          The version identifier.
    - name: Purpose
      type: enum[self.VersionPurpose]
      description: >
          The purpose of the version.  As in, what can it be used for or applied
          to?

          This property is deprecated in favor of Compatible strings and
          inventory associations.  The enumeration should not be expanded
          further.
enumerations:
    - name: VersionPurpose
      description: >
          An enumeration of possible purposes of the version.
      values:
          - name: Unknown
            description: >
                The version is of unknown purpose.
          - name: Other
            description: >
                The version is of some other purpose.
          - name: System
            description: >
                The version is an aggregate for the system as a whole.
          - name: BMC
            description: >
                The version is a version for the BMC.
          - name: Host
            description: >
                The version is a version for a managed host.
          - name: PSU
            description: >
                The version is a version for a PSU.

associations:
    - name: running
      description: >
          This indicates the current running version for the associated
          inventory item.
      reverse_name: ran_on
      required_endpoint_interfaces:
          - xyz.openbmc_project.Inventory.Item
    - name: activating
      description: >
          This indicates the current activated version for the associated
          inventory item. There can be more than one active version associated
          with the same inventory item. In such a case, RedundancyPriority
          interface will help to decide the correct priority order for the
          active version transition to running.
      reverse_name: activated_on
      required_endpoint_interfaces:
          - xyz.openbmc_project.Inventory.Item

paths:
    - namespace: /xyz/openbmc_project/software
