Source code for cobbler.cobbler_collections.system_group

"""
SystemGroupCollection
"""

from typing import TYPE_CHECKING, Any, Dict

from cobbler.cobbler_collections.collection import Collection
from cobbler.items import system_group

if TYPE_CHECKING:
    from cobbler.api import CobblerAPI


[docs] class SystemGroups(Collection[system_group.SystemGroup]): """ The collection for system groups. """
[docs] @staticmethod def collection_type() -> str: return "system_group"
[docs] @staticmethod def collection_types() -> str: return "system_groups"
[docs] def factory_produce( self, api: "CobblerAPI", seed_data: Dict[str, Any] ) -> system_group.SystemGroup: """ Return a System Group forged from seed_data :param api: Parameter is skipped. :param seed_data: The data the object is initialized with. :returns: The created SystemGroup. """ return system_group.SystemGroup(api, **seed_data)