Composer — bodhi 4.0.0 documentation

# Composer

## Python objects

Message schema for Bodhi’s composer messages.

Each message is defined as a Python class. For details, see fedora-messaging documentation on messages.

class `bodhi.messages.schemas.composer.` `ComposeV1`

  Bases: `tuple`

  A model for referencing a Compose object.

  `security`

    True if this compose contains security updates.

  `release_id`

    The database id of the release we are composing.

  `request`

    The request of the release we are composing.

  `content_type`

    The content type of the builds in this compose.

  `__annotations__` = {'content_type': <class 'str'>, 'release_id': <class 'int'>, 'request': <class 'str'>, 'security': <class 'bool'>}
  `__getnewargs__`()

    Return self as a plain tuple. Used by copy and pickle.

  static `__new__`(_cls, release_id: int, request: str, content_type: str, security: bool)

    Create new instance of ComposeV1(release_id, request, content_type, security)

  `__repr__`()

    Return a nicely formatted representation string

  `__slots__` = ()
  `content_type`

    Alias for field number 2

  `release_id`

    Alias for field number 0

  `request`

    Alias for field number 1

  static `schema`() → dict

    Return a schema snippet for a Compose object.

  `security`

    Alias for field number 3

class `bodhi.messages.schemas.composer.` `ComposerStartV1`(body=None, headers=None, topic=None, properties=None, severity=None)

  Bases: `bodhi.messages.schemas.base.BodhiMessage`

  Sent when a compose begins.

  `composes`

    Return a list of the composes included in this request.

  `resume`

    Return True if this is a request to resume the composes.

  `summary`

    Return a short, human-readable representation of this message.

    This should provide a short summary of the message, much like the subject line of an email.

  `topic` = 'bodhi.composer.start'

## JSON schemas

### bodhi.composer.start

    {
        "id": "https://bodhi.fedoraproject.org/message-schemas/v1/bodhi.composer.start#",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Schema for message sent when a compose is requested to start",
        "type": "object",
        "properties": {
            "agent": {
                "type": "string",
                "description": "The name of the user who started this compose."
            },
            "composes": {
                "type": "array",
                "description": "A list of composes included in this compose job",
                "items": {
                    "$ref": "#/definitions/compose"
                }
            },
            "resume": {
                "type": "boolean",
                "description": "true if this is a request to resume the given composes"
            }
        },
        "required": [
            "agent",
            "composes",
            "resume"
        ],
        "definitions": {
            "compose": {
                "type": "object",
                "description": "A compose being requested",
                "properties": {
                    "content_type": {
                        "type": "string",
                        "description": "The content type of this compose"
                    },
                    "release_id": {
                        "type": "integer",
                        "description": "The database ID for the release being requested"
                    },
                    "request": {
                        "type": "string",
                        "description": "The request being requested"
                    },
                    "security": {
                        "type": "boolean",
                        "description": "true if this compose contains security updates"
                    }
                },
                "required": [
                    "content_type",
                    "release_id",
                    "request",
                    "security"
                ]
            }
        }
    }