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,000
utils_test.py
cobbler_cobbler/tests/utils/utils_test.py
import datetime import os import re import time from pathlib import Path from threading import Thread import pytest from netaddr.ip import IPAddress from cobbler import enums, utils from cobbler.items.distro import Distro from tests.conftest import does_not_raise def test_pretty_hex(): # Arrange value = IP...
15,571
Python
.py
499
25.921844
117
0.636199
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,001
filesystem_helpers_test.py
cobbler_cobbler/tests/utils/filesystem_helpers_test.py
import os import pathlib import shutil from pathlib import Path from typing import Any import pytest from pytest_mock import MockerFixture from cobbler.api import CobblerAPI from cobbler.cexceptions import CX from cobbler.utils import filesystem_helpers from tests.conftest import does_not_raise @pytest.mark.parame...
7,718
Python
.py
221
30.126697
91
0.697734
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,002
signatures_test.py
cobbler_cobbler/tests/utils/signatures_test.py
""" Tests that validate the functionality of the module that is responsible for managing the signatures database of Cobbler. """ from typing import Any, Dict from cobbler.utils import signatures def test_get_supported_distro_boot_loaders(): # Arrange # Act result = signatures.get_supported_distro_boot_...
734
Python
.py
20
32.6
120
0.731534
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,003
settings_test.py
cobbler_cobbler/tests/settings/settings_test.py
""" Tests that validate the functionality of the module that is responsible for managing the settings. """ import os import pathlib import shutil from typing import Any, Dict, List import pytest import yaml from schema import SchemaError # type: ignore[reportMissingTypeStubs] from cobbler import settings from cobbl...
9,024
Python
.py
250
28.48
98
0.617431
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,004
helper_test.py
cobbler_cobbler/tests/settings/migrations/helper_test.py
""" Tests for the Cobbler settings migration helpers """ # 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 copy from typing import Dict, Union i...
2,582
Python
.py
78
28.666667
67
0.657618
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,005
normalize_test.py
cobbler_cobbler/tests/settings/migrations/normalize_test.py
""" Tests for the Cobbler settings normalizations """ # 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 yaml from cobbler.settings.migrations imp...
5,682
Python
.py
156
31.307692
78
0.671062
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,006
migrations_test.py
cobbler_cobbler/tests/settings/migrations/migrations_test.py
""" Tests for the Cobbler settings migrations """ # 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 pathlib import shutil import pytest import ya...
8,146
Python
.py
229
30.502183
106
0.682056
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,007
input_converters.py
cobbler_cobbler/tests/api/input_converters.py
""" Tests that validate the functionality of the module that is responsible for providing the API for input conversion. """ from typing import Any, Dict, List, Optional, Union import pytest from cobbler.api import CobblerAPI from tests.conftest import does_not_raise @pytest.mark.parametrize( "input_options,ex...
4,424
Python
.py
134
27.223881
115
0.627226
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,008
sync_test.py
cobbler_cobbler/tests/api/sync_test.py
# type: ignore from unittest.mock import MagicMock, Mock, PropertyMock, create_autospec import pytest import cobbler.actions.sync import cobbler.modules.managers.bind import cobbler.modules.managers.isc from cobbler.items.image import Image from tests.conftest import does_not_raise @pytest.mark.parametrize( "i...
5,209
Python
.py
124
36.580645
95
0.690665
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,009
find_test.py
cobbler_cobbler/tests/api/find_test.py
""" Tests that validate the functionality of the module that is responsible for providing the search API for the application. """ from typing import Any, Dict, Optional import pytest from cobbler.api import CobblerAPI from tests.conftest import does_not_raise @pytest.fixture(name="find_fillup") def fixture_find_f...
6,498
Python
.py
202
26.188119
117
0.644363
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,010
miscellaneous_test.py
cobbler_cobbler/tests/api/miscellaneous_test.py
""" Tests that validate the functionality of the module that is responsible for providing miscellaneous API operations. """ import logging from typing import TYPE_CHECKING, Any, Callable from unittest.mock import create_autospec import pytest from cobbler import enums, settings from cobbler.actions.buildiso.netboot ...
7,817
Python
.py
216
28.583333
115
0.610715
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,011
add_test.py
cobbler_cobbler/tests/api/add_test.py
""" Tests that are ensuring the correct functionality of the CobblerAPI in regard to adding items via it. """ import pathlib from pathlib import Path from typing import Callable from cobbler.api import CobblerAPI from cobbler.items.image import Image def test_image_add(cobbler_api: CobblerAPI): # Arrange te...
1,670
Python
.py
48
30.416667
106
0.710918
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,012
nsupdate_add_system_post_test.py
cobbler_cobbler/tests/modules/nsupdate_add_system_post_test.py
""" Tests that validate the functionality of the module that is responsible for replacing or adding DNS records after a Cobbler system was deleted. """ from typing import TYPE_CHECKING from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules import nsupdate_add_system_post from cobb...
1,527
Python
.py
39
35.025641
115
0.739513
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,013
sync_post_restart_services_test.py
cobbler_cobbler/tests/modules/sync_post_restart_services_test.py
""" Tests that validate the functionality of the module that is responsible for restarting services after config file regeneration. """ from typing import TYPE_CHECKING, List from cobbler.api import CobblerAPI from cobbler.modules import sync_post_restart_services if TYPE_CHECKING: from pytest_mock import Mocker...
1,003
Python
.py
28
31.75
113
0.728497
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,014
scm_track_test.py
cobbler_cobbler/tests/modules/scm_track_test.py
""" TODO """ from typing import TYPE_CHECKING from unittest.mock import MagicMock import pytest from cobbler.api import CobblerAPI from cobbler.cexceptions import CX from cobbler.modules import scm_track from cobbler.settings import Settings if TYPE_CHECKING: from pytest_mock import MockerFixture def test_reg...
3,076
Python
.py
90
28.222222
94
0.659367
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,015
nsupdate_delete_system_pre_test.py
cobbler_cobbler/tests/modules/nsupdate_delete_system_pre_test.py
""" Tests that validate the functionality of the module that is responsible for replacing or deleting DNS records after a Cobbler system was deleted. """ from typing import TYPE_CHECKING from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules import nsupdate_delete_system_pre from...
1,525
Python
.py
39
34.948718
117
0.743051
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,016
sync_post_wingen_test.py
cobbler_cobbler/tests/modules/sync_post_wingen_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules import sync_post_wingen from cobbler.settings import Settings def test_register(): # Arrange & Act result = sync_post_wingen.register() # Assert assert result == "/var/lib/cobbler/triggers/sync/post/*" def ...
828
Python
.py
24
30.166667
86
0.722362
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,017
bind_test.py
cobbler_cobbler/tests/modules/managers/bind_test.py
""" Test to verify the functionallity of the isc bind module. """ import time from typing import TYPE_CHECKING, Any import pytest from cobbler.api import CobblerAPI from cobbler.modules.managers import bind if TYPE_CHECKING: from pytest_mock import MockerFixture @pytest.fixture(scope="function") def named_tem...
5,202
Python
.py
153
28.771242
101
0.666999
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,018
ndjbdns_test.py
cobbler_cobbler/tests/modules/managers/ndjbdns_test.py
""" Tests that validate the functionality of the module that is responsible for managing the djbdns config files. """ from typing import TYPE_CHECKING, Any from cobbler.api import CobblerAPI from cobbler.items.network_interface import NetworkInterface from cobbler.items.system import System from cobbler.modules.manag...
2,682
Python
.py
67
34.985075
109
0.704861
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,019
isc_test.py
cobbler_cobbler/tests/modules/managers/isc_test.py
""" Test to verify the functionality of the isc DHCP module. """ import time from typing import TYPE_CHECKING from unittest.mock import MagicMock import pytest from cobbler.api import CobblerAPI from cobbler.items.distro import Distro from cobbler.items.profile import Profile from cobbler.items.system import Network...
13,673
Python
.py
343
33.603499
101
0.652433
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,020
dnsmasq_test.py
cobbler_cobbler/tests/modules/managers/dnsmasq_test.py
import time from unittest.mock import MagicMock import pytest from pytest_mock.plugin import MockerFixture from cobbler import utils from cobbler.api import CobblerAPI from cobbler.items.distro import Distro from cobbler.items.network_interface import NetworkInterface from cobbler.items.profile import Profile from co...
12,990
Python
.py
292
38.996575
129
0.702207
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,021
genders_test.py
cobbler_cobbler/tests/modules/managers/genders_test.py
""" Tests that validate the functionality of the module that is responsible for managing the genders config file. """ import time from typing import TYPE_CHECKING from unittest.mock import MagicMock import pytest from cobbler.api import CobblerAPI from cobbler.items.distro import Distro from cobbler.items.profile im...
4,081
Python
.py
107
32.794393
109
0.696235
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,022
in_tftpd_test.py
cobbler_cobbler/tests/modules/managers/in_tftpd_test.py
""" Tests that validate the functionality of the module that is responsible for managing the config files of the ISC DHCP server. """ from typing import TYPE_CHECKING, Any, Generator, List from unittest.mock import MagicMock, Mock import pytest from cobbler.api import CobblerAPI from cobbler.items.distro import Dist...
7,538
Python
.py
173
39.190751
119
0.731977
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,023
import_signatures_test.py
cobbler_cobbler/tests/modules/managers/import_signatures_test.py
""" Tests that validate the functionality of the module that is responsible for managing imported distribution trees. """ import pytest from cobbler.api import CobblerAPI from cobbler.modules.managers import import_signatures def test_register(): # Arrange # Act result = import_signatures.register() ...
1,031
Python
.py
29
31.62069
113
0.737108
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,024
configfile_test.py
cobbler_cobbler/tests/modules/authentication/configfile_test.py
""" Tests that validate the functionality of the module that is responsible for configuration file authentication. """ import pytest from cobbler.api import CobblerAPI from cobbler.modules.authentication import configfile @pytest.fixture(scope="function", autouse=True) def reset_hashfunction(cobbler_api: CobblerAPI...
2,643
Python
.py
80
27.7375
143
0.693669
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,025
passthrough_test.py
cobbler_cobbler/tests/modules/authentication/passthrough_test.py
""" Tests that validate the functionality of the module that is responsible for passthrough authentication. """ from pytest import MonkeyPatch from cobbler import utils from cobbler.api import CobblerAPI from cobbler.modules.authentication import passthru class TestPassthrough: def test_authenticate_negative(se...
837
Python
.py
22
31.727273
103
0.709677
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,026
pam_test.py
cobbler_cobbler/tests/modules/authentication/pam_test.py
""" Tests that validate the functionality of the module that is responsible for PAM authentication. """ from cobbler.api import CobblerAPI from cobbler.modules.authentication import pam class TestPam: def test_authenticate(self, cobbler_api: CobblerAPI): # Arrange test_username = "test" t...
474
Python
.py
14
28.214286
95
0.707692
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,027
ldap_test.py
cobbler_cobbler/tests/modules/authentication/ldap_test.py
""" Tests that validate the functionality of the module that is responsible for LDAP authentication. """ from typing import TYPE_CHECKING import pytest import cobbler.settings from cobbler.api import CobblerAPI from cobbler.modules.authentication import ldap if TYPE_CHECKING: from pytest_mock import MockerFixtu...
9,654
Python
.py
265
28.516981
96
0.631883
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,028
pre_clear_anamon_logs_test.py
cobbler_cobbler/tests/modules/installation/pre_clear_anamon_logs_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules.installation import pre_clear_anamon_logs def test_register(): # Arrange & Act result = pre_clear_anamon_logs.register() # Assert assert result == "/var/lib/cobbler/triggers/install/pre/*" def test_run(): ...
534
Python
.py
17
27.117647
62
0.701375
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,029
post_report_test.py
cobbler_cobbler/tests/modules/installation/post_report_test.py
from unittest.mock import MagicMock import pytest from cobbler.api import CobblerAPI from cobbler.modules.installation import post_report def test_register(): # Arrange & Act result = post_report.register() # Assert assert result == "/var/lib/cobbler/triggers/install/post/*" @pytest.mark.skip("Ru...
557
Python
.py
19
25.315789
63
0.703214
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,030
post_power_test.py
cobbler_cobbler/tests/modules/installation/post_power_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules.installation import post_power def test_register(): # Arrange & Act result = post_power.register() # Assert assert result == "/var/lib/cobbler/triggers/install/post/*" def test_run(): # Arrange api ...
504
Python
.py
17
25.352941
63
0.699374
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,031
pre_log_test.py
cobbler_cobbler/tests/modules/installation/pre_log_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules.installation import pre_log def test_register(): # Arrange & Act result = pre_log.register() # Assert assert result == "/var/lib/cobbler/triggers/install/pre/*" def test_run(): # Arrange api = Magic...
493
Python
.py
17
24.705882
62
0.683761
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,032
pre_puppet_test.py
cobbler_cobbler/tests/modules/installation/pre_puppet_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules.installation import pre_puppet def test_register(): # Arrange & Act result = pre_puppet.register() # Assert assert result == "/var/lib/cobbler/triggers/install/pre/*" def test_run(): # Arrange api =...
503
Python
.py
17
25.294118
62
0.698745
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,033
post_puppet_test.py
cobbler_cobbler/tests/modules/installation/post_puppet_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules.installation import post_puppet def test_register(): # Arrange & Act result = post_puppet.register() # Assert assert result == "/var/lib/cobbler/triggers/install/post/*" def test_run(): # Arrange ap...
507
Python
.py
17
25.529412
63
0.701245
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,034
post_log_test.py
cobbler_cobbler/tests/modules/installation/post_log_test.py
from unittest.mock import MagicMock from cobbler.api import CobblerAPI from cobbler.modules.installation import post_log def test_register(): # Arrange & Act result = post_log.register() # Assert assert result == "/var/lib/cobbler/triggers/install/post/*" def test_run(): # Arrange api = Ma...
497
Python
.py
17
24.941176
63
0.686441
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,035
mongodb_test.py
cobbler_cobbler/tests/modules/serializer/mongodb_test.py
""" Tests that validate the functionality of the module that is responsible for (de)serializing items to MongoDB. """ import copy from typing import TYPE_CHECKING, Any import pytest from cobbler.api import CobblerAPI from cobbler.cexceptions import CX from cobbler.modules.serializers import mongodb from tests.conft...
4,680
Python
.py
122
33.319672
109
0.707106
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,036
sqlite_test.py
cobbler_cobbler/tests/modules/serializer/sqlite_test.py
""" Tests that validate the functionality of the module that is responsible for (de)serializing items to SQLite. """ import json import os import pathlib from typing import Any, Dict, List, Union from unittest.mock import MagicMock import pytest from pytest_mock import MockerFixture from cobbler.api import CobblerAP...
12,436
Python
.py
350
29.802857
108
0.671297
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,037
file_test.py
cobbler_cobbler/tests/modules/serializer/file_test.py
import json import os import pathlib from typing import Any, Dict, List, Union from unittest.mock import MagicMock import pytest from pytest_mock import MockerFixture from cobbler.api import CobblerAPI from cobbler.cexceptions import CX from cobbler.cobbler_collections.collection import Collection from cobbler.items....
10,101
Python
.py
309
26.634304
99
0.649784
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,038
ownership_test.py
cobbler_cobbler/tests/modules/authorization/ownership_test.py
from cobbler.modules.authorization import ownership def test_register(): # Arrange & Act & Assert assert ownership.register() == "authz"
147
Python
.py
4
33.25
51
0.744681
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,039
configfile_test.py
cobbler_cobbler/tests/modules/authorization/configfile_test.py
from cobbler.modules.authorization import configfile def test_register(): # Arrange & Act & Assert assert configfile.register() == "authz"
149
Python
.py
4
33.75
52
0.748252
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,040
allowall_test.py
cobbler_cobbler/tests/modules/authorization/allowall_test.py
""" Tests that validate the functionality of the module that is responsible for authorization. """ from cobbler.api import CobblerAPI from cobbler.modules.authorization import allowall def test_register(): # Arrange & Act & Assert assert allowall.register() == "authz" def test_authorize(cobbler_api: Cobble...
407
Python
.py
11
34.090909
90
0.754476
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,041
non_object_calls_test.py
cobbler_cobbler/tests/xmlrpcapi/non_object_calls_test.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to non object calls. """ import os import re import time from typing import Any, Callable, Dict, Union import pytest from cobbler.remote import CobblerXMLRPCInterface from tests.conftest import does_not_r...
8,481
Python
.py
232
29.202586
110
0.621347
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,042
conftest.py
cobbler_cobbler/tests/xmlrpcapi/conftest.py
""" Fixtures that are shared by the XML-RPC tests that are in the "xmlrpcapi" module. """ import os import sys from pathlib import Path from typing import Any, Callable, Dict, Tuple, Union import pytest from cobbler.api import CobblerAPI from cobbler.remote import CobblerXMLRPCInterface from cobbler.utils import get...
13,142
Python
.py
342
33.564327
118
0.707379
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,043
system_test.py
cobbler_cobbler/tests/xmlrpcapi/system_test.py
""" Test module that contains all tests that are related to XML-RPC methods that perform actions with a Cobbler system. """ import os from typing import Any, Callable, Union import pytest from cobbler.cexceptions import CX from cobbler.remote import CobblerXMLRPCInterface def test_get_systems(remote: CobblerXMLRPC...
10,334
Python
.py
316
26.867089
115
0.619607
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,044
image_test.py
cobbler_cobbler/tests/xmlrpcapi/image_test.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to images. """ from typing import Callable from cobbler.items.image import Image from cobbler.remote import CobblerXMLRPCInterface class TestImage: """ TODO """ def test_create_image(self...
3,085
Python
.py
105
21.257143
118
0.57747
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,045
distro_test.py
cobbler_cobbler/tests/xmlrpcapi/distro_test.py
import os from typing import Any, Callable import pytest from cobbler import enums from cobbler.api import CobblerAPI from cobbler.cexceptions import CX from cobbler.remote import CobblerXMLRPCInterface @pytest.fixture(autouse=True) def cleanup_create_distro_positive(cobbler_api: CobblerAPI): yield cobbler_...
5,809
Python
.py
176
27.727273
101
0.646996
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,046
input_converters.py
cobbler_cobbler/tests/xmlrpcapi/input_converters.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to input conversion. """ from typing import Any, Dict, List import pytest from cobbler.remote import CobblerXMLRPCInterface from tests.conftest import does_not_raise @pytest.mark.parametrize( "input...
4,499
Python
.py
150
24.393333
110
0.62214
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,047
menu_test.py
cobbler_cobbler/tests/xmlrpcapi/menu_test.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to menus. """ import pytest from cobbler.remote import CobblerXMLRPCInterface @pytest.fixture def create_menu(remote: CobblerXMLRPCInterface, token: str): """ Creates a Menu "testmenu0" with a dis...
4,446
Python
.py
120
29.5
117
0.630719
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,048
item_test.py
cobbler_cobbler/tests/xmlrpcapi/item_test.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to generic items. """ import pytest from cobbler.remote import CobblerXMLRPCInterface @pytest.mark.usefixtures("create_testdistro", "remove_testdistro") def test_get_item_resolved( remote: CobblerXMLR...
1,692
Python
.py
42
36.047619
110
0.704518
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,049
background_test.py
cobbler_cobbler/tests/xmlrpcapi/background_test.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to background tasks. """ import pytest from cobbler.remote import CobblerXMLRPCInterface class TestBackground: """ Class to test various background jobs """ def test_background_acletup(se...
2,071
Python
.py
61
26
110
0.64783
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,050
xapi_test.py
cobbler_cobbler/tests/xmlrpcapi/xapi_test.py
""" All tests that are related to ensuring the xapi_object_edit functionality. """ import os from typing import Callable import pytest from cobbler.remote import CobblerXMLRPCInterface def test_xapi_object_edit( remote: CobblerXMLRPCInterface, token: str, create_kernel_initrd: Callable[[str, str], str]...
8,708
Python
.py
277
24.638989
117
0.60119
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,051
repo_test.py
cobbler_cobbler/tests/xmlrpcapi/repo_test.py
""" Tests that validate the functionality of the module that is responsible for providing XML-RPC calls related to repositories. """ import pytest from cobbler.remote import CobblerXMLRPCInterface @pytest.fixture def create_repo(remote: CobblerXMLRPCInterface, token: str): """ Creates a Repository "testrepo...
4,016
Python
.py
110
29.154545
110
0.631756
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,052
profile_test.py
cobbler_cobbler/tests/xmlrpcapi/profile_test.py
import os from typing import Callable, Union import pytest from cobbler.cexceptions import CX from cobbler.remote import CobblerXMLRPCInterface def test_get_profiles(remote: CobblerXMLRPCInterface, token: str): """ Test: get profiles """ # Arrange --> Nothing to arrange # Act result = remot...
10,036
Python
.py
307
26.830619
101
0.614709
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,053
miscellaneous_test.py
cobbler_cobbler/tests/xmlrpcapi/miscellaneous_test.py
""" Test module to test functions that cannot be grouped into more distinct categories. """ import json import os import pathlib import time from typing import Any, Callable, Dict, List, Union import pytest from cobbler.remote import CobblerXMLRPCInterface from cobbler.utils import get_shared_secret def test_clear...
22,400
Python
.py
572
34.375874
116
0.686034
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,054
security_test.py
cobbler_cobbler/tests/special_cases/security_test.py
""" This test module tries to automatically replicate all security incidents we had in the past and checks if they fail. """ # SPDX-License-Identifier: GPL-2.0-or-later import base64 import crypt import os import subprocess import xmlrpc.client from typing import Any, Callable import pytest from cobbler.api import C...
5,355
Python
.py
124
38.008065
118
0.670579
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,055
conftest.py
cobbler_cobbler/tests/cli/conftest.py
""" TODO """ from typing import Any, Callable, List, Tuple import pytest from cobbler.cli import CobblerCLI from cobbler.utils.process_management import service_restart @pytest.fixture(scope="function", autouse=True) def restart_daemon(): """ Restart cobblerd to re-read all collections after the automatic ...
1,794
Python
.py
50
30.08
84
0.649884
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,056
cobbler_cli_object_test.py
cobbler_cobbler/tests/cli/cobbler_cli_object_test.py
import os import pytest dummy_file_path = "/root/dummy" @pytest.fixture(scope="class") def setup(): """ Initializes testcase """ # create files if necessary if not os.path.exists(dummy_file_path): open(dummy_file_path, "w").close() @pytest.fixture(scope="class") def teardown(): """...
22,174
Python
.py
657
21.517504
87
0.470435
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,057
cobbler_cli_direct_test.py
cobbler_cobbler/tests/cli/cobbler_cli_direct_test.py
import os import re import pytest dummy_file_path = "/root/dummy" @pytest.fixture(scope="function") def get_last_line(): def _get_last_line(lines): i = len(lines) - 1 while lines[i] == "" and i > 0: i -= 1 return lines[i] return _get_last_line @pytest.fixture(scope="fu...
7,397
Python
.py
154
39.980519
83
0.601193
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,058
cli_unit_test.py
cobbler_cobbler/tests/cli/cli_unit_test.py
import optparse import pytest from cobbler import cli @pytest.mark.parametrize("input_data,expected_result", [("", ""), (0, 0), (None, "")]) def test_n2s(input_data, expected_result): # Arrange # Act result = cli.n2s(input_data) # Assert assert result == expected_result @pytest.mark.skip("TOD...
1,570
Python
.py
51
25.529412
86
0.605578
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,059
replicate_test.py
cobbler_cobbler/tests/actions/replicate_test.py
""" Tests for the replicate action of Cobbler. """ from typing import Callable import pytest from pytest_mock import MockerFixture from cobbler.actions import replicate from cobbler.api import CobblerAPI from cobbler.items.distro import Distro @pytest.fixture(scope="function") def replicate_obj(cobbler_api: Cobble...
6,909
Python
.py
181
32.900552
93
0.665371
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,060
sync_test.py
cobbler_cobbler/tests/actions/sync_test.py
""" Tests that validate the functionality of the module that is responsible for synchronizing the different daemons with each other. """ import pytest from cobbler.actions import sync from cobbler.api import CobblerAPI @pytest.mark.skip("TODO") def test_run_sync_systems(cobbler_api: CobblerAPI): # Arrange #...
893
Python
.py
34
22.529412
111
0.710588
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,061
status_test.py
cobbler_cobbler/tests/actions/status_test.py
""" Test module to test the functionallity of generating the installation log summary. """ import pytest from pytest_mock import MockerFixture from cobbler.actions import status from cobbler.actions.status import InstallStatus from cobbler.api import CobblerAPI def test_collect_logfiles(mocker: MockerFixture): ...
4,309
Python
.py
130
28.038462
88
0.674452
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,062
hardlink_test.py
cobbler_cobbler/tests/actions/hardlink_test.py
""" Module to test the "cobbler hardlink" functionallity. """ from typing import List import pytest from pytest_mock import MockerFixture from cobbler.actions import hardlink from cobbler.api import CobblerAPI def test_object_creation(cobbler_api: CobblerAPI): """ Assert that the object can be created with...
3,134
Python
.py
107
20.850467
94
0.56194
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,063
mkloaders_test.py
cobbler_cobbler/tests/actions/mkloaders_test.py
""" Tests that validate the functionality of the module that is responsible for creating the networked bootloaders. """ import pathlib import re import subprocess from typing import TYPE_CHECKING import pytest from cobbler.actions import mkloaders from cobbler.api import CobblerAPI if TYPE_CHECKING: from pytest...
4,274
Python
.py
114
31.877193
111
0.682744
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,064
acl_test.py
cobbler_cobbler/tests/actions/acl_test.py
""" Tests that validate the functionality of the module that is responsible for (de)serializing items to MongoDB. """ from typing import TYPE_CHECKING, Any, List, Optional import pytest from cobbler.actions import acl from cobbler.api import CobblerAPI from cobbler.cexceptions import CX from tests.conftest import d...
3,902
Python
.py
113
27.707965
118
0.605675
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,065
reposync_test.py
cobbler_cobbler/tests/actions/reposync_test.py
""" Tests that validate the functionality of the module that is responsible for repository synchronization. """ import os from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, List, Union import pytest from cobbler import cexceptions, enums from cobbler.actions import reposync from cobbler.api import...
18,420
Python
.py
522
28.153257
117
0.638434
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,066
conftest.py
cobbler_cobbler/tests/actions/buildiso/conftest.py
""" Shared fixture module for buildiso tests. """ import pytest from cobbler.actions import mkloaders from cobbler.api import CobblerAPI @pytest.fixture(scope="function", autouse=True) def create_loaders(cobbler_api: CobblerAPI): """ Fixture to create bootloaders on disk for buildiso tests. """ load...
377
Python
.py
13
26.153846
61
0.766667
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,067
buildiso_test.py
cobbler_cobbler/tests/actions/buildiso/buildiso_test.py
""" Tests that validate the functionality of the module that is responsible for building bootable ISOs. """ import os from typing import Any, Callable, Dict import pytest from cobbler import enums from cobbler.actions import buildiso from cobbler.actions.buildiso import LoaderCfgsParts from cobbler.actions.buildiso....
7,983
Python
.py
212
32.353774
119
0.685552
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,068
append_line_test.py
cobbler_cobbler/tests/actions/buildiso/append_line_test.py
""" TODO """ from typing import Callable import pytest from cobbler import utils from cobbler.actions.buildiso.netboot import AppendLineBuilder from cobbler.api import CobblerAPI from cobbler.items.distro import Distro from cobbler.items.profile import Profile from cobbler.items.system import System def test_init(...
5,994
Python
.py
163
31.932515
100
0.695742
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,069
read_snippet.py
cobbler_cobbler/contrib/api-examples/read_snippet.py
#!/usr/bin/python3 import optparse from xmlrpc.client import ServerProxy p = optparse.OptionParser() p.add_option("-u", "--user", dest="user", default="test") p.add_option("-p", "--pass", dest="password", default="test") sp = ServerProxy("http://127.0.0.1/cobbler_api") (options, args) = p.parse_args() token = sp.log...
407
Python
.py
10
39.3
61
0.725191
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,070
remove_snippet.py
cobbler_cobbler/contrib/api-examples/remove_snippet.py
#!/usr/bin/python3 import optparse from xmlrpc.client import ServerProxy p = optparse.OptionParser() p.add_option("-u", "--user", dest="user", default="test") p.add_option("-p", "--pass", dest="password", default="test") sp = ServerProxy("http://127.0.0.1/cobbler_api") (options, args) = p.parse_args() token = sp.log...
409
Python
.py
10
39.5
61
0.726582
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,071
demo_connect.py
cobbler_cobbler/contrib/api-examples/demo_connect.py
#!/usr/bin/python3 """ Copyright 2007-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at y...
1,540
Python
.py
33
43.848485
68
0.733155
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,072
API_test.py
cobbler_cobbler/contrib/api-examples/API_test.py
#!/usr/bin/python3 import xmlrpc.client server = xmlrpc.client.Server("http://127.0.0.1/cobbler_api") print(server.get_distros()) print(server.get_profiles()) print(server.get_systems()) print(server.get_images()) print(server.get_repos())
242
Python
.py
8
29
61
0.767241
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,073
create_snippet.py
cobbler_cobbler/contrib/api-examples/create_snippet.py
#!/usr/bin/python3 import optparse from xmlrpc.client import ServerProxy p = optparse.OptionParser() p.add_option("-u", "--user", dest="user", default="test") p.add_option("-p", "--pass", dest="password", default="test") sp = ServerProxy("http://127.0.0.1/cobbler_api") (options, args) = p.parse_args() token = sp.log...
426
Python
.py
10
41.2
69
0.723301
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,074
serializer.py
cobbler_cobbler/cobbler/serializer.py
""" Serializer code 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 fcntl import logging import os import pathlib import sys import time from types import Module...
5,528
Python
.py
125
35.344
118
0.639829
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,075
decorator.py
cobbler_cobbler/cobbler/decorator.py
""" This module provides decorators that are required for Cobbler to work as expected. """ # The idea for the subclassed property decorators is from: https://stackoverflow.com/a/59313599/4730773 from typing import Any, Optional from cobbler.items.abstract import base_item class LazyProperty(property): """ ...
1,298
Python
.py
32
33.96875
105
0.688446
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,076
enums.py
cobbler_cobbler/cobbler/enums.py
""" This module is responsible for containing all enums we use in Cobbler. It should not be dependent upon any other module except the Python standard library. """ import enum from typing import TypeVar, Union VALUE_INHERITED = "<<inherit>>" VALUE_NONE = "none" CONVERTABLEENUM = TypeVar("CONVERTABLEENUM", bound="Conv...
6,288
Python
.py
224
22.227679
120
0.623275
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,077
autoinstallgen.py
cobbler_cobbler/cobbler/autoinstallgen.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 xml.dom.minidom from t...
17,935
Python
.py
339
41.775811
118
0.627453
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,078
cexceptions.py
cobbler_cobbler/cobbler/cexceptions.py
""" Custom exceptions for Cobbler """ from typing import Any, Iterable # 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> class CobblerException(Exception): """ This is the defa...
1,566
Python
.py
34
38.970588
120
0.675214
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,079
grub.py
cobbler_cobbler/cobbler/grub.py
""" Module that contains GRUB related helper functionality. """ import logging from typing import Optional import netaddr # type: ignore def parse_grub_remote_file(file_location: str) -> Optional[str]: """ Parses a URI which grub would try to load from the network. :param file_location: The location w...
1,796
Python
.py
40
38.125
112
0.652373
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,080
download_manager.py
cobbler_cobbler/cobbler/download_manager.py
""" Cobbler DownloadManager """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Copyright 2018, Jorgen Maas <jorgen.maas@gmail.com import logging from typing import TYPE_CHECKING, Any, Optional, Tuple, Union import requests import yaml if TYPE_CHECKING: from requests import Response clas...
1,659
Python
.py
49
26.204082
93
0.613125
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,081
cli.py
cobbler_cobbler/cobbler/cli.py
""" Command line interface 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 optparse import os import sys import time import traceback import xmlrpc.client from ...
74,079
Python
.py
2,385
21.590776
119
0.509626
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,082
api.py
cobbler_cobbler/cobbler/api.py
""" This module represents the Cobbler Python API. It is used by the XML-RPC API and can be used by external consumers. Changelog: Schema: From -> To Current Schema: Please refer to the documentation visible of the individual methods. V3.4.0 (unreleased) * Added: * ``clean_items_cache`` * ``new_...
93,550
Python
.py
2,056
35.715467
120
0.591058
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,083
configgen.py
cobbler_cobbler/cobbler/configgen.py
""" configgen.py: Generate configuration data. module for generating configuration manifest using autoinstall_meta data and templates for a given system (hostname) """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Copyright 2010 Kelsey Hightower <kelsey.hightower@gmail.com> import json import...
4,361
Python
.py
84
44.333333
119
0.631171
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,084
module_loader.py
cobbler_cobbler/cobbler/module_loader.py
""" Module loader, adapted for Cobbler usage """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others # SPDX-FileCopyrightText: Adrian Likins <alikins@redhat.com> # SPDX-FileCopyrightText: Michael DeHaan <michael.dehaan AT gmail> import glob import logging...
7,152
Python
.py
157
35.840764
120
0.616975
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,085
templar.py
cobbler_cobbler/cobbler/templar.py
""" Cobbler uses Cheetah templates for lots of stuff, but there's some additional magic around that to deal with snippets/etc. (And it's not spelled wrong!) """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Copyright 2006-2009, Red Hat, Inc and Others # SPDX-FileCopyrightText: Michael DeHaan <m...
10,389
Python
.py
205
40.131707
120
0.619738
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,086
__init__.py
cobbler_cobbler/cobbler/__init__.py
""" This is the main Cobbler module. It contains all code related to the Cobbler server and the CLI. External applications should only make use of the ``cobbler.api`` module. """
179
Python
.py
4
43.75
96
0.771429
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,087
power_manager.py
cobbler_cobbler/cobbler/power_manager.py
""" Power management library. Encapsulate the logic to run power management commands so that the Cobbler user does not have to remember different power management tools syntaxes. This makes rebooting a system for OS installation much easier. """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Co...
11,438
Python
.py
271
32.376384
167
0.606153
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,088
tftpgen.py
cobbler_cobbler/cobbler/tftpgen.py
""" Generate files provided by TFTP server based on Cobbler 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 logging impo...
87,991
Python
.py
1,853
34.541284
120
0.568275
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,089
cobblerd.py
cobbler_cobbler/cobbler/cobblerd.py
""" Cobbler daemon for logging remote syslog traffic during automatic installation """ # 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 binascii import logging import logging.con...
2,969
Python
.py
77
33.168831
119
0.687805
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,090
validate.py
cobbler_cobbler/cobbler/validate.py
""" Cobbler module that is related to validating data for other internal Cobbler modules. """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Copyright 2014-2015. Jorgen Maas <jorgen.maas@gmail.com> import re import shlex from ipaddress import AddressValueError, NetmaskValueError from typing imp...
22,316
Python
.py
516
36.846899
120
0.661886
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,091
autoinstall_manager.py
cobbler_cobbler/cobbler/autoinstall_manager.py
""" This module contains code in order to create the automatic installation files. For example kickstarts, autoyast files or preseed files. """ import logging import os from typing import TYPE_CHECKING, Any, List, Optional from cobbler import autoinstallgen, utils from cobbler.utils import filesystem_helpers if TYPE...
14,377
Python
.py
309
36.132686
120
0.626599
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,092
remote.py
cobbler_cobbler/cobbler/remote.py
""" This module contains all code related to the Cobbler XML-RPC API. Changelog: Schema: From -> To Current Schema: Please refer to the documentation visible of the individual methods. V3.4.0 (unreleased) * Added: * ``set_item_resolved_value`` * ``input_string_or_list_no_inherit`` * ``in...
163,035
Python
.py
3,470
36.787032
120
0.606084
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,093
yumgen.py
cobbler_cobbler/cobbler/yumgen.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 pathlib from typing im...
2,839
Python
.py
66
33.560606
116
0.617786
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,094
template_api.py
cobbler_cobbler/cobbler/template_api.py
""" Cobbler provides builtin methods for use in Cheetah templates. $SNIPPET is one such function and is now used to implement Cobbler's SNIPPET:: syntax. """ # SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: Written by Daniel Guernsey <danpg102@gmail.com> # SPDX-FileCopyrightText: Contributions by ...
10,655
Python
.py
197
43.736041
120
0.636538
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,095
services.py
cobbler_cobbler/cobbler/services.py
""" Mod Python service functions for Cobbler's public interface (aka cool stuff that works with wget/curl) Changelog: Schema: From -> To Current Schema: Please refer to the documentation visible of the individual methods. V3.4.0 (unreleased) * No changes V3.3.4 (unreleased) * No changes V3.3.3 * Remov...
19,936
Python
.py
500
31.218
120
0.604281
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,096
profile.py
cobbler_cobbler/cobbler/items/profile.py
""" Cobbler module that contains the code for a Cobbler profile 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 t...
35,220
Python
.py
774
36.897933
120
0.619359
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,097
network_interface.py
cobbler_cobbler/cobbler/items/network_interface.py
""" All code belonging to network interfaces Changelog (NetworkInterface): V3.4.0 (unreleased): * Changes: * Constructor: ``kwargs`` can now be used to seed the item during creation. * ``virt_type``: str - Inheritable; One of "qemu", "kvm", "xenpv", "xenfv", "vmware", "vmwarew", "openvz" or ...
29,980
Python
.py
783
28.37037
120
0.576985
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,098
repo.py
cobbler_cobbler/cobbler/items/repo.py
""" Cobbler module that contains the code for a Cobbler repo object. Changelog: V3.4.0 (unreleased): * Changed: * Constructor: ``kwargs`` can now be used to seed the item during creation. * ``children``: The property was moved to the base class. * ``from_dict()``: The method was moved to t...
21,537
Python
.py
512
33.433594
120
0.612809
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)
12,099
__init__.py
cobbler_cobbler/cobbler/items/__init__.py
""" This package contains all data storage classes. The classes are responsible for ensuring that types of the properties are correct but not for logical checks. The classes should be as stupid as possible. Further they are responsible for returning the logic for serializing and deserializing themselves. Cobbler has a...
665
Python
.py
8
82
120
0.801829
cobbler/cobbler
2,597
653
318
GPL-2.0
9/5/2024, 5:11:26 PM (Europe/Amsterdam)