testcloud 0.11.3__tar.gz → 0.11.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {testcloud-0.11.3/testcloud.egg-info → testcloud-0.11.5}/PKG-INFO +21 -3
- {testcloud-0.11.3 → testcloud-0.11.5}/README.md +20 -2
- {testcloud-0.11.3 → testcloud-0.11.5}/docs/source/conf.py +1 -1
- {testcloud-0.11.3 → testcloud-0.11.5}/test/test_config.py +15 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/test/test_image.py +15 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/test/test_instance.py +16 -2
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/__init__.py +1 -1
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/config.py +1 -1
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/ubuntu.py +1 -1
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/instance.py +3 -3
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/util.py +2 -2
- {testcloud-0.11.3 → testcloud-0.11.5/testcloud.egg-info}/PKG-INFO +21 -3
- {testcloud-0.11.3 → testcloud-0.11.5}/tox.ini +1 -1
- {testcloud-0.11.3 → testcloud-0.11.5}/.gitignore +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/LICENSE +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/conf/99-testcloud-nonroot-libvirt-access.rules +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/conf/settings-example.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/conf/testcloud +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/docs/LICENSE +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/docs/Makefile +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/docs/source/api.rst +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/docs/source/indepth.rst +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/docs/source/index.rst +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/manpages/testcloud.1 +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/pyproject.toml +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/requirements.txt +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/run_testcloud.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/setup.cfg +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/setup.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/test/__init__.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/test/test_cli.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/cli.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/__init__.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/alma.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/centos.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/debian.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/fedora.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/misc.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/oracle.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/distro_utils/rocky.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/domain_configuration.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/exceptions.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/image.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/sql.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud/workarounds.py +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud.egg-info/SOURCES.txt +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud.egg-info/dependency_links.txt +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud.egg-info/entry_points.txt +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud.egg-info/requires.txt +0 -0
- {testcloud-0.11.3 → testcloud-0.11.5}/testcloud.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: testcloud
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.5
|
|
4
4
|
Summary: A tool to download and boot cloud images locally, with an easy to use API.
|
|
5
5
|
Home-page: https://pagure.io/testcloud
|
|
6
6
|
Author: Mike Ruckman
|
|
@@ -433,10 +433,28 @@ tox
|
|
|
433
433
|
|
|
434
434
|
This is a good place to contribute if you\'re looking to help out.
|
|
435
435
|
|
|
436
|
+
### Releasing
|
|
437
|
+
|
|
438
|
+
Testcloud is being released to all stable Fedora releases, EPEL branches, and PyPi.
|
|
439
|
+
The release process can be summed up to these steps:
|
|
440
|
+
|
|
441
|
+
1. A batch of changes has accumulated
|
|
442
|
+
2. Testsuite sanity is verified (via either tox or pytest)
|
|
443
|
+
3. Documentation is verified up-to-date (README.md, docs/, manpages/)
|
|
444
|
+
4. Compatibility with tmt is verified
|
|
445
|
+
5. `__version__` is updated in `testcloud/__init__.py`, `version` is updated in `docs/source/conf.py`
|
|
446
|
+
6. Version bumps are commited, pushed, a new tag is pushed to this repository
|
|
447
|
+
7. A new version is uploaded on PyPi:
|
|
448
|
+
```
|
|
449
|
+
python3 setup.py sdist bdist_wheel && twine upload dist/*
|
|
450
|
+
```
|
|
451
|
+
8. Resulting .tar.gz is copied to the dist-git, and build are submitted to all of the stable Fedoras and EPELs
|
|
452
|
+
9. New bodhi builds are queued into the -testing repositories
|
|
453
|
+
|
|
436
454
|
### Issue Tracking and Roadmap
|
|
437
455
|
|
|
438
|
-
Our project tracker is on the
|
|
439
|
-
[
|
|
456
|
+
Our project tracker is on the teemtee
|
|
457
|
+
[GitHub](https://github.com/teemtee/testcloud) instance.
|
|
440
458
|
|
|
441
459
|
### Credit
|
|
442
460
|
|
|
@@ -416,10 +416,28 @@ tox
|
|
|
416
416
|
|
|
417
417
|
This is a good place to contribute if you\'re looking to help out.
|
|
418
418
|
|
|
419
|
+
### Releasing
|
|
420
|
+
|
|
421
|
+
Testcloud is being released to all stable Fedora releases, EPEL branches, and PyPi.
|
|
422
|
+
The release process can be summed up to these steps:
|
|
423
|
+
|
|
424
|
+
1. A batch of changes has accumulated
|
|
425
|
+
2. Testsuite sanity is verified (via either tox or pytest)
|
|
426
|
+
3. Documentation is verified up-to-date (README.md, docs/, manpages/)
|
|
427
|
+
4. Compatibility with tmt is verified
|
|
428
|
+
5. `__version__` is updated in `testcloud/__init__.py`, `version` is updated in `docs/source/conf.py`
|
|
429
|
+
6. Version bumps are commited, pushed, a new tag is pushed to this repository
|
|
430
|
+
7. A new version is uploaded on PyPi:
|
|
431
|
+
```
|
|
432
|
+
python3 setup.py sdist bdist_wheel && twine upload dist/*
|
|
433
|
+
```
|
|
434
|
+
8. Resulting .tar.gz is copied to the dist-git, and build are submitted to all of the stable Fedoras and EPELs
|
|
435
|
+
9. New bodhi builds are queued into the -testing repositories
|
|
436
|
+
|
|
419
437
|
### Issue Tracking and Roadmap
|
|
420
438
|
|
|
421
|
-
Our project tracker is on the
|
|
422
|
-
[
|
|
439
|
+
Our project tracker is on the teemtee
|
|
440
|
+
[GitHub](https://github.com/teemtee/testcloud) instance.
|
|
423
441
|
|
|
424
442
|
### Credit
|
|
425
443
|
|
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
# License: GPL-2.0+ <http://spdx.org/licenses/GPL-2.0+>
|
|
4
4
|
# See the LICENSE file for more details on Licensing
|
|
5
5
|
|
|
6
|
+
from unittest.mock import patch
|
|
7
|
+
|
|
8
|
+
import peewee as pw
|
|
9
|
+
|
|
6
10
|
from testcloud import config
|
|
11
|
+
from testcloud.sql import DBImage, DB
|
|
7
12
|
|
|
13
|
+
DB = pw.SqliteDatabase(":memory:")
|
|
8
14
|
|
|
9
15
|
REF_DATA_DIR = "/some/random/dir/for/testing/"
|
|
10
16
|
REF_STORE_DIR = "/some/random/dir/for/testing/backingstore/"
|
|
@@ -16,6 +22,15 @@ STORE_DIR = "{}/backingstores"
|
|
|
16
22
|
class TestConfig(object):
|
|
17
23
|
def setup_method(self, method):
|
|
18
24
|
config._config = None
|
|
25
|
+
DB.bind([DBImage], bind_refs=False, bind_backrefs=False)
|
|
26
|
+
DB.connect()
|
|
27
|
+
DB.create_tables([DBImage])
|
|
28
|
+
self.patcher = patch('testcloud.sql.data_dir_changed', return_value=None)
|
|
29
|
+
self.mocked_method = self.patcher.start()
|
|
30
|
+
|
|
31
|
+
def teardown_method(self, method):
|
|
32
|
+
DB.drop_tables([DBImage])
|
|
33
|
+
DB.close()
|
|
19
34
|
|
|
20
35
|
def test_get_config_object(self, monkeypatch):
|
|
21
36
|
"""Simple test to grab a config object, will return default config
|
|
@@ -5,11 +5,16 @@
|
|
|
5
5
|
|
|
6
6
|
""" This module is for testing the behaviour of the Image class."""
|
|
7
7
|
|
|
8
|
+
from unittest.mock import patch
|
|
9
|
+
|
|
8
10
|
import pytest
|
|
11
|
+
import peewee as pw
|
|
9
12
|
|
|
10
13
|
from testcloud import image
|
|
11
14
|
from testcloud import exceptions
|
|
15
|
+
from testcloud.sql import DBImage, DB
|
|
12
16
|
|
|
17
|
+
DB = pw.SqliteDatabase(":memory:")
|
|
13
18
|
|
|
14
19
|
class TestImage:
|
|
15
20
|
|
|
@@ -40,6 +45,16 @@ class TestImageUriProcess(object):
|
|
|
40
45
|
self.image_name = "image.img"
|
|
41
46
|
self.len_data = 3
|
|
42
47
|
|
|
48
|
+
DB.bind([DBImage], bind_refs=False, bind_backrefs=False)
|
|
49
|
+
DB.connect()
|
|
50
|
+
DB.create_tables([DBImage])
|
|
51
|
+
self.patcher = patch('testcloud.sql.data_dir_changed', return_value=None)
|
|
52
|
+
self.mocked_method = self.patcher.start()
|
|
53
|
+
|
|
54
|
+
def teardown_method(self, method):
|
|
55
|
+
DB.drop_tables([DBImage])
|
|
56
|
+
DB.close()
|
|
57
|
+
|
|
43
58
|
def test_http_ur1(self):
|
|
44
59
|
ref_type = "http"
|
|
45
60
|
ref_path = "localhost/images/{}".format(self.image_name)
|
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
""" This module is for testing the behaviour of the Image class."""
|
|
7
7
|
|
|
8
|
+
from unittest import mock
|
|
9
|
+
from unittest.mock import patch
|
|
10
|
+
|
|
8
11
|
import os
|
|
12
|
+
import peewee as pw
|
|
9
13
|
|
|
10
|
-
from unittest import mock
|
|
11
14
|
|
|
12
|
-
from testcloud import instance, image, config
|
|
15
|
+
from testcloud import instance, image, config
|
|
16
|
+
from testcloud.sql import DBImage, DB
|
|
13
17
|
|
|
18
|
+
DB = pw.SqliteDatabase(":memory:")
|
|
14
19
|
|
|
15
20
|
class dotdict(dict):
|
|
16
21
|
# https://stackoverflow.com/a/23689767
|
|
@@ -45,6 +50,15 @@ class TestFindInstance(object):
|
|
|
45
50
|
|
|
46
51
|
def setup_method(self, method):
|
|
47
52
|
self.conf = config.ConfigData()
|
|
53
|
+
DB.bind([DBImage], bind_refs=False, bind_backrefs=False)
|
|
54
|
+
DB.connect()
|
|
55
|
+
DB.create_tables([DBImage])
|
|
56
|
+
self.patcher = patch('testcloud.sql.data_dir_changed', return_value=None)
|
|
57
|
+
self.mocked_method = self.patcher.start()
|
|
58
|
+
|
|
59
|
+
def teardown_method(self, method):
|
|
60
|
+
DB.drop_tables([DBImage])
|
|
61
|
+
DB.close()
|
|
48
62
|
|
|
49
63
|
def test_non_existant_instance(self, monkeypatch):
|
|
50
64
|
ref_name = "test-123"
|
|
@@ -237,7 +237,7 @@ storage:
|
|
|
237
237
|
CENTOS_STREAM_VERSIONS = {
|
|
238
238
|
"8": "https://cloud.centos.org/centos/8-stream/{0}/images/CentOS-Stream-GenericCloud-8-20240603.0.{0}.qcow2",
|
|
239
239
|
"9": "https://cloud.centos.org/centos/9-stream/{0}/images/CentOS-Stream-GenericCloud-9-20240715.0.{0}.qcow2",
|
|
240
|
-
"10": "https://odcs.stream.centos.org/stream-10/production/CentOS-Stream-10-
|
|
240
|
+
"10": "https://odcs.stream.centos.org/stream-10/production/CentOS-Stream-10-20250217.0/compose/BaseOS/{0}/images/CentOS-Stream-GenericCloud-10-20250217.0.{0}.qcow2",
|
|
241
241
|
"latest": "9",
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -24,7 +24,7 @@ def get_ubuntu_releases() -> dict:
|
|
|
24
24
|
raise exceptions.TestcloudImageError
|
|
25
25
|
|
|
26
26
|
return {
|
|
27
|
-
"latest": [entry["name"] for entry in releases_resp["entries"] if entry["active"] and "
|
|
27
|
+
"latest": [entry["name"] for entry in releases_resp["entries"] if entry["active"] and "Current Stable Release" in entry["status"]][0],
|
|
28
28
|
"entries": [entry["name"] for entry in releases_resp["entries"] if entry["active"] and float(entry["version"]) >= 20],
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -339,13 +339,13 @@ class Instance(object):
|
|
|
339
339
|
self.workarounds.add_condition(
|
|
340
340
|
'[ ! -f /etc/systemd/system/testcloud.service ]',
|
|
341
341
|
[
|
|
342
|
-
'echo "{0}" >> /
|
|
343
|
-
'chmod +x /
|
|
342
|
+
'echo "{0}" >> /etc/testcloud-guest.sh'.format(simple_http_start_guest),
|
|
343
|
+
'chmod +x /etc/testcloud-guest.sh',
|
|
344
344
|
'echo "[Unit]" >> /etc/systemd/system/testcloud.service',
|
|
345
345
|
'echo "Description=Testcloud guest integration" >> /etc/systemd/system/testcloud.service',
|
|
346
346
|
'echo "After=cloud-init.service" >> /etc/systemd/system/testcloud.service',
|
|
347
347
|
'echo "[Service]" >> /etc/systemd/system/testcloud.service',
|
|
348
|
-
'echo "ExecStart=/bin/bash /
|
|
348
|
+
'echo "ExecStart=/bin/bash /etc/testcloud-guest.sh" >> /etc/systemd/system/testcloud.service',
|
|
349
349
|
'echo "[Install]" >> /etc/systemd/system/testcloud.service',
|
|
350
350
|
'echo "WantedBy=multi-user.target" >> /etc/systemd/system/testcloud.service',
|
|
351
351
|
'systemctl daemon-reload',
|
|
@@ -138,7 +138,7 @@ def get_image_url(distro_str: str, arch="x86_64", verify=False, additional_handl
|
|
|
138
138
|
"centos-stream": {"re": r"^c(entos-stream)?(-|:)?(\d+)?$", "fn": get_centos_stream_image_url},
|
|
139
139
|
"coreos": {"re": r"^co(reos)?(-|:)?(%s)?$" % COREOS, "fn": get_coreos_image_url},
|
|
140
140
|
"centos": {"re": r"^c(entos)?(-|:)?(\d+)?$", "fn": get_centos_image_url},
|
|
141
|
-
"ubuntu": {"re": r"^u(buntu)?(
|
|
141
|
+
"ubuntu": {"re": r"^u(buntu)?([:-]([a-z]+|\d+))?$", "fn": get_ubuntu_image_url},
|
|
142
142
|
"debian": {"re": r"^d(ebian)?(-|:)?(\d+)?$", "fn": get_debian_image_url},
|
|
143
143
|
"alma": {"re": r"^a(lma)?(-|:)?(\d+)?$", "fn": get_alma_image_url},
|
|
144
144
|
"rocky": {"re": r"^r(ocky)?(-|:)?(\d+)?$", "fn": get_rocky_image_url},
|
|
@@ -158,7 +158,7 @@ def get_image_url(distro_str: str, arch="x86_64", verify=False, additional_handl
|
|
|
158
158
|
if match:
|
|
159
159
|
return (verify_url if verify else lambda x: x)(distro["fn"](version=match.group(3) or "latest", arch=arch))
|
|
160
160
|
|
|
161
|
-
log.error("Invalid url handle (distro or distro
|
|
161
|
+
log.error("Invalid url handle (distro or distro{-,:}version) passed, supported handles are: %s" % HELP_LIST)
|
|
162
162
|
raise exceptions.TestcloudImageError
|
|
163
163
|
|
|
164
164
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: testcloud
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.5
|
|
4
4
|
Summary: A tool to download and boot cloud images locally, with an easy to use API.
|
|
5
5
|
Home-page: https://pagure.io/testcloud
|
|
6
6
|
Author: Mike Ruckman
|
|
@@ -433,10 +433,28 @@ tox
|
|
|
433
433
|
|
|
434
434
|
This is a good place to contribute if you\'re looking to help out.
|
|
435
435
|
|
|
436
|
+
### Releasing
|
|
437
|
+
|
|
438
|
+
Testcloud is being released to all stable Fedora releases, EPEL branches, and PyPi.
|
|
439
|
+
The release process can be summed up to these steps:
|
|
440
|
+
|
|
441
|
+
1. A batch of changes has accumulated
|
|
442
|
+
2. Testsuite sanity is verified (via either tox or pytest)
|
|
443
|
+
3. Documentation is verified up-to-date (README.md, docs/, manpages/)
|
|
444
|
+
4. Compatibility with tmt is verified
|
|
445
|
+
5. `__version__` is updated in `testcloud/__init__.py`, `version` is updated in `docs/source/conf.py`
|
|
446
|
+
6. Version bumps are commited, pushed, a new tag is pushed to this repository
|
|
447
|
+
7. A new version is uploaded on PyPi:
|
|
448
|
+
```
|
|
449
|
+
python3 setup.py sdist bdist_wheel && twine upload dist/*
|
|
450
|
+
```
|
|
451
|
+
8. Resulting .tar.gz is copied to the dist-git, and build are submitted to all of the stable Fedoras and EPELs
|
|
452
|
+
9. New bodhi builds are queued into the -testing repositories
|
|
453
|
+
|
|
436
454
|
### Issue Tracking and Roadmap
|
|
437
455
|
|
|
438
|
-
Our project tracker is on the
|
|
439
|
-
[
|
|
456
|
+
Our project tracker is on the teemtee
|
|
457
|
+
[GitHub](https://github.com/teemtee/testcloud) instance.
|
|
440
458
|
|
|
441
459
|
### Credit
|
|
442
460
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|