Commit Graph

27 Commits

Author SHA1 Message Date
Al Bailey 5f85f2066a Update tox.ini to work with tox 4
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943

Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ib2aea53615a378ce47d2a2b23ec2e1946c312eed
2022-12-26 23:26:54 +00:00
Al Bailey dd5a24037d Fix bashate failure in zuul
This review allows this repo to pass zuul.

When tox is run locally it pulls in an older
bashate 0.6.0 but the zuul jobs are pulling in
the higher version.

Bashate 2.1.1 was releated Oct 6, 2022

Changed the upper constraints to allow developers
to pull in dependencies that are more aligned with zuul.

Fixed the new bashate error.
Also cleaned up the yamllint syntax.

Closes-Bug: 1991971
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I9cda349a20c63f9d222a3c3fc3645c5ceb4c2751
2022-10-06 17:22:12 +00:00
Hugo Brito 3f181357cc debian: port rvmc docker image to Debian
This commit enables the creation of rvmc docker image by both
distros: CentOS and Debian.

Test Plan:
PASS - Install DC subcloud using Debian image
1. Build rvmc image using stx-debian.
2. Push the new rvmc image to a DC lab registry.
3. Modify the dccommon subcloud_install pointing to the new rvmc image.
4. Install a new subcloud using the new rvmc image.
PASS - Install DC subcloud using CentOS image (same steps as Debian)

Story: 2009831
Task: 45969

Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
Change-Id: I11a9f331cfd1a03d7b5a99223203b240fb31d88b
2022-08-12 16:30:01 +00:00
Bernardo Decco b92357ad61 Add pylint py3 portability checks for the metal repo
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
2021-09-13 11:57:42 -03:00
Don Penney fcae730d65 Use newer flake8 to run on ubuntu-focal Zuul machines
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>
2020-09-09 17:59:49 -04:00
Sharath Kumar K ec62232936 Tox and Zuul job for the bandit code scan in starlingx/metal
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>
2020-06-29 08:24:46 +00:00
Al Bailey e68db45a2e Add pylint checks for python files in metal
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>
2020-01-03 13:27:00 -06:00
Don Penney 2cbb73f862 Update tox.ini files to use stein constraints
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>
2019-06-25 13:20:35 -04:00
Eric Barrett fc77b27c3f Enable Non-Occurring Flake8 Errors
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>
2019-06-17 20:21:29 +00:00
Zuul cf01c97ab2 Merge "Update tox.ini files to adapt to repo renaming" 2019-04-22 21:18:53 +00:00
Don Penney d6d9639c63 Update tox.ini files to adapt to repo renaming
Rename the stx-* repo references to drop the stx prefix.

Change-Id: I0f47cd0c438bec5ce3192ffe4fb56da17e795637
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-04-22 15:40:23 -04:00
Dean Troyer c84ce08dc7 Followup opendev cleanup and test jobs
Depends-On: https://review.opendev.org/653964
Depends-On: https://review.opendev.org/653961
Depends-On: https://review.opendev.org/654013
Depends-On: https://review.opendev.org/654024
Change-Id: Id3f05219865a595a2a9f36e83a4ad6bbfd0e16fc
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-22 16:42:03 +00:00
Zuul 348857cc49 Merge "Add devstack job and fix linters" 2019-02-11 20:41:30 +00:00
Dean Troyer 5133f09a0f Add devstack job and fix linters
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>
2019-02-07 11:28:14 -06:00
98k 90cb458f7e fix tox python3 overrides
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
2019-01-12 03:06:01 +00:00
John Kung bd998017d5 SysInv Decoupling: Create Inventory Service
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>
2018-12-06 13:17:35 -05:00
Bart Wensley dcfee58e7b Lock down flake8 version
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>
2018-10-24 10:08:38 -05:00
Dean Troyer a2dc830d33 Add some jobs for docs and releasenotes
* 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>
2018-09-13 20:59:12 -05:00
Zuul 6e094435f0 Merge "[Doc] OpenStack API Reference Guide" 2018-09-13 14:23:17 +00:00
Zuul 2cbcd3e282 Merge "[Doc] Release Notes Management" 2018-09-13 14:17:53 +00:00
Zuul d80884b5da Merge "[Doc] Building docs following Docs Contrib Guide" 2018-09-13 14:17:50 +00:00
Sun Austin 90ce692186 pep8 job enable and fix pep8 reported issue
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>
2018-09-06 09:45:51 +08:00
Abraham Arce 0162fa2526 [Doc] OpenStack API Reference Guide
Baseline changes to comply with OpenStack API documentation
from OpenStack Documentation Contributor Guide [0]:

- [1] How to document your OpenStack API service

[0] https://docs.openstack.org/doc-contrib-guide
[1] https://docs.openstack.org/doc-contrib-guide/api-guides.html

Story: 2002712
Task: 24451

Change-Id: I91f7640583081c83d3d43786e979ccfb5bee0490
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-05 19:59:26 -05:00
Abraham Arce 61abc3aafc [Doc] Release Notes Management
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>
2018-09-05 19:59:26 -05:00
Abraham Arce 451bad46e9 [Doc] Building docs following Docs Contrib Guide
Baseline changes to comply with OpenStack Documentation
Contributor Guide [0] starting with the following sections:

- Project guide setup
  - [1] sphinx-quickstart
  - [2] doc/source/ layout
- Building documentation
  - [3] tox -e docs
- Using documentation tools
  - [4] openstackdocstheme

[0] https://docs.openstack.org/doc-contrib-guide
[1] http://www.sphinx-doc.org/en/master/usage/quickstart.html
[2] https://docs.openstack.org/doc-contrib-guide/project-guides.html
[3] https://docs.openstack.org/doc-contrib-guide/docs-builds.html
[4] https://docs.openstack.org/openstackdocstheme/

Story: 2002708
Task: 24449

Story: 2002813
Task: 24450

Change-Id: I961c7c90c51248926d11b2a2a89c0231f58f7fd0
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-05 19:59:26 -05:00
Sun Austin fedb95ba79 Fix linters issues and enable tox/zuul linters job as gate
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>
2018-09-05 09:02:25 +08:00
Dean Troyer 3d9425425a Add default test framework
Change-Id: I18bfbf72a120b6832fbc52e630cb3c96daa663b1
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-06-11 18:51:02 -05:00