Commit Graph

106 Commits

Author SHA1 Message Date
zhurong b68a216bb7 Fix tox 4 compatibility
Change-Id: I6bb3ef7ea197a7dfc384991c17e526c23e4b2fed
2023-03-03 01:27:07 +00:00
LeopardMa 8c64ac7f91 Update python testing as per zed cycle teting runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Removing the py36 centos8 job as well as
updating the python classifier also to reflect the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.htm

Change-Id: I269d1ca0b763d7806a3cec9d1be425d68f68fa67
2022-06-04 15:41:50 +08:00
Ghanshyam Mann 921a53adf1 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I76fd7b48f3377fb20b86e1bc6fe7b0b49cf8f2f9
2022-04-30 19:12:14 -05:00
zhurong 9931c35dfe Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove obsolete sections from setup.cfg
- Remove babel.cfg, this is not needed here at all
- Update requirements, no need for python_version anymore
- Use newer openstackdocstheme and Sphinx versions
- Remove install_command from tox.ini, the default is fine
- Use TOX_CONSTRAINTS_FILE, UPPER_CONSTRAINTS_FILE is obsolete

Change-Id: Ic40d3fdaac00791fb150c1dc68a35d53ec30043d
2020-05-11 11:25:07 +08:00
Corey Bryant fe543a67c7 Monkey patch original current_thread _active
Monkey patch the original current_thread to use the up-to-date _active
global variable. This solution is based on that documented at:
https://github.com/eventlet/eventlet/issues/592

Also disable E402 to allow the change in.

Change-Id: I508fcd0707ecdd2bf720303f6cbb4087a38aaadd
Closes-Bug: #1863021
2020-05-06 00:52:04 +03:00
Sean McGinnis 5f30115659
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I0edbf803622a5a7212845fa73750283aa783c7a2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:44 -05:00
Andreas Jaeger d1dae85ac7 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Change-Id: Ibe28b6b6bf3927e80816f0c5f1cb972fb6e2374b
2020-03-30 11:59:26 +02:00
Ghanshyam Mann 5e12408b76 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Murano is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: Iac87c01defbd7de3f14f13e5632aec899d920d1b
2019-11-25 08:28:00 +00:00
zhurong 80f794d92c PDF documentation build
Change-Id: I82a00f5f200fddcda2664eab87befbbe7496bf17
2019-09-16 23:48:31 -07:00
Andreas Jaeger f83cbd4a38 Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I222964e47eebed6b3593b1954766a0691802ffef
2019-07-30 19:52:00 +02:00
zhurong 4ee97f7b7a Bump to hacking 1.1.0
Change-Id: I4019f41d9ddd843872855e6e80c0667ee2df758a
2019-07-04 11:51:47 +00:00
zhurong e9cde491c0 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I8f239503acb2f7d9a7330ed093e77e69ff52701c
Story: #2005924
Task: #34214
2019-07-03 17:05:23 +08:00
Zuul a54d2d2645 Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-06-28 04:25:17 +00:00
Elod Illes ddd5378ac8 Add local bindep.txt
As it was announced [1] global bindep-fallback.txt was removed and now
projects need to have a local bindep.txt to be able to install binary
dependencies for testing.

In test jobs the script tools/test-setup.sh is called which requires
mysql and postgres servers and clients to be installed.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html

Change-Id: I37d64aca485eb81ac16d7d85d5b695e573c8793c
2019-06-26 12:35:58 +02:00
zhulingjie ecf8effdfa Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org counterparts.

Change-Id: Id506aad04b878ba516872ef0169664f47f6eaab0
2019-06-25 14:43:40 +08:00
zhurong 808fc6408c Add deps for api-ref
Change-Id: Idaad27283ef453be2d044c9f91524a37a6db9526
2019-06-18 13:59:47 +08:00
zhurong d26b42250e Remove the unused DISCOVER_DIRECTORY param
Change-Id: Idf3773edae292b6bbd413b7e5a7e48a561ac177a
2019-04-22 19:17:20 +08:00
Ghanshyam Mann 0bb49e7b91 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I7d3fab02f1ae89aa6c675ce19a9858a1729323c1
2019-04-15 18:33:52 +00:00
sunqingliang6 00b44ba8da update minversion to 2.0 in tox.ini
Change-Id: I868cb8d28481a39269723e4a1ef402dae6316483
2018-11-12 09:56:25 +08:00
zhurong aa4e9fabc1 Use standard cover tox env
Change-Id: I5710cd4d5a8ff95a17e5ef8dae4716fbb333dcf8
2018-09-10 10:42:13 +08:00
zhurong acd6165933 Update py27-ocata to py27-queens
Change-Id: I2f1b64ff724c1367d50857b84393d10a7b58b02c
2018-07-30 08:19:32 +08:00
Zuul 3fc25ae547 Merge "Switch to using stestr" 2018-07-17 06:07:08 +00:00
Nguyen Van Trung 640bdac0ac Switch to using stestr
According to Openstack summit session [1] stestr is maintained
project to which all Openstack projects should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ib27496313447cac962e4849223ab9eb96a9d873f
2018-07-09 15:15:17 +07:00
Nguyen Van Trung 5fbbac4e9a Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more details information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: If77e673564f65879f6f56000444ee7601b44e5bc
2018-07-09 15:02:05 +07:00
Doug Hellmann 43729dec6d 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: I3dc0d03eb3d9d41e3929d7e0e68ef93f45aef986
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 16:06:03 -04:00
Doug Hellmann 01b0af0211 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Icc7b5a39ef7e29f25ebfe8a10a4b8edba115505a
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 15:54:58 -04:00
Andreas Jaeger abb58a8d06 Remove separate firstapp build
With the large reorg of the docs site, this can be easily *only* as
part of the murano documentation, there's no benefit for publishing an
extra document elsewhere. Fully integrate the documents into the manual.

