testcloud 0.9.13__tar.gz → 0.11.0__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 (57) hide show
  1. {testcloud-0.9.13 → testcloud-0.11.0}/.gitignore +1 -0
  2. {testcloud-0.9.13/testcloud.egg-info → testcloud-0.11.0}/PKG-INFO +3 -3
  3. {testcloud-0.9.13 → testcloud-0.11.0}/README.md +1 -1
  4. {testcloud-0.9.13 → testcloud-0.11.0}/conf/settings-example.py +2 -0
  5. testcloud-0.11.0/conf/testcloud +90 -0
  6. {testcloud-0.9.13 → testcloud-0.11.0}/docs/source/conf.py +64 -72
  7. testcloud-0.11.0/manpages/testcloud.1 +170 -0
  8. testcloud-0.11.0/pyproject.toml +2 -0
  9. {testcloud-0.9.13 → testcloud-0.11.0}/requirements.txt +1 -1
  10. {testcloud-0.9.13 → testcloud-0.11.0}/run_testcloud.py +1 -1
  11. testcloud-0.11.0/setup.py +72 -0
  12. {testcloud-0.9.13 → testcloud-0.11.0}/test/test_config.py +20 -20
  13. testcloud-0.11.0/test/test_image.py +144 -0
  14. {testcloud-0.9.13 → testcloud-0.11.0}/test/test_instance.py +10 -9
  15. testcloud-0.11.0/testcloud/__init__.py +17 -0
  16. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/cli.py +307 -236
  17. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/config.py +58 -57
  18. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/alma.py +5 -4
  19. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/centos.py +12 -7
  20. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/debian.py +13 -6
  21. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/fedora.py +22 -18
  22. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/misc.py +6 -4
  23. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/oracle.py +4 -3
  24. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/rocky.py +5 -4
  25. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/ubuntu.py +7 -6
  26. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/domain_configuration.py +94 -53
  27. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/exceptions.py +7 -0
  28. testcloud-0.11.0/testcloud/image.py +427 -0
  29. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/instance.py +193 -142
  30. testcloud-0.11.0/testcloud/sql.py +55 -0
  31. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/util.py +37 -34
  32. testcloud-0.11.0/testcloud/workarounds.py +88 -0
  33. {testcloud-0.9.13 → testcloud-0.11.0/testcloud.egg-info}/PKG-INFO +3 -3
  34. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud.egg-info/SOURCES.txt +4 -2
  35. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud.egg-info/requires.txt +1 -1
  36. testcloud-0.9.13/Makefile +0 -133
  37. testcloud-0.9.13/setup.py +0 -60
  38. testcloud-0.9.13/test/test_image.py +0 -93
  39. testcloud-0.9.13/testcloud/__init__.py +0 -2
  40. testcloud-0.9.13/testcloud/image.py +0 -320
  41. testcloud-0.9.13/testcloud/workarounds.py +0 -75
  42. testcloud-0.9.13/testcloud.spec +0 -543
  43. {testcloud-0.9.13 → testcloud-0.11.0}/LICENSE +0 -0
  44. {testcloud-0.9.13 → testcloud-0.11.0}/conf/99-testcloud-nonroot-libvirt-access.rules +0 -0
  45. {testcloud-0.9.13 → testcloud-0.11.0}/docs/LICENSE +0 -0
  46. {testcloud-0.9.13 → testcloud-0.11.0}/docs/Makefile +0 -0
  47. {testcloud-0.9.13 → testcloud-0.11.0}/docs/source/api.rst +0 -0
  48. {testcloud-0.9.13 → testcloud-0.11.0}/docs/source/indepth.rst +0 -0
  49. {testcloud-0.9.13 → testcloud-0.11.0}/docs/source/index.rst +0 -0
  50. {testcloud-0.9.13 → testcloud-0.11.0}/setup.cfg +0 -0
  51. {testcloud-0.9.13 → testcloud-0.11.0}/test/__init__.py +0 -0
  52. {testcloud-0.9.13 → testcloud-0.11.0}/test/test_cli.py +0 -0
  53. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud/distro_utils/__init__.py +0 -0
  54. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud.egg-info/dependency_links.txt +0 -0
  55. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud.egg-info/entry_points.txt +0 -0
  56. {testcloud-0.9.13 → testcloud-0.11.0}/testcloud.egg-info/top_level.txt +0 -0
  57. {testcloud-0.9.13 → testcloud-0.11.0}/tox.ini +0 -0
