A lot of work has gone into making sure that StarlingX is python3
compatible. To ensure future compatibility, enable the python3
portability checks. Disable the checks that are raising errors.
Another set of commits will address the offending code.
Add following suppress warnings in pylint.rc:
- W1618: no-absolute-import
- W1624: indexing-exception
Story: 2006796
Task: 43282
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: I2fa69f9ea45a27f0c60eb05ea5d0f98b47da8945
flake8 3.5.0 fails on ubuntu-focal zuul machines running python3.8
with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'
The update removes the version constraint to use newer flake8. This
also ignores new warnings/errors, which should be addressed in a
future update to remove the ignores.
Change-Id: I16dc579f7ee803881c42ff6048ddd2f6bb0c553b
Partial-Bug: 1895054
Signed-off-by: Don Penney <don.penney@windriver.com>
Setting up the bandit tool for the scanning of HIGH severity issues
in the python codes under Starlingx/metal folder.
Expecting this merge will enable zuul job for CI/CD of bandit scan.
Configuration files:
1. tox.ini for adding bandit environment and command.
2. test-requirements.txt for adding bandit version.
3. .zuul.yaml file for adding bandit job and configuring under
check job to run code scan every time before code commit.
Test:
Run tox -e bandit command inside the fault folder to validate the
bandit scan and result.
Please note:
Changes will be implemented in batches and this is Batch4 change.
Story: 2007541
Task: 39622
Depends-On: https://review.opendev.org/#/c/721294/
Change-Id: I7b91a51e0e411b46670f84c2b2a6c7749f9d0521
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
Created a pylint.rc file for running pylint
Added a pylint task to zuul
Targets the following python files:
- redfish docker code
- hwmond_notify
Other python components in metal are not being included
because they are being removed in later commits.
Story: 2004515
Task: 37956
Change-Id: I782672c366e56d1f1597d40f5754444b2fa76b9e
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This updates the upper-constraints.txt used by tox for
installing python modules to reference the stable/stein
constraints.
Change-Id: I337321543b6f778721a656c575a26854a20ff5d5
Partial-Bug: 1834216
Signed-off-by: Don Penney <don.penney@windriver.com>
Flake8 currently ignores the following errors:
H233: Python 3.x incompatible use of print operator
H404: multi line docstring should start without a leading new line
H405: multi line docstring summary not separated with an empty line
Which do not appear currently in the repo. Enable them so that they
do not get introduced
Change-Id: I169969f606916b36f323f9fad0601f41fddaf8e4
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
Rename the stx-* repo references to drop the stx prefix.
Change-Id: I0f47cd0c438bec5ce3192ffe4fb56da17e795637
Signed-off-by: Don Penney <don.penney@windriver.com>
Add the base DevStack job and make sure bashate runs on
the devstack plugin files.
Begin to re-structure the plugin to match the common structure.
Add devstack/build.sh and split out the build steps into
separate functions in devstack/lib/stx-metal
This is complete, further work to be done in follow-up changes.
Change-Id: I05f6df758e18f182fb0a05731eddc6cb7f599e51
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I1bd6a3aebbbe539d4f21ca71c76d92e3c325c1e8
Closes-Bug: #1802032
Create host inventory services (api, conductor and agent) and
python-inventoryclient.
The inventory service collects the host resources and provides a
REST API and client to expose the host resources.
Create plugin for integration with system configuration (sysinv)
service.
This is the initial inventory service infratructure commit.
Puppet configuration, SM integration and host integration with
sysinv(systemconfig) changes are pending and planned to be
delivered in future commits.
Tests Performed:
Verify the changes are inert on config_controller installation
and provisioning.
Puppet and spec changes are required in order to create keystone,
database and activate inventory services.
Unit tests performed (when puppet configuration for keystone, database
is applied):
Trigger host configure_check, configure signals into
systemconfig(sysinv).
Verify python-inventoryclient and api service:
Disks and related storage resources are pending.
inventory host-cpu-list/show
inventory host-device-list/show/modify
inventory host-ethernetport-list/show
inventory host-lldp-neighbor-list
inventory host-lldp-agent-list/show
inventory host-memory-list/show
inventory host-node-list/show
inventory host-port-list/show
Tox Unit tests:
inventory: pep8
python-inventoryclient: py27, pep8, cover, pylint
Change-Id: I744ac0de098608c55b9356abf180cc36601cfb8d
Story: 2002950
Task: 22952
Signed-off-by: John Kung <john.kung@windriver.com>
The new flake8 version 3.6.0 introduces new warnings that cause
the check and gate jobs to fail. Locking down the flake8 version
to avoid these surprises in the future. We can later increment
the flake8 version and fix the new warnings in a controlled
manner.
Change-Id: I0cec95de9fe9d58536752038b94939962919d166
Partial-Bug: 1799721
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
* Use build-openstack-docs-pti job template for docs
* Use build-openstack-releasenotes job for release notes
(We can't use the OpenStack releasenotes template as it includes
publish jobs, stx needs its own)
* Add newnote tox environment as convenience for creating new release
notes, re-using the releasenotes venv.
* Create a release summary note.
Change-Id: I5a610cfe271707fd704248ede0db75be6d031121
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
use flake8 as pep8 tools
enable check and gate for pep8(voting)
Fix below flake8 issues:
E127 continuation line over-indented for visual indent
E211 whitespace before '('
E222 multiple spaces after operator
E302 expected 2 blank lines, found 1
E501 line too long (101 > 79 characters)
E502 the backslash is redundant between brackets
F401 'platform' imported but unused
W391 blank line at end of file
Change-Id: Idfb953e52c8ee35c2adefdf0e4143a381c7f49e2
Story: 2003426
Task: 24596
Signed-off-by: Sun Austin <austin.sun@intel.com>
Baseline changes to comply with Release Notes Management
based in Reno [0] a release notes manager.
[0] https://docs.openstack.org/reno/latest/
Story: 2003101
Task: 25744
Change-Id: Ib52641346d5a788df53a2bab97c98f2e1de0b170
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
Fix below linters issues
E001 Trailing Whitespace
E003 Indent not multiple of 4
E006 Line too long
E011 Then keyword is not on same line as if or elif keyword
E020 Function declaration not in format ^function name {$
E040 Syntax error: syntax error near unexpected token `;'
ignore cases are added in tox setup
E006 Line too long
E010: do not on the same line as for
Story: 2003368
Task: 24427
Change-Id: I6acf64271a4e608be8bc8fa965cac4fa31e0c05b
Signed-off-by: Sun Austin <austin.sun@intel.com>