Note that the separate build target was not linked from any of our index
sites.

Remove extra title from README.rst, it let to duplicated title in main
table of contents.

Remove also post job for publishing the firstapp document - it currently fails -
and is now not needed anymore.

Change-Id: Ib5259907b3f999062042e483ac81e6aed17705ca
2017-11-16 15:57:24 +01:00
yushangbin 14983c7334 Remove install-guide env which is no longer effective
The install-guide directory was moved to doc/source directory when
migrating docs.

Change-Id: I11fde72389c9be59b4f3285574e898391c3534f0
2017-07-31 17:04:26 +08:00
Felipe Monteiro 7cc0980232 Add idempotent_id decorators to murano_tempest_tests
This commit does 2 things:
  1) Adds idempotent_id decorators to murano_tempest_tests using
     check-uuid --package murano_tempest_tests --fix

  2) Fixes the external white list error that is thrown by tox -e pep8
     (which uses bandit but which was previously not included in
      whitelist_externals)

Change-Id: I8d75601a40baf5749f12151df18a116e8fab628c
2017-07-24 20:33:49 +01:00
Felipe Monteiro b360bf7ab7 Add policy sample generation
This adds the entry point and config file necessary for using the
oslo.policy sample generation script. It also adds a tox target to
simplify the usage of it. Finally, this commit adds
murano.common.policies.base.list_rules to
murano.common.polices (__init__.py) so that the base rules are
also included in the generated policy file.

Note that the policy sample is generated as a YAML which is
the standard adopted by Nova [0] and Keystone [1] and is now
the standard across OpenStack since Ocata [2]:

    While the old json format policy file is still supported,
    we recommend using the newer YAML format file, more intuitive
    syntax.

The output from tox -egenpolicy will be:

    murano.policy.sample.yaml in murano/etc.

The policy documentation was already updated in
I1a8581a559e4333a74d56a5bdce7e6d1f117907d

[0] e845d66a1b/etc/nova/nova-policy-generator.conf
[1] https://github.com/openstack/keystone/blob/master/config-generator/keystone-policy-generator.conf
[2] https://docs.openstack.org/ocata/config-reference/policy-yaml-file.html#older-json-format-policy

Change-Id: I2356ac0b2033bd83caaf2672189670fc300e55fd
Partially-Implements: blueprint policy-in-code
2017-06-17 16:11:17 +01:00
Van Hung Pham 2ee53dcae6 Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in error. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: I64ad33b0076dd8c12981e966ef8a0c141d18c89d
2017-06-16 03:24:49 +00:00
Kirill Zaitsev be3cf5af28 Rename py27-mitaka to py72-ocata
This commit updates the N-1 job to work on a ocata constraints instead
of mitaka ones. The job is used to verify, that murano can be used on
previous cycle requirements

Change-Id: Icd5f58c1c603dbfe73b73963c04bb6bbd64248a1
2017-05-10 16:08:06 +03:00
Nicolas 802f8607e1 Add bandit job to the pep8 gate for Murano
This patch updates the pep8 tox job to also run bandit,
as is the convention across most projects.
The predefined bandit tox job is referenced by the pep8 tox job.

Change-Id: Ief99196c04f69499bcf328ec202971f82ff3c32e
2017-04-27 23:22:20 +00:00
Tin Lam 6e602c3849 Adding bandit.yaml configuration to bandit
Per change in [0], it is better to whitelist or blacklist bandit rules
via a bandit configuration file [1] rather than continually modifying
tox.ini's parameter list.

[0] https://review.openstack.org/#/c/456370/
[1] https://docs.openstack.org/developer/bandit/config.html

Change-Id: I3a4e1e947470de6d712de5e663c9a2f7d7c242c0
2017-04-19 22:29:37 +00:00
Sam Pilla b879ae42d0 Add `--skip B104` for Bandit issues
Running `tox -e bandit` will raise two `B104: hardcoded_bind_all_interfaces`
issues. As of now there is no best practice except to add `# nosec` or to
add `--skip B104` to ignore the test. This patch adds the latter.