@@ -16,6 +16,7 @@ conf/settings.py
16
16
 
17
17
  # virtualenv
18
18
  /env*/
19
+ /.env*/
19
20
 
20
21
  # unit testing
21
22
  /.coverage
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testcloud
3
- Version: 0.9.13
3
+ Version: 0.11.0
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
@@ -8,8 +8,8 @@ Author-email: roshi@fedoraproject.org
8
8
  License: GPLv2+
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: Jinja2
12
11
  Requires-Dist: libvirt-python
12
+ Requires-Dist: peewee
13
13
  Requires-Dist: requests
14
14
  Requires-Dist: packaging
15
15
  Provides-Extra: image-resolve-caching
@@ -329,7 +329,7 @@ To install **testcloud** for development purposes:
329
329
  1. Install the dependencies for **testcloud**.
330
330
 
331
331
  ```
332
- $ sudo dnf install libvirt python3-libvirt libguestfs libguestfs-tools python3-requests python3-jinja2
332
+ $ sudo dnf builddep testcloud
333
333
  ```
334
334
 
335
335
  2. Start **libvirtd**.
@@ -312,7 +312,7 @@ To install **testcloud** for development purposes:
312
312
  1. Install the dependencies for **testcloud**.
313
313
 
314
314
  ```
315
- $ sudo dnf install libvirt python3-libvirt libguestfs libguestfs-tools python3-requests python3-jinja2
315
+ $ sudo dnf builddep testcloud
316
316
  ```
317
317
 
318
318
  2. Start **libvirtd**.
@@ -69,6 +69,8 @@
69
69
  # failing the boot process. Setting this to 0 disables waiting and
70
70
  # returns immediately after starting the boot process.
71
71
  #BOOT_TIMEOUT = 160
72
+ # timeout after which we should kill unfinished downloads of images
73
+ #IMAGE_DOWNLOAD_TIMEOUT = 1800
72
74
 
73
75
  # Maximum space (in GiB) that unused images can occupy in /var/lib/testcloud/backingstores directory
74
76
  # Once the limit is reached, testcloud will attempt to remove oldest files
