id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12,100 | menu.py | cobbler_cobbler/cobbler/items/menu.py | """
Cobbler module that contains the code for a Cobbler menu object.
Changelog:
V3.4.0 (unreleased):
* Changes:
* Constructor: ``kwargs`` can now be used to seed the item during creation.
* ``children``: The property was moved to the base class.
* ``parent``: The property was moved to the ... | 2,707 | Python | .py | 79 | 27.987342 | 111 | 0.638665 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,101 | system.py | cobbler_cobbler/cobbler/items/system.py | """
All code belonging to Cobbler systems.
Changelog (System):
V3.4.0 (unreleased):
* Added:
* ``display_name``: str
* Changes:
* Constructor: ``kwargs`` can now be used to seed the item during creation.
* ``from_dict()``: The method was moved to the base class.
* ``parent``: T... | 56,401 | Python | .py | 1,274 | 35.305338 | 119 | 0.607348 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,102 | image.py | cobbler_cobbler/cobbler/items/image.py | """
Cobbler module that contains the code for a Cobbler image object.
Changelog:
V3.4.0 (unreleased):
* Added:
* ``display_name``
* Changed:
* Constructor: ``kwargs`` can now be used to seed the item during creation.
* ``autoinstall``: Restored inheritance of the property.
* ``... | 25,182 | Python | .py | 581 | 34.776248 | 120 | 0.617539 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,103 | distro.py | cobbler_cobbler/cobbler/items/distro.py | """
Cobbler module that contains the code for a Cobbler distro object.
Changelog:
Schema: From -> To
V3.4.0 (unreleased):
* Added:
* ``find_distro_path()``
* ``link_distro()``
* Changed:
* Constructor: ``kwargs`` can now be used to seed the item during creation.
* ``children``... | 23,351 | Python | .py | 548 | 33.84854 | 119 | 0.614061 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,104 | inheritable_item.py | cobbler_cobbler/cobbler/items/abstract/inheritable_item.py | """
"InheritableItem" the entry point for items that have logical parents and children.
Changelog:
* V3.4.0 (unreleased):
* Initial creation of the class
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Enno Gotthold <enno.gotthold@suse.com>
from abc import ABC
from typing import... | 13,608 | Python | .py | 311 | 33.581994 | 119 | 0.605331 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,105 | item_cache.py | cobbler_cobbler/cobbler/items/abstract/item_cache.py | """
Module that contains the logic for Cobbler to cache an item.
The cache significantly speeds up Cobbler. This effect is achieved thanks to the reduced amount of lookups that are
required to be done.
"""
from typing import TYPE_CHECKING, Any, Dict, Optional
if TYPE_CHECKING:
from cobbler.api import CobblerAPI
... | 2,245 | Python | .py | 61 | 28.622951 | 115 | 0.613186 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,106 | __init__.py | cobbler_cobbler/cobbler/items/abstract/__init__.py | """
Package to describe the abstract items that we define.
"""
| 63 | Python | .py | 3 | 20 | 54 | 0.75 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,107 | base_item.py | cobbler_cobbler/cobbler/items/abstract/base_item.py | """
"BaseItem" is the highest point in the object hierarchy of Cobbler. All concrete objects that can be generated should
inherit from it or one of its derived classes.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Micha... | 22,544 | Python | .py | 531 | 31.308851 | 119 | 0.57599 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,108 | bootable_item.py | cobbler_cobbler/cobbler/items/abstract/bootable_item.py | """
Cobbler module that contains the code for a generic Cobbler item.
Changelog:
V3.4.0 (unreleased):
* Renamed to BootableItem
* (Re-)Added Cache implementation with the following new methods and properties:
* ``cache``
* ``inmemory``
* ``clean_cache()``
* Overhauled the parent/ch... | 18,869 | Python | .py | 414 | 36.033816 | 120 | 0.618276 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,109 | repos.py | cobbler_cobbler/cobbler/cobbler_collections/repos.py | """
Cobbler module that at runtime holds all repos in Cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import os.path
from typing import TYPE_CHECKING, Any, Dict
from cobb... | 2,936 | Python | .py | 75 | 30.493333 | 85 | 0.626099 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,110 | images.py | cobbler_cobbler/cobbler/cobbler_collections/images.py | """
Cobbler module that at runtime holds all images in Cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
from typing import TYPE_CHECKING, Any, Dict
from cobbler import uti... | 3,222 | Python | .py | 81 | 30.111111 | 115 | 0.604547 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,111 | collection.py | cobbler_cobbler/cobbler/cobbler_collections/collection.py | """
This module contains the code for the abstract base collection that powers all the other collections.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import logging
import os
i... | 22,759 | Python | .py | 537 | 30.884544 | 120 | 0.571254 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,112 | systems.py | cobbler_cobbler/cobbler/cobbler_collections/systems.py | """
Cobbler module that at runtime holds all systems in Cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2008-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
from typing import TYPE_CHECKING, Any, Dict, Set
from cobbler impo... | 8,226 | Python | .py | 206 | 29.004854 | 87 | 0.573844 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,113 | distros.py | cobbler_cobbler/cobbler/cobbler_collections/distros.py | """
Cobbler module that at runtime holds all distros in Cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import glob
import os.path
from typing import TYPE_CHECKING, Any, D... | 4,689 | Python | .py | 117 | 29.470085 | 120 | 0.590729 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,114 | manager.py | cobbler_cobbler/cobbler/cobbler_collections/manager.py | """
Repository of the Cobbler object model
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import weakref
from typing import TYPE_CHECKING, Any, Dict, cast
from cobbler import ser... | 6,835 | Python | .py | 172 | 31.273256 | 116 | 0.634676 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,115 | __init__.py | cobbler_cobbler/cobbler/cobbler_collections/__init__.py | """
The collections have the responsibility of ensuring the relational validity of the data present in Cobbler. Further they
hold the data at runtime.
"""
| 155 | Python | .py | 4 | 37.75 | 120 | 0.807947 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,116 | profiles.py | cobbler_cobbler/cobbler/cobbler_collections/profiles.py | """
Cobbler module that at runtime holds all profiles in Cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
from typing import TYPE_CHECKING, Any, Dict
from cobbler import u... | 3,079 | Python | .py | 81 | 27.617284 | 107 | 0.585374 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,117 | menus.py | cobbler_cobbler/cobbler/cobbler_collections/menus.py | """
Cobbler module that at runtime holds all menus in Cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2021 Yuriy Chelpanov <yuriy.chelpanov@gmail.com>
from typing import TYPE_CHECKING, Any, Dict
from cobbler import utils
from cobbler.cexceptions import CX
from cobbler.cobb... | 3,542 | Python | .py | 91 | 28.582418 | 88 | 0.585685 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,118 | input_converters.py | cobbler_cobbler/cobbler/utils/input_converters.py | """
TODO
"""
import shlex
from typing import Any, Dict, List, Optional, Union
from cobbler import enums
def input_string_or_list_no_inherit(
options: Optional[Union[str, List[Any]]]
) -> List[Any]:
"""
Accepts a delimited list of stuff or a list, but always returns a list.
:param options: The objec... | 5,796 | Python | .py | 126 | 38.468254 | 120 | 0.646132 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,119 | signatures.py | cobbler_cobbler/cobbler/utils/signatures.py | """
TODO
"""
import json
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
from cobbler import utils
if TYPE_CHECKING:
from cobbler.api import CobblerAPI
from cobbler.items.distro import Distro
from cobbler.items.image import Image
signature_cache: Dict[str, Any] = {}
def get_support... | 4,433 | Python | .py | 108 | 32.861111 | 119 | 0.62901 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,120 | event.py | cobbler_cobbler/cobbler/utils/event.py | """
This module contains logic to support the events Cobbler generates in its XML-RPC API.
"""
import time
import uuid
from typing import List, Union
from cobbler import enums
class CobblerEvent:
"""
This is a small helper class that represents an event in Cobbler.
"""
def __init__(self, name: str ... | 2,278 | Python | .py | 65 | 26.861538 | 120 | 0.577535 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,121 | thread.py | cobbler_cobbler/cobbler/utils/thread.py | """
This module is responsible for managing the custom common threading logic Cobbler has.
"""
import logging
import pathlib
from threading import Thread
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
from cobbler import enums, utils
if TYPE_CHECKING:
from cobbler.api import CobblerAPI
from ... | 5,217 | Python | .py | 114 | 35.815789 | 112 | 0.617168 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,122 | __init__.py | cobbler_cobbler/cobbler/utils/__init__.py | """
Misc heavy lifting functions for Cobbler
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import contextlib
import fcntl
import glob
import logging
import os
import random
impor... | 49,140 | Python | .py | 1,180 | 34.379661 | 119 | 0.638034 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,123 | process_management.py | cobbler_cobbler/cobbler/utils/process_management.py | """
TODO
"""
import logging
import os
from xmlrpc.client import Fault, ServerProxy
from cobbler import utils
logger = logging.getLogger()
def is_systemd() -> bool:
"""
Return whether this system uses systemd.
This method currently checks if the path ``/usr/lib/systemd/systemd`` exists.
"""
ret... | 3,012 | Python | .py | 76 | 30.473684 | 118 | 0.619863 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,124 | mtab.py | cobbler_cobbler/cobbler/utils/mtab.py | """
We cache the contents of ``/etc/mtab``. The following module is used to keep our cache in sync.
"""
import os
from typing import Any, Dict, List, Optional, Tuple
MTAB_MTIME = None
MTAB_MAP = []
class MntEntObj:
"""
TODO
"""
mnt_fsname = None # name of mounted file system
mnt_dir = None # ... | 5,871 | Python | .py | 137 | 35.233577 | 120 | 0.625395 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,125 | filesystem_helpers.py | cobbler_cobbler/cobbler/utils/filesystem_helpers.py | """
TODO
"""
import errno
import glob
import hashlib
import json
import logging
import os
import pathlib
import shutil
import subprocess
import urllib.request
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from cobbler import utils
from cobbler.cexceptions import CX
from cobbler.utils import log_exc, ... | 20,207 | Python | .py | 486 | 34.465021 | 120 | 0.629437 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,126 | __init__.py | cobbler_cobbler/cobbler/settings/__init__.py | """
Cobbler app-wide settings
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2008, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotth... | 21,587 | Python | .py | 525 | 31.807619 | 120 | 0.605873 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,127 | V3_1_0.py | cobbler_cobbler/cobbler/settings/migrations/V3_1_0.py | """
Migration from V3.0.1 to V3.1.0
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import SchemaError ... | 1,536 | Python | .py | 40 | 34.25 | 92 | 0.7139 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,128 | V3_3_2.py | cobbler_cobbler/cobbler/settings/migrations/V3_3_2.py | """
Migration from V3.3.1 to V3.3.2
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import SchemaError # type: ignore
from cobbler.settings.migrations import V3_3_1
s... | 1,545 | Python | .py | 41 | 33.243902 | 99 | 0.70612 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,129 | V3_3_3.py | cobbler_cobbler/cobbler/settings/migrations/V3_3_3.py | """
Migration from V3.3.2 to V3.3.3
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import Optional, Schema, SchemaError # type: ignore
schema = Schema(
{
... | 10,302 | Python | .py | 265 | 28.275472 | 99 | 0.544357 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,130 | V3_3_1.py | cobbler_cobbler/cobbler/settings/migrations/V3_3_1.py | """
Migration from V3.3.0 to V3.3.1
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import Optional, Schema, SchemaError # type: ignore
from cobbler.settings.migrat... | 10,830 | Python | .py | 277 | 28.617329 | 99 | 0.549502 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,131 | V3_3_0.py | cobbler_cobbler/cobbler/settings/migrations/V3_3_0.py | """
Migration from V3.2.1 to V3.3.0
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
import glob
import ipaddress
import json
import os
import sock... | 17,173 | Python | .py | 450 | 26.56 | 105 | 0.521333 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,132 | V3_4_0.py | cobbler_cobbler/cobbler/settings/migrations/V3_4_0.py | """
Migration from V3.3.3 to V3.4.0
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
import configparser
import glob
import json
import os
import pathlib
from configparser import ConfigParser
from typing import A... | 12,884 | Python | .py | 307 | 33.537459 | 99 | 0.624203 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,133 | V3_3_4.py | cobbler_cobbler/cobbler/settings/migrations/V3_3_4.py | """
Migration from V3.3.3 to V3.3.4
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2024 Enno Gotthold <egotthold@suse.com
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import SchemaError # type: ignore
from cobbler.settings.migrations import V3_3_3... | 1,511 | Python | .py | 41 | 32.512195 | 99 | 0.707502 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,134 | V3_3_5.py | cobbler_cobbler/cobbler/settings/migrations/V3_3_5.py | """
Migration from V3.3.4 to V3.3.5
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2024 Enno Gotthold <egotthold@suse.com
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import Optional, Schema, SchemaError # type: ignore
from cobbler.settings.migrat... | 10,270 | Python | .py | 264 | 28.276515 | 99 | 0.5457 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,135 | V3_2_1.py | cobbler_cobbler/cobbler/settings/migrations/V3_2_1.py | """
Migration from V3.2.0 to V3.2.1
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
import os
from typing import Any, Dict
from schema import Opt... | 8,573 | Python | .py | 228 | 29.688596 | 92 | 0.613093 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,136 | __init__.py | cobbler_cobbler/cobbler/settings/migrations/__init__.py | """
The name of the migration file is the target version.
One migration should update from version x to x + 1, where X is any Cobbler version and the migration updates to
any next version (e.g. 3.2.1 to 3.3.0).
The validation of the current version is in the file with the name of the version.
"""
# SPDX-License-Identi... | 13,939 | Python | .py | 337 | 34.881306 | 120 | 0.666198 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,137 | V3_2_0.py | cobbler_cobbler/cobbler/settings/migrations/V3_2_0.py | """
Migration from V3.1.2 to V3.2.0
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import Optional, Or,... | 6,799 | Python | .py | 176 | 30.670455 | 107 | 0.613836 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,138 | V2_8_5.py | cobbler_cobbler/cobbler/settings/migrations/V2_8_5.py | """
Migration from V2.x.x to V2.8.5
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import Optional, Sch... | 5,911 | Python | .py | 156 | 30.089744 | 92 | 0.612156 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,139 | V3_1_1.py | cobbler_cobbler/cobbler/settings/migrations/V3_1_1.py | """
Migration from V3.1.0 to V3.1.1
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import SchemaError ... | 1,536 | Python | .py | 40 | 34.25 | 92 | 0.7139 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,140 | V3_0_1.py | cobbler_cobbler/cobbler/settings/migrations/V3_0_1.py | """
Migration from V3.0.0 to V3.0.1
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict, List
from schema import SchemaE... | 2,707 | Python | .py | 69 | 30.898551 | 92 | 0.613359 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,141 | V3_1_2.py | cobbler_cobbler/cobbler/settings/migrations/V3_1_2.py | """
Migration from V3.1.1 to V3.1.2
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
from typing import Any, Dict
from schema import Optional, Or,... | 6,507 | Python | .py | 167 | 30.988024 | 107 | 0.615847 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,142 | helper.py | cobbler_cobbler/cobbler/settings/migrations/helper.py | """
Helper module which contains shared logic for adjusting the settings.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
import datetime
import o... | 5,305 | Python | .py | 144 | 30.645833 | 87 | 0.646049 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,143 | V3_0_0.py | cobbler_cobbler/cobbler/settings/migrations/V3_0_0.py | """
Migration from V2.8.5 to V3.0.0
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2021 Dominik Gedon <dgedon@suse.de>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrightText: Copyright SUSE LLC
import glob
import json
import os
import shutil
from typing imp... | 12,409 | Python | .py | 330 | 28.99697 | 107 | 0.592974 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,144 | nsupdate_delete_system_pre.py | cobbler_cobbler/cobbler/modules/nsupdate_delete_system_pre.py | """
Replace (or remove) records in DNS zone for systems created (or removed) by Cobbler
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Adrian Brzezinski <adrbxx@gmail.com>
# DNS toolkit for Python
# - python-dnspython (Debian)
# - python-dns (RH/CentOS)
import time
from typing import I... | 5,996 | Python | .py | 136 | 36.080882 | 120 | 0.619522 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,145 | sync_post_restart_services.py | cobbler_cobbler/cobbler/modules/sync_post_restart_services.py | """
Restarts the DHCP and/or DNS after a Cobbler sync to apply changes to the configuration files.
"""
import logging
from typing import TYPE_CHECKING, List
from cobbler import utils
from cobbler.utils import process_management
if TYPE_CHECKING:
from cobbler.api import CobblerAPI
logger = logging.getLogger()
... | 2,544 | Python | .py | 55 | 39.145455 | 117 | 0.677315 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,146 | __init__.py | cobbler_cobbler/cobbler/modules/__init__.py | """
This part of Cobbler may be utilized by any plugins which are extending Cobbler and core code which can be exchanged
through the ``modules.conf`` file.
A Cobbler module is loaded if it has a method called ``register()``. The method must return a ``str`` which represents
the module category.
"""
| 301 | Python | .py | 6 | 49 | 118 | 0.768707 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,147 | sync_post_wingen.py | cobbler_cobbler/cobbler/modules/sync_post_wingen.py | """
Create Windows boot files
To create Windows boot files, files are used that must be extracted from the distro. The ``cobbler import``"
command extracts the required files and places them where the given trigger expects them to be found.
To create boot files per profile/system, the trigger uses the following metad... | 23,952 | Python | .py | 515 | 35.739806 | 117 | 0.571704 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,148 | scm_track.py | cobbler_cobbler/cobbler/modules/scm_track.py | """
Cobbler Trigger Module that puts the content of the Cobbler data directory under version control. Depending on
``scm_track_mode`` in the settings, this can either be git or Mercurial.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2009, Red Hat Inc.
# SPDX-FileCopyrightText: Mi... | 3,298 | Python | .py | 72 | 38.75 | 117 | 0.647096 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,149 | nsupdate_add_system_post.py | cobbler_cobbler/cobbler/modules/nsupdate_add_system_post.py | """
Replace (or remove) records in DNS zone for systems created (or removed) by Cobbler
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Adrian Brzezinski <adrbxx@gmail.com>
# DNS toolkit for Python
# - python-dnspython (Debian)
# - python-dns (RH/CentOS)
import time
from typing import I... | 6,050 | Python | .py | 139 | 35.381295 | 120 | 0.616695 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,150 | dnsmasq.py | cobbler_cobbler/cobbler/modules/managers/dnsmasq.py | """
This is some of the code behind 'cobbler sync'.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: John Eckersberg <jeckersb@redhat.com>
import time
from... | 16,935 | Python | .py | 384 | 33.682292 | 116 | 0.598118 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,151 | bind.py | cobbler_cobbler/cobbler/modules/managers/bind.py | """
This is some of the code behind 'cobbler sync'.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: John Eckersberg <jeckersb@redhat.com>
import re
import... | 24,645 | Python | .py | 564 | 30.101064 | 120 | 0.51978 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,152 | isc.py | cobbler_cobbler/cobbler/modules/managers/isc.py | """
This is some of the code behind 'cobbler sync'.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: John Eckersberg <jeckersb@redhat.com>
import shutil
im... | 15,623 | Python | .py | 357 | 32.380952 | 110 | 0.577176 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,153 | __init__.py | cobbler_cobbler/cobbler/modules/managers/__init__.py | """
This module contains extensions for services Cobbler is managing. The services are restarted via the ``service`` command
or alternatively through the server executables directly. Cobbler does not announce the restarts but is expecting to be
allowed to do this on its own at any given time. Thus all services managed ... | 5,091 | Python | .py | 144 | 28.222222 | 120 | 0.639454 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,154 | ndjbdns.py | cobbler_cobbler/cobbler/modules/managers/ndjbdns.py | # coding=utf-8
"""
This is some of the code behind 'cobbler sync'.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2014, Mittwald CM Service GmbH & Co. KG
# SPDX-FileCopyrightText: Martin Helmich <m.helmich@mittwald.de>
# SPDX-FileCopyrightText: Daniel Kr√§mer <d.kraemer@mittwald.de... | 2,971 | Python | .py | 74 | 32.567568 | 115 | 0.647387 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,155 | genders.py | cobbler_cobbler/cobbler/modules/managers/genders.py | """
Cobbler Module that manages the cluster configuration tool from CHAOS. For more information please see:
`GitHub - chaos/genders <https://github.com/chaos/genders>`_
"""
import distutils.sysconfig
import logging
import os
import sys
import time
from typing import TYPE_CHECKING, Any, Dict, Union
from cobbler.templa... | 4,424 | Python | .py | 103 | 37.019417 | 119 | 0.679544 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,156 | import_signatures.py | cobbler_cobbler/cobbler/modules/managers/import_signatures.py | """
Cobbler Module that contains the code for ``cobbler import`` and provides the magic to automatically detect an ISO image
OS and version.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT... | 46,980 | Python | .py | 1,014 | 33.19428 | 120 | 0.546147 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,157 | in_tftpd.py | cobbler_cobbler/cobbler/modules/managers/in_tftpd.py | """
This is some of the code behind 'cobbler sync'.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
import glob
import os.path
import shutil
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
from cobbler import templar, tftpgen, utils
from cobbler.cexceptions import CX
from cobbler.modules.managers ... | 7,978 | Python | .py | 179 | 34.391061 | 113 | 0.615008 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,158 | ldap.py | cobbler_cobbler/cobbler/modules/authentication/ldap.py | """
Authentication module that uses ldap
Settings in /etc/cobbler/authn_ldap.conf
Choice of authentication module is in /etc/cobbler/modules.conf
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.deha... | 5,840 | Python | .py | 132 | 36.575758 | 113 | 0.65 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,159 | configfile.py | cobbler_cobbler/cobbler/modules/authentication/configfile.py | """
Authentication module that uses /etc/cobbler/auth.conf
Choice of authentication module is in /etc/cobbler/modules.conf
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import h... | 3,649 | Python | .py | 85 | 36.882353 | 113 | 0.67832 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,160 | pam.py | cobbler_cobbler/cobbler/modules/authentication/pam.py | """
Authentication module that uses /etc/cobbler/auth.conf
Choice of authentication module is in /etc/cobbler/modules.conf
PAM python code based on the pam_python code created by Chris AtLee:
https://atlee.ca/software/pam/
#-----------------------------------------------
pam_python (c) 2007 Chris AtLee <chris@atlee.... | 4,938 | Python | .py | 133 | 32.451128 | 113 | 0.682717 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,161 | denyall.py | cobbler_cobbler/cobbler/modules/authentication/denyall.py | """
Authentication module that denies everything.
Used to disable the WebUI by default.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
from typing import TYPE_CHECKING
if TYPE_CH... | 681 | Python | .py | 21 | 29.142857 | 81 | 0.742331 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,162 | __init__.py | cobbler_cobbler/cobbler/modules/authentication/__init__.py | """
This module represents all Cobbler methods of authentication. All present modules may be used through the configuration
file ``modules.conf`` normally found at ``/etc/cobbler/``.
In the following the specification of an authentication module is given:
#. The name of the only public method - except the generic ``r... | 1,125 | Python | .py | 21 | 52.238095 | 119 | 0.754545 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,163 | passthru.py | cobbler_cobbler/cobbler/modules/authentication/passthru.py | """
Authentication module that defers to Apache and trusts
what Apache trusts.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
from typing import TYPE_CHECKING
from cobbler import... | 992 | Python | .py | 26 | 34.615385 | 81 | 0.746862 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,164 | spacewalk.py | cobbler_cobbler/cobbler/modules/authentication/spacewalk.py | """
Authentication module that uses Spacewalk's auth system.
Any org_admin or kickstart_admin can get in.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
from typing import TYPE_CH... | 5,821 | Python | .py | 113 | 45.19469 | 170 | 0.704206 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,165 | post_power.py | cobbler_cobbler/cobbler/modules/installation/post_power.py | """
Post install trigger for Cobbler to power cycle the guest if needed
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2010 Bill Peck <bpeck@redhat.com>
import time
from threading import Thread
from typing import TYPE_CHECKING, List
if TYPE_CHECKING:
from cobbler.api import C... | 1,851 | Python | .py | 51 | 30.54902 | 100 | 0.673206 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,166 | pre_puppet.py | cobbler_cobbler/cobbler/modules/installation/pre_puppet.py | """
This module removes puppet certs from the puppet master prior to
reinstalling a machine if the puppet master is running on the Cobbler
server.
Based on:
https://www.ithiriel.com/content/2010/03/29/writing-install-triggers-cobbler
"""
import logging
import re
from typing import TYPE_CHECKING, List
from cobbler im... | 2,492 | Python | .py | 63 | 34.063492 | 117 | 0.689111 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,167 | post_puppet.py | cobbler_cobbler/cobbler/modules/installation/post_puppet.py | """
This module signs newly installed client puppet certificates if the
puppet master server is running on the same machine as the Cobbler
server.
Based on:
https://www.ithiriel.com/content/2010/03/29/writing-install-triggers-cobbler
"""
import logging
import re
from typing import TYPE_CHECKING, List
from cobbler im... | 2,164 | Python | .py | 57 | 32.666667 | 114 | 0.689986 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,168 | post_log.py | cobbler_cobbler/cobbler/modules/installation/post_log.py | """
Cobbler Module Trigger that will mark a system as installed in ``cobbler status``.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2008-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import time
from typing import TYPE_CHECKING,... | 1,803 | Python | .py | 46 | 34.021739 | 113 | 0.681792 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,169 | pre_log.py | cobbler_cobbler/cobbler/modules/installation/pre_log.py | """
TODO
"""
import time
from typing import TYPE_CHECKING, List
from cobbler import validate
if TYPE_CHECKING:
from cobbler.api import CobblerAPI
def register() -> str:
"""
This pure python trigger acts as if it were a legacy shell-trigger, but is much faster. The return of this method
indicates th... | 1,489 | Python | .py | 43 | 29.162791 | 117 | 0.660839 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,170 | __init__.py | cobbler_cobbler/cobbler/modules/installation/__init__.py | """
This module contains Python triggers for Cobbler.
With Cobbler one is able to add custom actions and commands after many events happening in Cobbler. The Python modules
presented here are an example of what can be done after certain events. Custom triggers may be added in any language as
long as Cobbler is allowed ... | 717 | Python | .py | 9 | 78.333333 | 119 | 0.782178 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,171 | post_report.py | cobbler_cobbler/cobbler/modules/installation/post_report.py | """
Post install trigger for Cobbler to send out a pretty email report that contains target information.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2008-2009 Bill Peck <bpeck@redhat.com>
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import smtplib
from bui... | 3,493 | Python | .py | 90 | 32.144444 | 100 | 0.657879 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,172 | pre_clear_anamon_logs.py | cobbler_cobbler/cobbler/modules/installation/pre_clear_anamon_logs.py | """
Cobbler Module Trigger that will clear the anamon logs.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2008-2009, Red Hat Inc.
# SPDX-FileCopyrightText: James Laska <jlaska@redhat.com>
# SPDX-FileCopyrightText: Bill Peck <bpeck@redhat.com>
import glob
import logging
import os
... | 1,814 | Python | .py | 48 | 32.916667 | 117 | 0.697368 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,173 | allowall.py | cobbler_cobbler/cobbler/modules/authorization/allowall.py | """
Authorization module that allows everything, which is the default for new Cobbler installs.
"""
from typing import TYPE_CHECKING, Any
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail... | 1,113 | Python | .py | 33 | 29.787879 | 91 | 0.716153 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,174 | configfile.py | cobbler_cobbler/cobbler/modules/authorization/configfile.py | """
Authorization module that allow users listed in
/etc/cobbler/users.conf to be permitted to access resources.
For instance, when using authz_ldap, you want to use authn_configfile,
not authz_allowall, which will most likely NOT do what you want.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightTe... | 2,066 | Python | .py | 60 | 29.766667 | 91 | 0.687437 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,175 | __init__.py | cobbler_cobbler/cobbler/modules/authorization/__init__.py | """
This module represents all Cobbler methods of authorization. All present modules may be used through the configuration
file ``modules.conf`` normally found at ``/etc/cobbler/``.
In the following the specification of an authorization module is given:
#. The name of the only public method - except the generic ``reg... | 1,247 | Python | .py | 18 | 67.833333 | 118 | 0.729421 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,176 | ownership.py | cobbler_cobbler/cobbler/modules/authorization/ownership.py | """
Authorization module that allow users listed in
/etc/cobbler/users.conf to be permitted to access resources, with
the further restriction that Cobbler objects can be edited to only
allow certain users/groups to access those specific objects.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText:... | 9,920 | Python | .py | 227 | 37.039648 | 119 | 0.671363 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,177 | sqlite.py | cobbler_cobbler/cobbler/modules/serializers/sqlite.py | """
Cobbler's SQLite database based object serializer.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2024 Yuriy Chelpanov <yuriy.chelpanov@gmail.com>
import json
import logging
import os
import sqlite3
from typing import TYPE_CHECKING, Any, Dict, List, Optional
from cobbler.cexc... | 10,673 | Python | .py | 262 | 30.866412 | 118 | 0.592457 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,178 | file.py | cobbler_cobbler/cobbler/modules/serializers/file.py | """
Cobbler's file-based object serializer.
As of 9/2014, this is Cobbler's default serializer and the most stable one.
It uses multiple JSON files in /var/lib/cobbler/collections/distros, profiles, etc
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Othe... | 5,685 | Python | .py | 135 | 33.125926 | 110 | 0.616667 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,179 | __init__.py | cobbler_cobbler/cobbler/modules/serializers/__init__.py | """
This module contains code to persist the in memory state of Cobbler on a target. The name of the target should be the
name of the Python file. Cobbler is currently only tested against the file serializer.
"""
from typing import TYPE_CHECKING, Any, Dict, List
if TYPE_CHECKING:
from cobbler.api import CobblerAP... | 3,400 | Python | .py | 87 | 31.149425 | 118 | 0.648024 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,180 | mongodb.py | cobbler_cobbler/cobbler/modules/serializers/mongodb.py | """
Cobbler's Mongo database based object serializer.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: James Cammarata <jimi@sngx.net>
import logging
from ... | 7,696 | Python | .py | 172 | 36.197674 | 118 | 0.649053 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,181 | hardlink.py | cobbler_cobbler/cobbler/actions/hardlink.py | """
Hard links Cobbler content together to save space.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: 2021 Enno Gotthold <egotthold@suse.de>
# SPDX-FileCopyrig... | 2,199 | Python | .py | 60 | 28.716667 | 93 | 0.606958 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,182 | reposync.py | cobbler_cobbler/cobbler/actions/reposync.py | """
Builds out and synchronizes yum repo mirrors.
Initial support for rsync, perhaps reposync coming later.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2007, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import logging
import os... | 34,149 | Python | .py | 692 | 37.101156 | 120 | 0.556129 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,183 | sync.py | cobbler_cobbler/cobbler/actions/sync.py | """
Builds out filesystem trees/data based on the object tree.
This is the code behind 'cobbler sync'.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import glob
import logging
im... | 19,216 | Python | .py | 449 | 32.120267 | 120 | 0.597262 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,184 | importer.py | cobbler_cobbler/cobbler/actions/importer.py | """
This module contains the logic that kicks of the ``cobbler import`` process. This is extracted logic from ``api.py``
that is essentially calling ``modules/mangers/import_signatures.py`` with some preparatory code.
"""
import logging
import os
from typing import TYPE_CHECKING, Optional
from cobbler import utils
fr... | 6,880 | Python | .py | 144 | 36.673611 | 119 | 0.59857 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,185 | check.py | cobbler_cobbler/cobbler/actions/check.py | """
Cobbler Trigger Module that checks against a list of hardcoded potential common errors in a Cobbler installation.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import glob
im... | 21,206 | Python | .py | 455 | 35.002198 | 120 | 0.586827 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,186 | status.py | cobbler_cobbler/cobbler/actions/status.py | """
Reports on automatic installation activity by examining the logs in
/var/log/cobbler.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import glob
import gzip
import re
import t... | 7,342 | Python | .py | 188 | 28.75 | 118 | 0.566395 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,187 | mkloaders.py | cobbler_cobbler/cobbler/actions/mkloaders.py | """Cobbler action to create bootable Grub2 images.
This action calls grub2-mkimage for all bootloader formats configured in
Cobbler's settings. See man(1) grub2-mkimage for available formats.
"""
import logging
import pathlib
import re
import subprocess
import sys
import typing
from cobbler import utils
if typing.T... | 13,727 | Python | .py | 322 | 32.164596 | 119 | 0.606552 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,188 | replicate.py | cobbler_cobbler/cobbler/actions/replicate.py | """
Replicate from a Cobbler master.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2007-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
# SPDX-FileCopyrightText: Scott Henson <shenson@redhat.com>
import fnmatch
import logging
impor... | 20,040 | Python | .py | 411 | 35.19708 | 119 | 0.543229 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,189 | __init__.py | cobbler_cobbler/cobbler/actions/__init__.py | """
The action module is responsible for containing one Python module for each action which Cobbler offers. The code should
never be dependent on another module or on other parts. An action should request the exact
data it requires and nothing more.
"""
| 254 | Python | .py | 5 | 49.8 | 119 | 0.811245 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,190 | log.py | cobbler_cobbler/cobbler/actions/log.py | """
Cobbler Trigger Module that managed the logs associated with a Cobbler system.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Bill Peck <bpeck@redhat.com>
import glob
import logging
import os
import os.path
import pathlib... | 1,571 | Python | .py | 47 | 25.702128 | 88 | 0.606201 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,191 | acl.py | cobbler_cobbler/cobbler/actions/acl.py | """
Configures acls for various users/groups so they can access the Cobbler command
line as non-root. Now that CLI is largely remoted (XMLRPC) this is largely just
useful for not having to log in (access to shared-secret) file but also grants
access to hand-edit various cobbler_collections files and other useful thing... | 4,051 | Python | .py | 95 | 33.094737 | 111 | 0.599492 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,192 | netboot.py | cobbler_cobbler/cobbler/actions/buildiso/netboot.py | """
This module contains the specific code to generate a network bootable ISO.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
import pathlib
import re
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from cobbler import utils
from cobbler.actions import buildiso
from cobbler.actions.buildis... | 34,402 | Python | .py | 704 | 37.03267 | 120 | 0.581953 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,193 | __init__.py | cobbler_cobbler/cobbler/actions/buildiso/__init__.py | """
Builds bootable CD images that have PXE-equivalent behavior for all Cobbler distros/profiles/systems currently in
memory.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others
# SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail>
import... | 25,266 | Python | .py | 581 | 33.075731 | 120 | 0.599283 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,194 | standalone.py | cobbler_cobbler/cobbler/actions/buildiso/standalone.py | """
This module contains the specific code for generating standalone or airgapped ISOs.
"""
# SPDX-License-Identifier: GPL-2.0-or-later
import itertools
import os
import pathlib
import re
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union
from cobbler import utils
from cobbler.action... | 14,928 | Python | .py | 335 | 33.641791 | 117 | 0.600563 | cobbler/cobbler | 2,597 | 653 | 318 | GPL-2.0 | 9/5/2024, 5:11:26 PM (Europe/Amsterdam) |
12,195 | mypy.ini | SirVer_ultisnips/mypy.ini | # Global options:
[mypy]
python_version = 3.7
warn_return_any = True
warn_unused_configs = True
mypy_path=pythonx/UltiSnips
[mypy-vim]
ignore_missing_imports = True
[mypy-unidecode]
ignore_missing_imports = True
| 215 | Python | .py | 10 | 20.2 | 29 | 0.80198 | SirVer/ultisnips | 7,501 | 688 | 112 | GPL-3.0 | 9/5/2024, 5:11:34 PM (Europe/Amsterdam) |
12,196 | test_all.py | SirVer_ultisnips/test_all.py | #!/usr/bin/env python3
# encoding: utf-8
#
# See CONTRIBUTING.md for an explanation of this file.
#
# NOTE: The test suite is not working under Windows right now as I have no
# access to a windows system for fixing it. Volunteers welcome. Here are some
# comments from the last time I got the test suite running under wi... | 8,803 | Python | .py | 243 | 25.99177 | 90 | 0.56083 | SirVer/ultisnips | 7,501 | 688 | 112 | GPL-3.0 | 9/5/2024, 5:11:34 PM (Europe/Amsterdam) |
12,197 | test_Plugin.py | SirVer_ultisnips/test/test_Plugin.py | import sys
from test.vim_test_case import VimTestCase as _VimTest
from test.constant import *
class Plugin_SuperTab_SimpleTest(_VimTest):
plugins = ["ervandew/supertab"]
snippets = ("long", "Hello", "", "w")
keys = (
"longtextlongtext\n" + "longt" + EX + "\n" + "long" + EX # Should complete word... | 935 | Python | .py | 19 | 43.105263 | 88 | 0.673985 | SirVer/ultisnips | 7,501 | 688 | 112 | GPL-3.0 | 9/5/2024, 5:11:34 PM (Europe/Amsterdam) |
12,198 | test_Folding.py | SirVer_ultisnips/test/test_Folding.py | from test.vim_test_case import VimTestCase as _VimTest
from test.constant import *
class FoldingEnabled_SnippetWithFold_ExpectNoFolding(_VimTest):
def _extra_vim_config(self, vim_config):
vim_config.append("set foldlevel=0")
vim_config.append("set foldmethod=marker")
snippets = (
"tes... | 1,592 | Python | .py | 45 | 29.822222 | 83 | 0.563885 | SirVer/ultisnips | 7,501 | 688 | 112 | GPL-3.0 | 9/5/2024, 5:11:34 PM (Europe/Amsterdam) |
12,199 | vim_test_case.py | SirVer_ultisnips/test/vim_test_case.py | # encoding: utf-8
# pylint: skip-file
import os
import subprocess
import tempfile
import textwrap
import time
import unittest
from test.constant import SEQUENCES, EX
from test.vim_interface import create_directory, TempFileManager
def plugin_cache_dir():
"""The directory that we check out our bundles to."""
... | 8,293 | Python | .py | 186 | 34.435484 | 88 | 0.599579 | SirVer/ultisnips | 7,501 | 688 | 112 | GPL-3.0 | 9/5/2024, 5:11:34 PM (Europe/Amsterdam) |