Commit Graph

25 Commits

Author SHA1 Message Date
Al Bailey 5fff425f25 Update tox path for python3
- The reference to cgcs_patch was the older centos python2
location, and has now bee updated to the python3 debian
package.

- Removed 'legacy-resolver' from the pip install command.

- The basepython is now python3 and the upper-constraints
for debian and python3 are now specified.

- The older python2 to 3 conversion directives in pylint
have been removed, and only the errors that are currently
valid are being suppressed.

- The python2 vs python3 requirements are now updated to
only reflect python3.

- The zuul job for pylint specifies the debian nodeset.

- override tox constraints file to use the STX constraints
  This means starlingx/root needs to be a required project

None of these changes have any runtime effect.
These changes only affect tox and zuul.

Test Plan:
  PASS: tox

Story: 2010642
Task: 47916
Change-Id: I1cd8a78e5e26efc4b3d4b346749735e4de9f6016
Signed-off-by: Al Bailey <al.bailey@windriver.com>
2023-05-01 14:01:17 +00:00
Al Bailey 3136476a17 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: Ia05abf9e3a1fe3990716333fa88eb5c2b2865b10
2022-12-26 22:08:34 +00:00
Al Bailey fd9dfbfd9b Fix openstack-tox jobs for gui repo
The Zuul upper-constraints env variable declaration needed
to be added to tox.ini otherwise an older constraints
was being used which does not work with newer
versions of python.

Adding legacy-resolver to attempt to resolve dependency
issues when importing different stx client modules.

Partial-Bug: #1997255

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I88b779138aa3b19aca57e8f03f3c17ec077e7d58
2022-11-22 01:19:09 +00:00
albailey 927bee2d66 Use newer flake8 to run on ubuntu-focal Zuul machines
flake8 2.5.5  fails on ubuntu-focal zuul machines running python3.8
with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

The update updates the version constraint to use newer flake8.

pylint has been switched to running in python3 which has challenges
related to the new pip resolver. The correct version of Django cannot
be specified with the new resolver so the pylint errors caused
by the newer version are suppressed for now.

The docs targets for tox use their own install_command which
does not include an upper constraint.

A non ascii character was removed from the tox.ini file which
prevented running tox on some ubuntu envs.

Partial-Bug: 1895054
Signed-off-by: albailey <Al.Bailey@windriver.com>
Change-Id: Ic6a50c2ecf2a654fd883ed92fc305336741d4303
2020-12-21 12:34:37 -06:00
Sharath Kumar K 170ac040d2 Tox and Zuul job for the bandit code scan in stx/gui
Setting up the bandit tool for the scanning of HIGH severity issues
in the python codes under Starlingx/gui 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.

Story: 2007541
Task: 39683
Depends-On: https://review.opendev.org/#/c/721294/

Change-Id: I155c9f894f8b1d701f2c75e3e892e6b83a35b11e
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
2020-06-04 14:13:28 +00:00
albailey cf702a8390 Fix pylint zuul failure
The starlingx-staging repo was incorrectly being pointed at for tox
pylint dependencies.  The dependencies were colliding with
dependencies from other repos.

That repo is not used anymore, instead the latest stable stein is used.

This change points at the most recently released stable/stein horizon
(15.0.2) in the requirements.

This change has no effect on build or deployment, only tox.

The upper constraints zuul job overrides the stein upper constraints,
and therefore the oslo concurrency 4.0.0 released Feb 3rd is no
longer triggering a failed tox job.

Closes-Bug: 1861932
Change-Id: I3c3fd22993faf47c7e3c32bae18a7f2ab1dd031c
Signed-off-by: albailey <Al.Bailey@windriver.com>
2020-02-04 17:09:36 -06:00
Tyler Smith 5627f93254 Cleaning up gui plugin
- fixing bug url
- removing limit action and custom alarm query code
- simplifying logger setup in settings
- removing unused rickshaw enhancements
- deleting deprecated styling overrides from theme

Change-Id: I26de161295e37235419054aa350ffd868dd9586d
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-11-12 17:21:02 -05:00
Al Bailey 7eb463e4ba Fix failing tox for stx-gui due to keyring imports from sysinv
keyring is required by sysinv, however the upper-constraints were
not being used in stx-gui, so it was pulling in a version of
keyring that is incompatible with the STX env.

This aligns the stx-gui upper constraints to be the same as the
other platform components.

Change-Id: I2d4a2f7a61c65e2753d376865e9112aa93948a35
Related-Bug: 1848786
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-10-30 07:58:02 -05:00
Tyler Smith 57d102dc77 Fixing tox in developer environments
Changing zuul to use a different path to distcloud-client than
in developer environments.

Change-Id: I90e5da2bb2f3ee15e4600fb281b19f6982fc50b1
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-10-22 12:52:38 -04:00
Al Bailey 692e086a56 Fix tox and zuul files for re-org of packages
The cephclient was moved from integ to utilities.

