17 Commits

Author SHA1 Message Date
Xinran WANG
07a8e30f76 Introduce microversion
This patch aims at support microversion in Cyborg API.
The work items is the following:
1. remove old api_version_request.py to avoid the redundancy.
2. add a header in every API request and support to parse it and
route to the correct API method.
3. depracate v1 API.
4. add related UT.

For testing:

CTYPE="Content-Type: application/json"
AUTH="X-Auth-Token: $(openstack token issue -c id -f value)"

curl -s -H "$CTYPE" -H "$AUTH" -H "OpenStack-API-Version: accelerator
2.0" http://localhost/accelerator/devices

This will execute sucessfully because 2.0 microversion is supported.

curl -s -H "$CTYPE" -H "$AUTH" -H "OpenStack-API-Version: accelerator
latest" http://localhost/accelerator/devices

This will execute sucessfully because "latest" will be parsed to 2.0.

curl -s -H "$CTYPE" -H "$AUTH" -H "OpenStack-API-Version: accelerator
2.99" http://localhost/accelerator/devices

This will failed because we don't support 2.99 microversion.

Change-Id: Id9c34dc134d59b2332cefbcae5bbd7e6632e970d
2020-04-07 06:18:50 +00:00
zhangbailin
002e31a129 Add 'description' field to the device profile object
Add the DeviceProfile objects version 1.1, and add 'description'
field to the DeviceProfile's fields.
And 'description' also will expose to end users from
the GET/POST response body.

Story: 2007397
Partial-Implements: blueprint add-description-field-to-device-profiles

Change-Id: I15fd9a430d09b20b55375b374fd7fd96542c6358
2020-03-19 03:59:36 +00:00
Zuul
a03e6527b9 Merge "Introduce bandit security linter" 2020-01-14 03:58:49 +00:00
Zuul
0c72b024fd Merge "Bump the openstackdocstheme extension to 1.20" 2020-01-11 19:39:42 +00:00
Yumeng Bao
d765a344ee Introduce bandit security linter
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
2020-01-05 19:49:22 -08:00
Arthur Dayne
6b9ab023e1 Stop testing python2.7
Python 2.7 support has been dropped. Last release of Cyborg to support
py2.7 is OpenStack Train. The minimum version of Python now
supported by Cyborg is Python 3.6.

Depends-On: https://review.opendev.org/#/c/691766/
Change-Id: Ie87ef7727b50d8d5ca43f0283c5688199c35412e
2019-11-19 02:09:08 -05:00
pengyuesheng
e8b3051254 Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: I7407d8dd6261c18db9dd0f7ea8b5963738cfd7da
2019-10-09 09:42:52 +08:00
eea67513c2 Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I4dc98dee7881090ca60359379d5bc76e99847256
Sem-Ver: feature
2019-09-27 09:02:52 +00:00
Yumeng Bao
45ade8a10b Implement privsep boilerplate in cyborg.
This includes implementing a first trivial example of how to use
privsep to run something as root, specifically the gpu driver. FPGA
and other drivers should implement as well in the future.

For reference:
https://review.opendev.org/#/c/566479/4
https://docs.openstack.org/oslo.privsep/latest/user/index.html#converting-from-rootwrap-to-privsep

Change-Id: Ibff356d9a7f57bc99cc26de90d81ff92948f37c4
2019-09-25 19:22:12 -07:00
ljhuang
b8103b4394 Sync Sphinx requirement
1. Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.
2. Update some URLs to latest

Change-Id: I2ab509a8430cb3e7d297bd4303a492c21d59a7f3
2019-06-11 10:04:34 +00:00
cb581755e7 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: I526c5b8f99a35e74da060c1933d26d949ab1d487
Sem-Ver: feature
2019-03-22 02:35:40 +00:00
whoami-rajat
79e8f86aa0 Add cyborg-status upgrade check command framework
This adds basic framework for cyborg-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.

Change-Id: I4a180f9a1b25c75489ad3cfee30a7b55506e0bbd
Story: 2003657
Task: 26126
2018-10-26 19:42:43 +05:30
b812e2cd13 Update reno for stable/rocky
Change-Id: I1b493e9a11ed82b6300c5d3c6d440b4e78e150e1
2018-08-13 15:25:26 +00:00
Andreas Jaeger
5b4b9a382c It's releasenotes - plural
Releasenotes builds in OpenStack requires a directory called
releasenotes/source - rename files.

Note that tox.ini is already correct, so with this change "tox -e
releasenotes" works.

Fix warning about RST problems.

Change-Id: Ic2b393e4a5c5324e184030dc1d21d0dc27aa060e
2018-02-14 10:43:31 +01:00
zhipengh
50e6fcdf81 queens release doc fix part 2
Add releasenote for queens in the right way

Update 1: fix trivial error on L148

Update 2: fix indention

Update 3: fix various places Andreas helped to point out

Change-Id: Ie692a428459c872c2069f3a377469c788e1f18c5
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
2018-02-14 16:30:07 +08:00
zhipengh
2e78e10e5a queens release doc fix part 1
More patches might follow

Update 0(pacth 1):
1.remove unnecessary files
2.reorg doc directory

Update 1(patch 2):
add releasenotes and cleanup the internal-api spec

Update 2(patch 3):
1.added a new releasenote for generic-driver
2.fixed errors in the other four earlier releasenotes
3.add comment in cyborg/object/accelerator.py and deployable.py to
let user better know the meanings of the table entries.

Change-Id: I45a104f9f77a0a163008657c681cf109f941dd11
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
2018-02-07 20:53:38 +08:00
zhipengh
5ec3ce69a3 Add Release Notes and Architecture Docs
Add release note for Pike and architecture documentation
and diagram.

Change-Id: Ia5756ed7acf176f3910dfe2436da8186467377c8
Signed-off-by: zhipengh <huangzhipeng@huawei.com>
2017-09-12 15:42:40 -06:00