Commit Graph

265 Commits

Author SHA1 Message Date
Sharpz7 9e46c0c174 [codespell] Adding CI target for Tox Codespell
Third in a series of commits to add Codespell to Ironic Repos. This commit adds the Tox Target to CI

A future commit could potentially add a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: I21d137007c5432f3e4970a912b528cbc2748b7ad
2024-02-12 20:55:49 +00:00
Sharpz7 f78a80ccb9 [codespell] Adding Tox Target for Codespell
Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors.

Future Commits will add CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: I90886dbb7ad7adf5520f8cc436012fa63c89ca78
2024-02-12 20:55:43 +00:00
Zuul 78c91596ff Merge "[codespell] Fixing Spelling Mistakes" 2024-01-31 14:20:24 +00:00
Zuul 5f41058c30 Merge "[CI] Fix releasenotes build by setting language" 2024-01-27 01:05:32 +00:00
Jay Faulkner 4308069eeb [CI] Fix releasenotes build by setting language
Without setting language, sphinx throws a warning. We count warnings as
errors. This is causing CI jobs to fail in virtualbmc.

Change-Id: Ifab813e7bdeca1727720b4eb8ae62f5d8b8a4a68
2024-01-26 15:10:27 -08:00
Sharpz7 2f74128822 [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: If39cba190cd4cde60ce13ae2fcde77b69776d4d2
2024-01-26 05:18:16 +00:00
Julia Kreger 8fa7e1f9d8
Handle any error from libvirt operations
A review of the helper code which wraps libvirtmod's compiled
module which implements the libvirt wrapper for Python, which
we refer to and call as libvirt or python-libvirt, reveals that
it appears possible for AttributeError and KeyError to be raised
up to the intermediate library level. While everything else refers
to libvirtError, it still seems possible, albeit remote, that
the generated code and interactions may still raise exceptions
besides libvirtError which previously would result in unexpected
behavior.

What we sometimes see on the ipmitool side is a generic
"Error: Unable to establish IPMI v2 / RMCP+ session" error which
is generated in many cases, including when no response is received.

So, since libvirtError is based on an Exception class, changes
exception handling to just catch and log based upon Exception.

Change-Id: I8159f5d1de2acb0678e7c85306413fab6999e615
2023-12-19 14:53:07 +01:00
Pierre Riteau c1b75e0a25 Remove duplicate space in log message
Change-Id: Ia48f9cf09c298cfb70a0337328df61b1c056f672
2023-05-23 22:07:06 +02:00
Jay Faulkner e6fa558879 Bugs are now in Launchpad, update docs to reflect
Update docs to reflect bugs being in LP now.

Change-Id: Ibe43fe463af1d7a3998acaa8b6c985b068249f91
2023-05-18 07:12:30 -07:00
Zuul 57ca3bbadd Merge "Use generic openstack python3 tests" 2023-04-27 15:02:41 +00:00
Jay Faulkner 619f8d3a7c Update pep8 dep hacking to latest
Hacking now at 6.0.0.

No code changes needed for compatability.

Change-Id: I95be33c5cdd9993dbfc51214388f979a69e2bad2
2023-04-21 13:02:04 -07:00
Riccardo Pittau b3567156f1 Use generic openstack python3 tests
Adds support for python3.10

Change-Id: If517c94aff0d1b3546843153993aadc9ab2fcb73
2023-04-20 09:43:17 +02:00
Jay Faulkner 7ce1923a99 Fixes for tox 4.0
Needed to fix syntax of passenv
Added required zmq library to bindep.txt

Change-Id: I78bc8d3fee4a1b605a60c8523a2d2c97358c9fac
2022-12-28 15:18:14 +01:00
Hervé Beraud 75f69f859a remove python-dev from bindep
It is no longer supported by jammy and lead us to the following errors with the announce-release job.

```
No package matching 'python-dev' is available
```

Change-Id: I295bf25056f66c29649620ce8420382c4a151c1d
2022-11-07 09:37:45 +00:00
Jay Faulkner f97e1946d3 Document VirtualBMC is not for production use
VirtualBMC is not a tool designed for production use; ensure this is
explicitly documented in the readme.

Story #2010382
Task #46661

Change-Id: I581b96b93d9b24f650ac0c6280d074708ec69ef4
2022-10-26 08:27:30 -07:00
Julia Kreger 348e965114 preserve secure information on xml changes
When setting parameters revolving around boot
mode, options, firmware, it is necessary to
extract and edit the XML document.

Some details, however, are not automatically
extracted and libvirt must be told to provide
secure information. This change prevents us
from accidently loosing such configuration
parameters

Story: 2010382
Task: 46651

Change-Id: I0da2f37c5b630d2a180f59b74f23c027ee56e17b
2022-10-25 18:50:18 +00:00
wangjiaqi07 7aac77d406 remove unicode from code
Change-Id: Id68c3c917acaef59f5cb92dea035d0e104c92a57
2022-08-24 20:29:21 +08:00
Riccardo Pittau 86bd5e44fb Remove support for Python 3.6 and 3.7
Maintaining support for older not supported in Zed Python versions
would take too much effort with a lot of libraries dropping
compatibility with 3.6 and 3.7

Change-Id: I58a810d8cf4247153623c247de71f774928653aa
2022-06-17 14:41:34 +02:00
Riccardo Pittau 835fd3b9e4 Use zed jobs
Also leave py3.6 test as it's still trendy
Remove l-c job definition from tox.ini, it was not used anyway and
we're removing l-c jobs everywhere

Fix tempest test

Change-Id: Ibdb5be75cf9e1c7a2ce26c05ee1e5e5d85d20482
2022-05-05 17:07:54 +02:00
Riccardo Pittau 4a8a0ae005 Re-add python 3.6/3.7 in classifier
We have updated the yoga testing runtime to keep the
py36 testing.

- https://review.opendev.org/c/openstack/governance/+/820195

Unit tests job template is also updated to keep python
3.6 as a voting job. So with the py3.6 and py3.9 testing as voting
job template, we are keeping python 3.6, 3.7, 3.8, and 3.9 as
tested versions in the Yoga cycle.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

This commit re-add the python 3.6/3.7 versions in setup.cfg classifier.

Change-Id: I0b1fd265bfed80b76e5eced456d80b65310b4368
2021-12-14 09:43:24 +01:00
Ghanshyam Mann 6b077fa3b8 Updating python testing as per Yoga testing runtime
Yoga testing runtime has been updated with py38 and py39
as voting and removed the py36 testing. Unit tests update are
handled by the job template change in openstack-zuul-job and you
can see the updated jobs running in gate.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/818609

this commit makes other required changes in obs template and
update the clasifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I686b17209e94779d6e29879730b635c17e338c76
2021-11-25 15:38:05 -06:00
Riccardo Pittau d35a80fe03 Update pep8 test requirements
Change-Id: I54afbe68951cc8de2f5e3bca97a38bc2f8828da9
2021-10-19 11:35:04 +02:00
Riccardo Pittau 89220d2ebb Update min version of tox to use allowlist
The min version of tox is updated to 3.18.0 to replace whitelist_externals
with allowist_externals option [1]

[1] https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: Ia05d9b10c421b3ec4678449d6accf912927213c8
2021-06-15 10:15:52 +02:00
Riccardo Pittau 7fe544412f Use xena jobs
Change-Id: Id3e485b9a08b58ce0e8bad4f8b23b7dbbd36b975
2021-05-31 11:28:26 +02:00
yangyawei 5c54b1247f Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: Id0b52f70e02b08d4983a218af7c2e34c38ec3c7d
2021-05-25 20:45:07 +08:00
yangyawei a8c3f27652 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I2781f250f8db9907987b75b0c66ad8bfb041ccee
2021-05-14 09:21:17 +08:00
Dmitry Tantsur a006cc6a44 Remove "iscsi" from job names
Also remove "ipmi" since it's assumed for VirtualBMC.

Change-Id: I23c54779ecfb2b06cac715a209408411a7084bca
2021-05-03 15:35:43 +02:00
Riccardo Pittau 5630176fd0 Update minversion of tox
The minimum version since when tox accepts having inline comments
in deps is 3.9.0

https://tox.readthedocs.io/en/latest/changelog.html#v3-9-0-2019-04-17

Change-Id: I3e510bf626fc913069009075b4a28ee2face7ae1
2021-01-22 10:49:47 +01:00
Iury Gregory Melo Ferreira 122f4ba5db Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver for the release team.
Removed specific doc requirements from test-requirements.txt

Change-Id: Ib2570e01bef426c0e5ecfd59249d08ea00749b28
2021-01-04 18:19:04 +01:00
Riccardo Pittau 3617ce11be Remove lower-constraints job
As discussed during the upstream ironic community meeting on
Monday Dec 14 2020, the lower-constraints job is being removed.

Change-Id: I79af2ef5dd144d7b0bd3e3036fbf0e671701ef6a
2020-12-16 11:16:47 +01:00
Riccardo Pittau 5aae35450f Fix lower-constraints with the new pip resolver
Remove pep8 dependencies from test-requirements, they're not
needed there and are hard to constraint properly.

Change lower-constraints to make pip resolver happy.

Change-Id: I85f2e368f6834888e3c82d365c2ecbcebfabd8e7
2020-12-09 17:40:22 +01:00
Zuul 0e28523834 Merge "Use wallaby jobs" 2020-10-22 19:13:40 +00:00
Riccardo Pittau c2a64ebb06 Use wallaby jobs
Also re-oreder jobs and add common openstack jobs for cover and
lower-constraints.
And disable dstat to prevent failures due to dstat bug in focal.

Change-Id: Ia219fdaac13c21d9fce08e69b45945d4b5e37a89
2020-10-19 16:04:18 +02:00
Riccardo Pittau d1816164ef Set safe version of hacking
Versions of hacking from 3.1.0 until 4.0.0 NOT included are supposed
to require a safe version of flake8, so besides normale issues related
to minor version upgrades, we can safely use those versions.
Also forcing pycodestyle versions to be compatible with flake8 installed
by hacking.

Change-Id: I98bc624f9eb8f8153885e52366e34ac7a0e047fa
2020-10-19 13:47:54 +00:00
Pete Zaitcev 07094b5cd0 Drop redundant milliseconds from logging
The current code logs the milliseconds twice:

  2020-09-21 00:24:21,706.706 3484 DEBUG VirtualBMC [-] Get power...

The documentation for the logging module in py3 is quite
unambiguous about %(asctime) providing milliseconds.
The documentation in py2 is unclear on what is supposed
to offer, but in practice it works exactly as py3.

Change-Id: Ibb050c58d5fb949316700d7d2db4c77bd62f5e25
2020-09-20 23:31:15 -05:00
Julia Kreger d79f82339c Fix lower-constraints for ubuntu focal
Change-Id: I5f976b89325825813a5d345bbb62a249f6cbb4f2
2020-09-11 15:21:32 -05:00
Zuul c4c8edb66b Merge "Set min version of tox to 3.2.1" 2020-08-06 17:25:40 +00:00
Amy Marrich (spotz) 9d0750a5f6 Correct vmbc add command
Command example had an extra node-01 so failed

Change-Id: I6eabf05707ca33049a81bf04f7b76e89246451be
2020-07-30 13:41:59 -05:00
Riccardo Pittau 43925d297d Set min version of tox to 3.2.1
As recommended, since version 3.2.0 tox switches pip invocations
to use the module -m pip instead of direct invocation.
We set min version to 3.2.1 [1] to also fix the behavior of
--parallel--safe-build

[1] https://tox.readthedocs.io/en/latest/changelog.html#v3-2-1-2018-08-10

Change-Id: I4003a8bebc7737250d0c318426e885d0888df57d
2020-07-15 15:34:03 +02:00
Zuul 160c0b31f5 Merge "Remove unneded Babel config" 2020-06-10 09:51:24 +00:00
Hervé Beraud 1dbfd44806 drop mock from lower-constraints
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we don't need it
in lower-constraints.

These changes will help us to drop `mock` from openstack/requirements

Change-Id: Iccbcd6deddc1d246d214a2c52086a0cc8d911882
2020-06-09 12:19:23 +02:00
Riccardo Pittau 3c4390a3c0 Remove unneded Babel config
Change-Id: Ia64b1a6d120dbe37108218da0a12bcfc5063cf7f
2020-05-30 13:48:04 +00:00
Riccardo Pittau 36027374eb Update lower-constraints.txt
We need to list all dependencies in lower-constraints

Change-Id: I2e92cc34f953350632959fa9f6cf16f81e0b604d
2020-05-27 10:47:26 +02:00
Andreas Jaeger e9854ff408 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I20ea481c1dd9651258b8ae13da9b1e1ec710482b
2020-05-25 09:43:04 +00:00
Andreas Jaeger 43128494ed Fix doc build failure
libvirt-python needs to be compiled also during doc building, add
"compile" target to bindep which is used for install and doc jobs.

This fixes the doc CI jobs.

Change-Id: I8ec597485db067a919d2455a81b7fe79b83153f7
2020-05-25 10:44:18 +02:00
Riccardo Pittau 71773f6b8d Do not import print function from __future__
We're Python 3 only.

Change-Id: I28292fa258362f4bea3865e8d96c327156bc62e7
2020-05-04 16:21:49 +02:00
Riccardo Pittau 6658b97712 Set flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.

Change-Id: I26f38e18ce5c1c61aadbc1590a79c97e7b3c4ab4
2020-04-29 08:40:28 +02:00
Zuul 0d280c8375 Merge "Restore pep8 checking on import order" 2020-04-28 14:38:59 +00:00
Riccardo Pittau f32a5b85b4 Restore default netboot boot option
We changed the default boot option to local but should be netboot
for this job.

Change-Id: Ie76efb2f9c66a37eb3c490264f57595ab23c114d
2020-04-27 16:10:45 +02:00
Kaifeng Wang 132fe3ce24 Restore pep8 checking on import order
Currently not checking import orders, this patch restore it.

Change-Id: I101814591eaffb694a090aa640ca9ac70db2ecf1
2020-04-27 15:24:17 +02:00