Change-Id: I8576a0dd5e70e3ec2934c3fb28810cb935686e64
2017-04-13 13:20:58 -05:00
Samuel Pilla 3a4366e9b3 Adding bandit target to ``tox.ini``
This patch set adds a basic bandit check for murano.  It can be invoked by
running the tox environment for bandit: ``$ tox -ebandit``.  This is
intended as a starting point for using bandit with murano, and it should
be revisited to improve the testing.

* added bandit target to tox.ini
* added requirement to test-requirements.txt

Change-Id: I2947183331204e8dad5de95186e199458062c3e6
2017-04-09 02:07:08 -05:00
Felipe Monteiro f72d767a93 Create official murano install guide.
Currently, murano does not have an official murano install guide
located at [0], which affects murano maturity at [1].

This patch creates the official murano install guide following
the tutorial here: [2].

Also adds tox entry for generating the install guide.

[0] https://docs.openstack.org/project-install-guide/ocata/ubuntu-services.html
[1] https://www.openstack.org/software/releases/ocata/components/murano
[2] https://docs.openstack.org/contributor-guide/project-install-guide.html

Change-Id: I98052b646f3b1e97915aa7382dd2e60eaa4a6137
2017-03-17 16:45:17 +00:00
Jenkins 2daf7cee2f Merge "Initial commit for murano api-ref" 2017-03-03 09:43:26 +00:00
Cao Xuan Hoang 29129e8be7 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Id2e67b9b8ffa696c75468801226143912f761c29
2017-02-08 11:20:18 +07:00
Jenkins 3d8559b4e6 Merge "Add debug to tox enviroment" 2017-01-24 22:23:53 +00:00
zhurong 43a15dddd9 Exclude build dir for flake8 test
Change-Id: Iec76a987cb90700af52e76e50ed358669b6c9437
2017-01-17 14:58:07 +08:00
zhurong 58bfa24cec Add debug to tox enviroment
We can simply run `tox -e debug <test_name>` to debug test.

Change-Id: Ibb46d95eb44f929b27cec672095cf0c70dcfa9d8
2017-01-17 10:39:07 +08:00
zhurong 12a7f8e455 Initial commit for murano api-ref
This is the first commit for add murano api-ref.

Partially-Implements: blueprint murano-api-ref
Change-Id: I943e01f5ab8721e0452d900e5e24540cbdeb9fa2
2017-01-03 15:30:35 +08:00
Andreas Jaeger dc2fede063 Improve first app builds
The complete html tree gets published but the .doctree is not needed for
publishing, place it outside of the html tree so that it won't pushed to
the website.

Also, only build html documents.

Fix bug_project, the report a bug URL should point to murano and not to
the api project.

Change-Id: Icf0c901257b452d216d293eb3f1c7b447b58201d
2016-10-14 16:51:00 +02:00
emashkin 301482c729 [Docs] Add skeleton for My first Murano app guide
Add skeleton for "My first Murano app" guide for third parties
developers. It is needed for voting job creation in project-config that
builds this guide but does not publish it.

The main purpose of this tutorial is to facilitate the learning process
for Murano App newcome developers and show how it's easy to create a
Murano App for their own cloud applications from scratch. This guide
outlines the creation of Plone Murano App step by step:
https://review.openstack.org/#/c/346492/

Change-Id: Ib184891f7c4c94b0bb2ded92648302eaecad6b5b
2016-10-06 14:14:35 +00:00
AvnishPal 5ff901ba1f Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs

Change-Id: I06babce38bd90550f3d5d169e424209bc10ab11f
Closes-Bug: #1614361
2016-08-22 17:02:37 +05:30
LiuNanke e113f12afa Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: Ied8b8b15761c282333c5a43ccdcc625be6930b9c
2016-08-01 20:04:16 +08:00
Kirill Zaitsev 51cd192276 Add py27-mitaka tox target
Adding a mitaka tox target, that will allow testing current code against
mitaka upper constraints.

Change-Id: I02969509c620d9872b48a57e69455cd00a7da334
2016-07-11 20:33:18 +03:00
zhurong 317e9bfe5e Use upper-constraints in tox test environments
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
wide world changes in a way that you don't expect.

The releasenotes job has no constraints file, so override the install
command there.

Change-Id: Ib08baa8f57a281c75247ba3d9b9ab0211fe5d4fd
Partial-bug: #1598906
2016-07-06 09:52:00 -04:00
Victor Stinner 9c45ec7e6f Finish porting unit tests to Python 3
Port the last unit tests to Python 3, test_test_runner:

* TestCaseShell constructor: don't replace sys.stdout and sys.stderr
  by StringIO, it's useless and prevent using print() to debug
  failing unit tests.
* shell(): use mock.patch() to replace sys.stdout and sys.stderr
* test_version(): on Python 3, the version is written into stdout,
  not stderr.
* test_package_is_not_provided(): the exact error message changes on
  Python 3.

test_migrations:

* Use a byte string for archive and logo BLOBs

Remove whitelist of tests running on Python 3 from tox.ini since all
unit tests now pass on Python 3!

Blueprint: murano-python-3-support
Change-Id: Ic795b99526746ac0c06427001e4da27275b76d84
2016-06-20 16:31:01 +02:00