The required projects in zuul are now alphabetized.

Change-Id: I5f52d3a4de8a5b7c617d14d98bb57519fafea4a1
Story: 2006166
Task: 36491
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-09-06 16:30:46 -05:00
chenyan 17336123bd api, ceph: modify ceph api code to fit for the new cephclient.
Closes-Bug: 1827658

Change-Id: Icb7e1e87b45c7f6c278a35ea962e9b214e7e87dd
Signed-off-by: chenyan <yan.chen@intel.com>
2019-05-16 15:04:53 +08:00
Dean Troyer 246ab4045a Followup opendev cleanup and test jobs
Change-Id: Ica4ad64c50e32c717478ed43015d6bbdd4759b89
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-21 16:09:58 -05:00
Zuul 4df7aeb120 Merge "Enable Bugbear Errors in Flake8" 2019-03-28 17:57:12 +00:00
Eric Barrett 5549ecccc0 Enable Bugbear Errors in Flake8
Flake8 currently ignores the following bugbear errors:
B005: Using .strip() with multi-character strings misleads the reader
B301: Python 3 does not include `.iter*` methods on dictionaries.
Enable them for more thorough testing of code

Change-Id: I34da4ac5d107e89b26828d53c84fa2167143b1e7
Story: 2004515
Task: 30241
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-28 13:01:45 -04:00
David Sullivan c75f3bb737 Move Controller services tab to stx-gui
Add a new tab to the system information panel. The new tab displays the
state of the controller services. This code was previously included in
the stx-upstream horizon repo.

Story: 2004552
Task: 30242
Change-Id: I223c60c18de782c637d0b67bad9b8dcfe71fd184
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
2019-03-28 12:12:51 -04:00
Al Bailey 43e07f799c Remove calls to non existant novaclient imports
The wrs_pci and wrs_providernet python files do
not exist in novaclient.

This change removes those imports.

The GUI code that is processing the results from
those imports is not currently been removed, as it may be
used by upcoming enhancements to sysinv.

Story: 2004751
Task: 29357
Change-Id: I39dfbdf60d9de008072253f1074fb2ee5c61df72
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-02-05 13:23:11 -06:00
Kristine Bujold e79dcfae87 Enable zuul unit tests for stx-gui
Enable pylint and fix tox errors resulting from that.

Story: 2003863
Task: 27931

Change-Id: I3455f29ec182ed91966d4724cf49dceb314a1387
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2018-11-23 14:29:29 -05:00
Kristine Bujold 182d8ff492 Enable zuul unit tests for stx-gui
Enable flake8 and fix tox errors resulting from that.

Story: 2003863
Task: 27930

Change-Id: Ia331856cbd6862d3c9341435450a391a7c2a2fef
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2018-11-14 17:07:30 -05:00
Kristine Bujold f1013be39f Enable zuul unit tests for stx-gui
Enable linters

Story: 2003863
Task: 26695

Change-Id: I4a6e2029bdf9c83422dd968c39341f2429b6e312
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2018-11-13 13:48:17 -05:00
98k 204859156f 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: Ib2cae95f16f9cc646f2567b62d994824d0546c16
2018-10-05 10:47:39 +00:00
Abraham Arce 1763a2d893 [Doc] Release Notes Management
Baseline changes to comply with Release Notes Management
based in Reno [0]:

* 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.

[0] https://docs.openstack.org/reno/latest/

Story: 2003101
Task: 26717

Change-Id: I03c426c9a493541a6b0be699bce59c69b3a6f3c3
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-25 05:44:57 -05:00
Abraham Arce f9fe2a4787 [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
- Use build-openstack-docs-pti job template for docs

[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: 26715

Story: 2002813
Task: 26716

Change-Id: Ida8172911766f055203ee6131a33fe40558d5fda
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2018-09-25 03:54:46 -05:00
Lachlan Plant 9cca5b0fff Fix pep8 errors for zuul
Fix all pep8 errors in stx-gui
Ignore E501,E129 errors (129 is unavoidable without breaking indent)
Story: 2003364
Task: 24419

Change-Id: Ie8d80078c4c9d78a8e0cda99d0b71bd87af883b0
Signed-off-by: Lachlan Plant <lachlan.plant@windriver.com>
2018-08-29 14:22:46 -05:00
Lachlan Plant cd9eaa3be0 Fix tox linters for zuul
Fix bashate and yamllint to only run if files are provided

Story: 2003364
Task: 24419

Change-Id: If78c2c11e6db353dfee4759d6db1d7526225b1f8
Signed-off-by: Lachlan Plant <lachlan.plant@windriver.com>
2018-08-23 11:47:12 -05:00
Dean Troyer c6dceb7001 Add default test framework
Change-Id: I5a20bfbd999cbf565a3904cb6f8b51d2d6e19b2f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-06-09 08:49:23 -05:00