You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
800 B

from leapp.models import fields, Model
from leapp.topics import SystemFactsTopic
class RootSubdirectory(Model):
"""
Representation of a single root subdirectory. Can be expanded as needed.
"""
topic = SystemFactsTopic
name = fields.String()
target = fields.Nullable(fields.String()) # if it's a link
class InvalidRootSubdirectory(Model):
"""
Representation of a single root subdirectory with non-utf name that is stored as a Blob.
"""
topic = SystemFactsTopic
name = fields.Blob()
target = fields.Nullable(fields.Blob())
class RootDirectory(Model):
topic = SystemFactsTopic
items = fields.List(fields.Model(RootSubdirectory)) # should not be empty
invalid_items = fields.Nullable(fields.List(fields.Model(InvalidRootSubdirectory)))