testcloud 0.11.7__tar.gz → 0.11.8__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.
Files changed (50) hide show
  1. {testcloud-0.11.7/testcloud.egg-info → testcloud-0.11.8}/PKG-INFO +1 -1
  2. {testcloud-0.11.7 → testcloud-0.11.8}/docs/source/conf.py +1 -1
  3. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/__init__.py +1 -1
  4. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/cli.py +12 -0
  5. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/centos.py +1 -2
  6. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/instance.py +2 -2
  7. {testcloud-0.11.7 → testcloud-0.11.8/testcloud.egg-info}/PKG-INFO +1 -1
  8. {testcloud-0.11.7 → testcloud-0.11.8}/.gitignore +0 -0
  9. {testcloud-0.11.7 → testcloud-0.11.8}/LICENSE +0 -0
  10. {testcloud-0.11.7 → testcloud-0.11.8}/README.md +0 -0
  11. {testcloud-0.11.7 → testcloud-0.11.8}/conf/99-testcloud-nonroot-libvirt-access.rules +0 -0
  12. {testcloud-0.11.7 → testcloud-0.11.8}/conf/settings-example.py +0 -0
  13. {testcloud-0.11.7 → testcloud-0.11.8}/conf/testcloud +0 -0
  14. {testcloud-0.11.7 → testcloud-0.11.8}/docs/LICENSE +0 -0
  15. {testcloud-0.11.7 → testcloud-0.11.8}/docs/Makefile +0 -0
  16. {testcloud-0.11.7 → testcloud-0.11.8}/docs/source/api.rst +0 -0
  17. {testcloud-0.11.7 → testcloud-0.11.8}/docs/source/indepth.rst +0 -0
  18. {testcloud-0.11.7 → testcloud-0.11.8}/docs/source/index.rst +0 -0
  19. {testcloud-0.11.7 → testcloud-0.11.8}/manpages/testcloud.1 +0 -0
  20. {testcloud-0.11.7 → testcloud-0.11.8}/pyproject.toml +0 -0
  21. {testcloud-0.11.7 → testcloud-0.11.8}/requirements.txt +0 -0
  22. {testcloud-0.11.7 → testcloud-0.11.8}/run_testcloud.py +0 -0
  23. {testcloud-0.11.7 → testcloud-0.11.8}/setup.cfg +0 -0
  24. {testcloud-0.11.7 → testcloud-0.11.8}/setup.py +0 -0
  25. {testcloud-0.11.7 → testcloud-0.11.8}/test/__init__.py +0 -0
  26. {testcloud-0.11.7 → testcloud-0.11.8}/test/test_cli.py +0 -0
  27. {testcloud-0.11.7 → testcloud-0.11.8}/test/test_config.py +0 -0
  28. {testcloud-0.11.7 → testcloud-0.11.8}/test/test_image.py +0 -0
  29. {testcloud-0.11.7 → testcloud-0.11.8}/test/test_instance.py +0 -0
  30. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/config.py +0 -0
  31. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/__init__.py +0 -0
  32. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/alma.py +0 -0
  33. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/debian.py +0 -0
  34. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/fedora.py +0 -0
  35. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/misc.py +0 -0
  36. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/oracle.py +0 -0
  37. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/rocky.py +0 -0
  38. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/distro_utils/ubuntu.py +0 -0
  39. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/domain_configuration.py +0 -0
  40. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/exceptions.py +0 -0
  41. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/image.py +0 -0
  42. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/sql.py +0 -0
  43. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/util.py +0 -0
  44. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud/workarounds.py +0 -0
  45. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud.egg-info/SOURCES.txt +0 -0
  46. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud.egg-info/dependency_links.txt +0 -0
  47. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud.egg-info/entry_points.txt +0 -0
  48. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud.egg-info/requires.txt +0 -0
  49. {testcloud-0.11.7 → testcloud-0.11.8}/testcloud.egg-info/top_level.txt +0 -0
  50. {testcloud-0.11.7 → testcloud-0.11.8}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testcloud
3
- Version: 0.11.7
3
+ Version: 0.11.8
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
@@ -55,7 +55,7 @@ copyright = "2016-2024, testCloud devs"
55
55
  # built documents.
56
56
  #
57
57
  # The short X.Y version.
58
- version = "0.11.7"
58
+ version = "0.11.8"
59
59
  # The full version, including alpha/beta/rc tags.
60
60
  release = version
61
61
 
@@ -1,5 +1,5 @@
1
1
  # NOTE: if you update version, *make sure* to also update `docs/source/conf.py`
2
- __version__ = "0.11.7"
2
+ __version__ = "0.11.8"
3
3
 
4
4
  import signal
5
5
  import sys
@@ -646,6 +646,17 @@ def _remove_image(args):
646
646
  tc_image.remove()
647
647
 
648
648
 
649
+ class QEMUConnectionAction(argparse.Action):
650
+ def __call__(self, parser, namespace, values, option_string=None):
651
+ if values in ("qemu:///session", "qemu:///system"):
652
+ full_value = values
653
+ elif values in ("session", "system"):
654
+ full_value = f"qemu:///{values}"
655
+ else:
656
+ parser.error(f"Invalid connection type: {values}. Expected 'session', 'system', 'qemu:///session' or 'qemu:///system'")
657
+ setattr(namespace, self.dest, full_value)
658
+
659
+
649
660
  def get_argparser():
650
661
  parser = argparse.ArgumentParser(description=description)
651
662
  subparsers = parser.add_subparsers(
@@ -659,6 +670,7 @@ def get_argparser():
659
670
  "--connection",
660
671
  default="qemu:///system",
661
672
  help="libvirt connection url to use",
673
+ action=QEMUConnectionAction
662
674
  )
663
675
 
664
676
  # instance list
@@ -28,8 +28,7 @@ def _get_centos_image_url(version: str, stream: bool, arch: str) -> str:
28
28
  version = config_data.CENTOS_STREAM_VERSIONS["latest"]
29
29
 
30
30
  # Try to dynamically get the latest at first
31
- else:
32
- STREAM_URL_PREFIX = config_data.CENTOS_STREAM_URL_PREFIX.format(version, arch)
31
+ STREAM_URL_PREFIX = config_data.CENTOS_STREAM_URL_PREFIX.format(version, arch)
33
32
  IMG_NAME = r"CentOS-Stream-GenericCloud-{0}-[0-9.]+.{1}.qcow2".format(version, arch)
34
33
  try:
35
34
  return parse_latest_qcow(IMG_NAME, STREAM_URL_PREFIX)
@@ -306,8 +306,8 @@ class Instance(object):
306
306
  log.debug("Successfuly modified ACL of {}".format(console_log_real_path))
307
307
  else:
308
308
  log.error("Error modifying ACL of {}".format(console_log_real_path))
309
- except PermissionError:
310
- raise TestcloudPermissionsError
309
+ except PermissionError as error:
310
+ raise TestcloudPermissionsError from error
311
311
  if not self.coreos:
312
312
  self._create_user_data(password=config_data.PASSWORD, user_data_tpl=data_tpl)
313
313
  self._create_meta_data(self.hostname)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testcloud
3
- Version: 0.11.7
3
+ Version: 0.11.8
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
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