@@ -0,0 +1,90 @@
1
+ __testcloud()
2
+ {
3
+ local cur prev prev2 prev3 base_opts image_opts instance_opts instance_create_opts
4
+ COMPREPLY=()
5
+ cur="${COMP_WORDS[COMP_CWORD]}"
6
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
7
+ prev2="${COMP_WORDS[COMP_CWORD-2]}"
8
+ prev3="${COMP_WORDS[COMP_CWORD-3]}"
9
+ base_opts="instance image -h --help"
10
+ image_opts="list destroy -h --help"
11
+ instance_opts="list start stop remove create -c -h --help"
12
+ instance_create_opts="-h --ram --no-graphic --vnc --timeout --disksize"
13
+
14
+ echo ${COMP_WORDS[@]} >> /tmp/compwords
15
+
16
+ if [[ ${COMP_WORDS[@]} =~ "testcloud image" || ${COMP_WORDS[@]} =~ "t7d image" ]]; then
17
+ if [[ ${prev} == "image" ]]; then
18
+ COMPREPLY=( $(compgen -W "${image_opts}" -- ${cur}) )
19
+ return 0
20
+
21
+ elif [[ ${prev2} == "image" && ${prev} == "list" ]]; then
22
+ return 0
23
+
24
+ elif [[ ${prev2} == "image" && ${prev} == "destroy" ]]; then
25
+ local images
26
+ images=`testcloud image list 2> /dev/null | grep -E "^ "`
27
+ COMPREPLY=( $(compgen -W "${images}" -- ${cur}) )
28
+ return 0
29
+
30
+ elif [[ ${prev3} == "image" && ${prev2} == "destroy" ]]; then
31
+ return 0
32
+ fi
33
+
34
+ elif [[ ${COMP_WORDS[@]} =~ "testcloud" || ${COMP_WORDS[@]} =~ "t7d" ]]; then
35
+ if [[ ${prev} == "create" ]]; then
36
+ COMPREPLY=( $(compgen -W "${instance_create_opts}" -- ${cur}) )
37
+ return 0
38
+
39
+ elif [[ ${prev} == "remove" ]]; then
40
+ local instances
41
+ instances="`testcloud list | tail -n+3 | head -n-1 | cut -f1 -d' '` --force"
42
+ COMPREPLY=( $(compgen -W "${instances}" -- ${cur}) )
43
+ return 0
44
+
45
+ elif [[ ${prev2} == "remove" ]]; then
46
+ local instances
47
+ COMPREPLY=( $(compgen -W "--force" -- ${cur}) )
48
+ return 0
49
+
50
+ elif [[ ${prev} == "list" ]]; then
51
+ COMPREPLY=( $(compgen -W "--all" -- ${cur}) )
52
+ return 0
53
+
54
+ elif [[ ${prev} == "stop" ]]; then
55
+ local instances
56
+ instances=`testcloud list | grep running | cut -f1 -d" "`
57
+ COMPREPLY=( $(compgen -W "${instances}" -- ${cur}) )
58
+ return 0
59
+
60
+ elif [[ ${prev} == "start" ]]; then
61
+ local instances
62
+ instances=`testcloud list | grep shutoff | cut -f1 -d" "`
63
+ COMPREPLY=( $(compgen -W "${instances}" -- ${cur}) )
64
+ return 0
65
+
66
+ elif [[ ${prev2} == "stop" ]]; then
67
+ return 0
68
+
69
+ elif [[ ${prev2} == "start" ]]; then
70
+ return 0
71
+
72
+ elif [[ ${COMP_WORDS[@]} =~ " -c" && ! ${COMP_WORDS[@]} =~ "///system" && ! ${COMP_WORDS[@]} =~ "///session" ]]; then
73
+ _get_comp_words_by_ref -n : cur
74
+ COMPREPLY=( $(compgen -W "qemu:///system qemu:///session" -- ${cur}) )
75
+ __ltrim_colon_completions "$cur" # left trim colon (blahblah)
76
+ return 0
77
+ fi
78
+
79
+ # fallback
80
+ COMPREPLY=( $(compgen -W "${instance_opts}" -- ${cur}) )
81
+ return 0
82
+
83
+
84
+ elif [[ ${cur} == * ]]; then
85
+ COMPREPLY=( $(compgen -W "${base_opts}" -- ${cur}) )
86
+ return 0
87
+ fi
88
+ }
89
+
90
+ complete -F __testcloud testcloud t7d
@@ -18,56 +18,56 @@ import os
18
18
  # If extensions (or modules to document with autodoc) are in another directory,
19
19
  # add these directories to sys.path here. If the directory is relative to the
20
20
  # documentation root, use os.path.abspath to make it absolute, like shown here.
21
- sys.path.insert(0, os.path.abspath('../../'))
21
+ sys.path.insert(0, os.path.abspath("../../"))
22
22
 
23
23
  # -- General configuration ------------------------------------------------
24
24
 
25
25
  # If your documentation needs a minimal Sphinx version, state it here.
26
- #needs_sphinx = '1.0'
26
+ # needs_sphinx = '1.0'
27
27
 
28
28
  # Add any Sphinx extension module names here, as strings. They can be
29
29
  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30
30
  # ones.
31
31
  extensions = [
32
- 'sphinx.ext.autodoc',
33
- 'sphinx.ext.todo',
34
- 'sphinx.ext.viewcode',
32
+ "sphinx.ext.autodoc",
33
+ "sphinx.ext.todo",
34
+ "sphinx.ext.viewcode",
35
35
  ]
36
36
 
37
37
  # Add any paths that contain templates here, relative to this directory.
