示例#1
0
class StatusSerializer(serializers.Serializer):
    """
    Serializer for the status information of the app
    """

    versions = VersionSerializer(
        help_text=_("Version information of Pulp components"), many=True)

    online_workers = WorkerSerializer(help_text=_(
        "List of online workers known to the application. An online worker is actively "
        "heartbeating and can respond to new work"),
                                      many=True)

    missing_workers = WorkerSerializer(help_text=_(
        "List of missing workers known to the application. A missing worker is a "
        "worker that was online, but has now stopped heartbeating and has potentially "
        "died"),
                                       many=True)

    online_content_apps = ContentAppStatusSerializer(help_text=_(
        "List of online content apps known to the application. An online worker is "
        "actively heartbeating"),
                                                     many=True)

    database_connection = DatabaseConnectionSerializer(
        help_text=_("Database connection information"))

    redis_connection = RedisConnectionSerializer(
        help_text=_("Redis connection information"))
示例#2
0
class StatusSerializer(serializers.Serializer):
    """
    Serializer for the status information of the app
    """

    versions = VersionSerializer(
        help_text=_("Version information of Pulp components"), many=True)

    online_workers = WorkerSerializer(
        help_text=_(
            "List of online workers known to the application. An online worker is actively "
            "heartbeating and can respond to new work"),
        many=True,
    )

    online_content_apps = ContentAppStatusSerializer(
        help_text=_(
            "List of online content apps known to the application. An online content app "
            "is actively heartbeating and can serve data to clients"),
        many=True,
    )

    database_connection = DatabaseConnectionSerializer(
        help_text=_("Database connection information"))

    redis_connection = RedisConnectionSerializer(
        help_text=_("Redis connection information"))

    storage = StorageSerializer(required=False,
                                help_text=_("Storage information"))