This change fixes typo from 'resouce_classes' to
'resource_classes' in delete api call.
Also adds missing dependency for webtest library.
Change-Id: If5135a67187deccec0834f2b2af5dc38f7c5a909
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib. Most of this
is autogenerated, as described below, but there are three manual changes
necessary.
Change-Id: If9cd7eca3454d9e1d62a0a1753e157adbf965e8d
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.
Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.
To avoid similar gate break in future, we need to bump the hacking min
version.
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html
Change-Id: Ia12b837b81faec9288bb649c4d544f7eadf5c8b3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found:
E117 over-indented
E501 line too long
E741 ambiguous variable name 'l'
W605 invalid escape sequence
Blacklist:
W503 line break before binary operator
W504 line break after binary operator
Update local hacking checks for new flake8.
Change-Id: I5d11a1f87d9547d9b6a27bf1f79cd69e0f73c741
This is a series of optimization for exception.
In fact, we only need to use the ResourceNotFound exception
to fit NotFound Exception.
This patch also adds dependency package cursive which is used
in [1].
[1]. 6740c3c0c5/cyborg/image/glance.py (L30)
Change-Id: I9e80dcfed54147c942f90c696e483fa6db842dde
Story: 2007045
Task: 37968
Cyborg now does not have a code security check, which may connive at
possible security issues. For example, shell-related operations for drivers
may be insecure. Current "sudo lspci -nnn -D" in huawei ascend driver code[0]
is insecure, but there is no any job/test that can check the potential security
issues. So this patch introduces bandit as a code security check.
[0]:https://github.com/openstack/cyborg/blob/master/cyborg/accelerator/drivers/aichip/huawei/ascend.py#L69
Change-Id: Ia1f9acbbd176180cb5fe97b1a2eee5f98a95dea6
when runnig "ostestr cyborg.tests.unit.common.test_nova_client" under
py36, there throws the following error:
Failed to import test module: cyborg.tests.unit.test_hacking
File "cyborg/tests/unit/test_hacking.py", line 18, in <module>
import pep8
ImportError: No module named pep8
This is because pep8 doesn't exist any more in python3, pycodestyle is
the substitute.
Change-Id: Ia5bfa1f341606fc42b7a37a5fee9b426c59a05c2
1. Create resource provider, resource class, traits.
2. Nested resource provider is supported in this patch.
3. According to the comments and reply in:
https://review.opendev.org/#/c/626057/10/cyborg/common/placement_client.py,
we should make a class to invoke Placement API. This has also been done in
this patch.
4. Convert cyborg/objects/driver_objects/driver_device.py file type from dos to
unix, to avoid ^M at the end of each line.
5. Get rid of legacy: ProviderTree class.
6. More info for driver developers: each driver should report resource class
and traits in driver_attribute field in order that cyborg-conductor can parse
it and report to placement.
7. update deployable rp_uuid field after getting rp_uuid from placement.
Change-Id: Ib8f682255d2ae60eb615c90de0a0f7c83d1af54d
Ensure the documentation is kept up to date by automatically
generating it from the source when the docs are built.
This patch:
1.replace oslosphinx with openstackdocstheme since oslosphinx is obsolete
2.add oslo_config.sphinxconfiggen to generate sample conf file
3.add oslo_policy.sphinxpolicygen to generate sample policy file
Change-Id: I39f03023f0a85e4c8943925268ab3e9066975630
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I8b0f96f05799b892acfae03522726c17010f0df3
This patch adds a doc8 check of .rst files to the current pep8 check.
It includes fixes to the .rst files that didn't pass the check.
Change-Id: Ib7a63d1e579f77039172aa4f99d26a3ceeef83d7
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr.
Change-Id: I2136b810c2c304064dfd5dbe178a4c53b8860020
add api unit test to validate the accelerator_post function.
1. load a test app for pecan framework test
2. mock out the accelerator_create function in Conductor RPCAPI
3. post test request to '/accelerators' endpoint
4. do the check between request and response
Change-Id: I5d565d0d7ed56c27555666e52e34f5fd67005dcf