38
- templates_path = ['_templates']
38
+ templates_path = ["_templates"]
39
39
 
40
40
  # The suffix of source filenames.
41
- source_suffix = '.rst'
41
+ source_suffix = ".rst"
42
42
 
43
43
  # The encoding of source files.
44
- #source_encoding = 'utf-8-sig'
44
+ # source_encoding = 'utf-8-sig'
45
45
 
46
46
  # The master toctree document.
47
- master_doc = 'index'
47
+ master_doc = "index"
48
48
 
49
49
  # General information about the project.
50
- project = u'testCloud'
51
- copyright = u'2016-2023, testCloud devs'
50
+ project = "testCloud"
51
+ copyright = "2016-2024, testCloud devs"
52
52
 
53
53
  # The version info for the project you're documenting, acts as replacement for
54
54
  # |version| and |release|, also used in various other places throughout the
55
55
  # built documents.
56
56
  #
57
57
  # The short X.Y version.
58
- version = '0.9.13'
58
+ version = "0.11.0"
59
59
  # The full version, including alpha/beta/rc tags.
60
60
  release = version
61
61
 
62
62
  # The language for content autogenerated by Sphinx. Refer to documentation
63
63
  # for a list of supported languages.
64
- #language = None
64
+ # language = None
65
65
 
66
66
  # There are two options for replacing |today|: either, you set today to some
67
67
  # non-false value, then it is used:
68
- #today = ''
68
+ # today = ''
69
69
  # Else, today_fmt is used as the format for a strftime call.
70
- #today_fmt = '%B %d, %Y'
70
+ # today_fmt = '%B %d, %Y'
71
71
 
72
72
  # List of patterns, relative to source directory, that match files and
73
73
  # directories to ignore when looking for source files.
@@ -75,167 +75,161 @@ exclude_patterns = []
75
75
 
76
76
  # The reST default role (used for this markup: `text`) to use for all
77
77
  # documents.
78
- #default_role = None
78
+ # default_role = None
79
79
 
80
80
  # If true, '()' will be appended to :func: etc. cross-reference text.
81
- #add_function_parentheses = True
81
+ # add_function_parentheses = True
82
82
 
83
83
  # If true, the current module name will be prepended to all description
84
84
  # unit titles (such as .. function::).
85
- #add_module_names = True
85
+ # add_module_names = True
86
86
 
87
87
  # If true, sectionauthor and moduleauthor directives will be shown in the
88
88
  # output. They are ignored by default.
89
- #show_authors = False
89
+ # show_authors = False
90
90
 
91
91
  # The name of the Pygments (syntax highlighting) style to use.
92
- pygments_style = 'sphinx'
92
+ pygments_style = "sphinx"
93
93
 
94
94
  # A list of ignored prefixes for module index sorting.
95
- #modindex_common_prefix = []
95
+ # modindex_common_prefix = []
96
96
 
97
97
  # If true, keep warnings as "system message" paragraphs in the built documents.
98
- #keep_warnings = False
98
+ # keep_warnings = False
99
99
 
100
100
 
101
101
  # -- Options for HTML output ----------------------------------------------
102
102
 
103
103
  # The theme to use for HTML and HTML Help pages. See the documentation for
104
104
  # a list of builtin themes.
105
- html_theme = 'nature'
105
+ html_theme = "nature"
106
106
 
107
107
  # Theme options are theme-specific and customize the look and feel of a theme
108
108
  # further. For a list of options available for each theme, see the
109
109
  # documentation.
110
- #html_theme_options = {}
110
+ # html_theme_options = {}
111
111
 
112
112
  # Add any paths that contain custom themes here, relative to this directory.
113
- #html_theme_path = []
113
+ # html_theme_path = []
114
114
 
115
115
  # The name for this set of Sphinx documents. If None, it defaults to
116
116
  # "<project> v<release> documentation".
117
- #html_title = None
117
+ # html_title = None
118
118
 
119
119
  # A shorter title for the navigation bar. Default is the same as html_title.
120
- #html_short_title = None
120
+ # html_short_title = None
121
121
 
122
122
  # The name of an image file (relative to this directory) to place at the top
123
123
  # of the sidebar.
124
- #html_logo = None
124
+ # html_logo = None
125
125
 
126
126
  # The name of an image file (within the static path) to use as favicon of the
127
127
  # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
128
128
  # pixels large.
129
- #html_favicon = None
129
+ # html_favicon = None
130
130
 
131
131
  # Add any paths that contain custom static files (such as style sheets) here,
132
132
  # relative to this directory. They are copied after the builtin static files,
133
133
  # so a file named "default.css" will overwrite the builtin "default.css".
134
- #html_static_path = ['_static']
134
+ # html_static_path = ['_static']
135
135
 
136
136
  # Add any extra paths that contain custom files (such as robots.txt or
137
137
  # .htaccess) here, relative to this directory. These files are copied
138
138
  # directly to the root of the documentation.
139
- #html_extra_path = []
139
+ # html_extra_path = []
140
140
 
141
141
  # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
142
142
  # using the given strftime format.
143
- #html_last_updated_fmt = '%b %d, %Y'
143
+ # html_last_updated_fmt = '%b %d, %Y'
144
144
 
145
145
  # If true, SmartyPants will be used to convert quotes and dashes to
146
146
  # typographically correct entities.
147
- #html_use_smartypants = True
147
+ # html_use_smartypants = True
148
148
 
149
149
  # Custom sidebar templates, maps document names to template names.
150
- #html_sidebars = {}
150
+ # html_sidebars = {}
151
151
 
152
152
  # Additional templates that should be rendered to pages, maps page names to
153
153
  # template names.
154
- #html_additional_pages = {}
154
+ # html_additional_pages = {}
155
155
 
156
156
  # If false, no module index is generated.
157
- #html_domain_indices = True
157
+ # html_domain_indices = True
158
158
 
159
159
  # If false, no index is generated.
160
- #html_use_index = True
160
+ # html_use_index = True
161
161
 
162
162
  # If true, the index is split into individual pages for each letter.
163
- #html_split_index = False
163
+ # html_split_index = False
164
164
 
165
165
  # If true, links to the reST sources are added to the pages.
166
- #html_show_sourcelink = True
166
+ # html_show_sourcelink = True
167
167
 
168
168
  # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
169
- #html_show_sphinx = True
169
+ # html_show_sphinx = True
170
170
 
171
171
  # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
172
- #html_show_copyright = True
172
+ # html_show_copyright = True
173
173
 
174
174
  # If true, an OpenSearch description file will be output, and all pages will
175
175
  # contain a <link> tag referring to it. The value of this option must be the
176
176
  # base URL from which the finished HTML is served.
177
- #html_use_opensearch = ''
177
+ # html_use_opensearch = ''
178
178
 
179
179
  # This is the file name suffix for HTML files (e.g. ".xhtml").
180
- #html_file_suffix = None
180
+ # html_file_suffix = None
181
181
 
182
182
  # Output file base name for HTML help builder.
183
- htmlhelp_basename = 'testClouddoc'
183
+ htmlhelp_basename = "testClouddoc"
184
184
 
185
185
 
186
186
  # -- Options for LaTeX output ---------------------------------------------
187
187
 
188
188
  latex_elements = {
189
- # The paper size ('letterpaper' or 'a4paper').
190
- #'papersize': 'letterpaper',
191
-
192
- # The font size ('10pt', '11pt' or '12pt').
193
- #'pointsize': '10pt',
194
-
195
- # Additional stuff for the LaTeX preamble.
196
- #'preamble': '',
189
+ # The paper size ('letterpaper' or 'a4paper').
190
+ #'papersize': 'letterpaper',
191
+ # The font size ('10pt', '11pt' or '12pt').
192
+ #'pointsize': '10pt',
193
+ # Additional stuff for the LaTeX preamble.
194
+ #'preamble': '',
197
195
  }
198
196
 
199
197
  # Grouping the document tree into LaTeX files. List of tuples
200
198
  # (source start file, target name, title,
201
199
  # author, documentclass [howto, manual, or own class]).
202
200
  latex_documents = [
203
- ('index', 'testCloud.tex', u'testCloud Documentation',
204
- u'testCloud devs', 'manual'),
201
+ ("index", "testCloud.tex", "testCloud Documentation", "testCloud devs", "manual"),
205
202
  ]
206
203
 
207
204
  # The name of an image file (relative to this directory) to place at the top of
208
205
  # the title page.
209
- #latex_logo = None
206
+ # latex_logo = None
210
207
 
211
208
  # For "manual" documents, if this is true, then toplevel headings are parts,
212
209
  # not chapters.
213
- #latex_use_parts = False
210
+ # latex_use_parts = False
214
211
 
215
212
  # If true, show page references after internal links.
216
- #latex_show_pagerefs = False
213
+ # latex_show_pagerefs = False
217
214
 
218
215
  # If true, show URL addresses after external links.
219
- #latex_show_urls = False
216
+ # latex_show_urls = False
220
217
 
221
218
  # Documents to append as an appendix to all manuals.
222
- #latex_appendices = []
219
+ # latex_appendices = []
223
220
 
224
221
  # If false, no module index is generated.
225
- #latex_domain_indices = True
222
+ # latex_domain_indices = True
226
223
 
227
224
 
228
225
  # -- Options for manual page output ---------------------------------------
229
226
 
230
227
  # One entry per manual page. List of tuples
231
228
  # (source start file, name, description, authors, manual section).
232
- man_pages = [
233
- ('index', 'testcloud', u'testCloud Documentation',
234
- [u'testCloud devs'], 1)
235
- ]
229
+ man_pages = [("index", "testcloud", "testCloud Documentation", ["testCloud devs"], 1)]
236
230
 
237
231
  # If true, show URL addresses after external links.
238
- #man_show_urls = False
232
+ # man_show_urls = False
239
233
 
240
234
 
241
235
  # -- Options for Texinfo output -------------------------------------------
@@ -244,19 +238,17 @@ man_pages = [
244
238
  # (source start file, target name, title, author,
245
239
  # dir menu entry, description, category)
246
240
  texinfo_documents = [
247
- ('index', 'testCloud', u'testCloud Documentation',
248
- u'testCloud devs', 'testCloud', 'One line description of project.',
249
- 'Miscellaneous'),
241
+ ("index", "testCloud", "testCloud Documentation", "testCloud devs", "testCloud", "One line description of project.", "Miscellaneous"),
250
242
  ]
251
243
 
252
244
  # Documents to append as an appendix to all manuals.
253
- #texinfo_appendices = []
245
+ # texinfo_appendices = []
254
246
 
255
247
  # If false, no module index is generated.
256
- #texinfo_domain_indices = True
248
+ # texinfo_domain_indices = True
257
249
 
258
250
  # How to display URL addresses: 'footnote', 'no', or 'inline'.
259
- #texinfo_show_urls = 'footnote'
251
+ # texinfo_show_urls = 'footnote'
260
252
 
261
253
  # If true, do not generate a @detailmenu in the "Top" node's menu.
262
- #texinfo_no_detailmenu = False
254
+ # texinfo_no_detailmenu = False
@@ -0,0 +1,170 @@
1
+ .\" This is the manual page for testcloud.
2
+ .\" Contact lruzicka@redhat.com if you find an errors or a typo.
3
+ .TH TESTCLOUD 1 "11 Nov 2020" "1.0" "testcloud man page"
4
+ .SH NAME
5
+ testcloud \- download \fIqcow2\fR cloud images and boot them locally.
6
+ .SH SYNOPSIS
7
+ \fBtestcloud\fR [-h, --help] [COMMAND]... [OPTION]... [SUBCOMMAND]... [OPTION]...
8
+ .SH DESCRIPTION
9
+ .LP
10
+ \fBtestcloud\fR is a small helper script to download and boot cloud/coreos images
11
+ locally. Testcloud supports wide range of distributions, namely Fedora, Fedora CoreOS,
12
+ CentOS, CentOS Stream, Red Hat Enterprise Linux, Debian and Ubuntu.
13
+
14
+ \fBtestcloud\fR can run either in system mode or in constrained user session mode,
15
+ which is usefull for running it eg. in unprivileged containers.
16
+ .PP
17
+ To run \fBtestcloud\fR, you need to provide the \fBURL\fR of a cloud image or string in \fBdistribution:version\fR format
18
+ to the script which will be used for booting.
19
+
20
+ If you do not have an image location of your own, you can use one
21
+ of the images from the \fBFedora Cloud\fR download pages at \fIhttps://alt.fedoraproject.org/cloud/\fR.
22
+ .PP
23
+ Then, \fBtestcloud\fR will download the image and save it in the \fI/var/lib/testcloud/backingstores/\fR.
24
+ It will use this image to create a backing store for a newly created instance which will be placed in
25
+ \fI/var/tmp/instances/\fR. When the same image has been previously downloaded, \fBtestcloud\fR will NOT
26
+ download it again and it will use the current image to create the instance.
27
+ .PP
28
+ When the new instance is created, \fBtestcloud\fR will show its IP address that you can use to
29
+ access the running instance via \fIssh\fR. The login name is \fBfedora\fR and the password is
30
+ \fBpassw0rd\fR. The IP address of an instance is shown when you list the instance (see COMMANDS).
31
+ .PP
32
+ The instance can also be manipulated and controlled with \fBvirt-manager\fR.
33
+ .SH CONFIGURATION
34
+ The default configuration should work for many people. However, if you need to override the
35
+ default settings, you can do it in the \fIsettings.py\fR file. The example file in
36
+ \fIconf/settings-example.py\fR shows the available configuration values which you can
37
+ alter to suit your needs.
38
+ .PP
39
+ The configuration file must be placed in one of the following locations in order to be
40
+ recognized.
41
+ .IP
42
+ \fIconf/settings.py\fR in the git checkout
43
+ .IP
44
+ \fI~/.config/testcloud/settings.py\fR
45
+ .IP
46
+ \fI/etc/testcloud/settings.py\fR
47
+ .SH COMMANDS
48
+ \fBimage\fR
49
+ Control and manipulate the images (see OPTIONS) for more details.
50
+ .SH OPTIONS
51
+ \fB-h, --help\fR
52
+ Shows the help message and exits.
53
+
54
+ \fB-c CONNECTION, --connection CONNECTION\fR
55
+ Provide the URL of a remote libvirt instance to be used instead of the local one. This option can be used with the \fBinstance\fR command only.
56
+
57
+ .SH SUBCOMMANDS
58
+ \fBcreate\fR
59
+ Create a new instance. See the INSTANCE CREATE OPTIONS section for more details.
60
+
61
+ \fBlist\fR
62
+ List available running instances and images. Use the \fB--all\fR options to list all instances.
63
+
64
+ \fBstart\fR
65
+ Start an existing instance.
66
+
67
+ \fBstop\fR
68
+ Stop a running instance.
69
+
70
+ \fBreboot\fR
71
+ Force the instance to reboot.
72
+
73
+ \fBremove\fR
74
+ Remove an instance or image. If an instance is running, it cannot be removed without the \fB-f\fR option.
75
+
76
+ \fBdestroy\fR
77
+ Remove an instance or image. Deprecated, do not use.
78
+
79
+ \fBclean\fR
80
+ Remove non-existing or unsynced libvirt VMs from testcloud.
81
+
82
+ .SH INSTANCE CREATE OPTIONS
83
+ \fBURL\fR
84
+ Specify the URL from where testcloud should download the instance qcow2 image or distro:version handle. \fBThis option is compulsory\fR.
85
+ Some examples of supported short urls:
86
+ - fedora:rawhide (latest compose), fedora:33, fedora:latest (latest Fedora GA image)
87
+ - fedora-coreos:next, fedora-coreos:testing, fedora-coreos:stable
88
+ - fedora:qa-matrix (image from https://fedoraproject.org/wiki/Test_Results:Current_Cloud_Test )
89
+ - centos:XX (eg. centos:8, centos:latest)
90
+ - centos-stream:XX (eg. centos-stream:8, centos-stream:latest)
91
+ - ubuntu:release_name (eg. ubuntu:focal, ubuntu:latest)
92
+ - debian:release_name/release_number (eg. debian:11, debian:sid, debian:latest)
93
+
94
+ \fB-n, --name NAME\fR
95
+ Set desired instance name. A nice and memorable name will be generated for you if not specified.
96
+
97
+ \fB--arch ARCH\fR
98
+ Set the desired guest architecture. Host arch is the default, supported are: x86_64, aarch64, ppc64le, and s390x.
99
+
100
+ \fB--ram RAM\fR
101
+ Set the amount of RAM that will be available to the instance's VM (in MiB).
102
+
103
+ \fB--vcpus VCPUS\fR
104
+ Set the number of virtual CPU cores to be assinged to the VM.
105
+
106
+ \fB--disksize DISKSIZE\fR
107
+ Set the disk size of the instance VM (in GiB).
108
+
109
+ \fB--vnc\fR
110
+ Open a VNC connection to the \fB:1\fR display of the instance VM.
111
+
112
+ \fB--no-graphic\fR
113
+ Turn off the instance VM's graphical display.
114
+
115
+ \fB--timeout TIMEOUT\fR
116
+ Specify the time (in seconds) to wait for the instance boot to complete. To disable waiting time (default behaviour) set to \fB0\fR.
117
+
118
+ \fB--disk_number\fR
119
+ \fB:\fR To provide disk number you want
120
+
121
+ \fB--nic_number\fR
122
+ \fB:\fR To provide nic number you want
123
+
124
+ \fB--virtiofs\fR
125
+ \fB:\fR To specify a local directory to mount and mount target like <host path>:<guest path>
126
+
127
+ \fB--iommu\fR
128
+ \fB:\fR To provide virtual iommu device
129
+
130
+ \fB ADDITIONAL COREOS OPTIONS\fR
131
+
132
+ \fB--bu_file BU_FILE\fR
133
+ \fB:\fR To provide a bu_file you want to use
134
+
135
+ \fB--ign_file IGN_FILE\fR
136
+ \fB:\fR To provide an ign_file you want to use
137
+
138
+ \fB--ssh_path\fR
139
+ \fB:\fR To provide a ssh pubkey path you want to use
140
+
141
+ .SH EXAMPLES
142
+ .PP
143
+ Create a new instance:
144
+ .IP
145
+ \fBtestcloud create <URL>\fR
146
+ .PP
147
+ List all available instances:
148
+ .IP
149
+ \fBtestcloud list\fR
150
+ .PP
151
+ Start an existing instance:
152
+ .IP
153
+ \fBtestcloud start <instance_name>\fR
154
+ .PP
155
+ Stop an existing instance:
156
+ .IP
157
+ \fBtestcloud stop <instance_name>\fR
158
+ .PP
159
+ Remove a running instance:
160
+ .IP
161
+ \fBtestcloud remove -f <instance_name>\fR
162
+
163
+ .SH SEE ALSO
164
+
165
+ \fBtestcloud's help\fR and the Project's \fBREADME.md\fR file
166
+
167
+ .SH BUGS
168
+ No known bugs. If you have found a bug, please report it at \fIhttps://bugzilla.redhat.com\fR.
169
+ .SH AUTHOR
170
+ Mike Ruckman (roshi@fedoraproject.org)
@@ -0,0 +1,2 @@
1
+ [tool.black]
2
+ line-length=140
@@ -1,9 +1,9 @@
1
1
  # This is a list of pypi packages to be installed into virtualenv. Alternatively,
2
2
  # you can install these as RPMs instead of pypi packages. See README.
3
3
 
4
- Jinja2
5
4
  libvirt-python
6
5
  requests
6
+ peewee
7
7
  #guestfs - after it is on pypi ( https://bugzilla.redhat.com/show_bug.cgi?id=1075594 )
8
8
 
9
9
  # Test suite requirements
@@ -1,4 +1,4 @@
1
- #! /usr/bin/python3
1
+ #! /usr/bin/env python3
2
2
  from testcloud import cli
3
3
 
4
4
  cli.main()