Commit Graph

31 Commits

Author SHA1 Message Date
Martin Chacon Piza 873cbf82f6 Rename tenant with project_id
Since oslo.context=4.0.0 Feb 3, 2022  the deprecated argument
tenant was removed [1]

- Bump docutils in lower-constraints and test-requirements

[1] f4cbe4c296

Change-Id: I703d49f5e5870bf45030fc5502749e197aae3a3b
2022-04-06 11:04:08 +02:00
Ghanshyam Mann c491b34888 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ibb26169656785330e7d86a362fd110222fb63a07
2021-02-02 17:44:35 +00:00
Ghanshyam Mann 850710c46f Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I931ffdb03ea55047439d019ccb8a1493b56f2569
2020-05-12 19:29:44 -05:00
Andreas Jaeger 2ebc766534 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: Ia16e8cbccf7b38be8909aa94e66c04b99f200b89
2020-04-24 12:41:05 +00:00
Sean McGinnis f38a954fd2
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ie775b99cdb645f072c0a22fa1a1a47448970b103
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:54:48 -05:00
Witek Bedyk 40b808647e Blacklist bandit 1.6.0
There's a regression[0] in bandit 1.6.0 which causes bandit to stop
respecting excluded directories, and our tests throw a bunch of
violations. Blacklist this version, but allow newer versions as there is
already a pull request[1] to fix it, and it is expected to be included
in the next release.

[0] https://github.com/PyCQA/bandit/issues/488
[1] https://github.com/PyCQA/bandit/pull/489

Change-Id: If2e5f82279981ced89da6fc134a238105be60d8b
Story: 2005676
Task: 30988
2019-05-14 16:55:01 +02:00
melissaml 841041c932 Update hacking version to latest
Change-Id: Ib3b21290c0c2f60dde3260eff2b344984eaf1461
2019-01-06 17:37:01 +08:00
Zuul 7257c671c9 Merge "Add check for rst syntax" 2018-07-19 11:23:00 +00:00
Witold Bedyk b18cde2dc8 Add check for rst syntax
Creating the release would fail if the syntax of README.rst is not
correct. Let's check it in the pep8 environment.

Story: 2002163
Task: 23044
Change-Id: I2856622af08cec7c801959ca85f4c77252263db5
2018-07-18 16:11:30 +02:00
Charles Short 7903657bd1 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: Iebd6f34335e4ef0dd3629e970661d8c9ef08754a
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-07-16 11:40:15 +02:00
OpenStack Proposal Bot 160e0466a7 Updated from global requirements
Change-Id: I46277d05cb9af9fcf2eefaa530b2f08b7aaa550e
2018-03-23 01:09:39 +00:00
Witold Bedyk d9ce0ec761 Remove not used mox library
Change-Id: I5207bb5d7a5fc6a45a7a5884d1eb022c10d7b36b
2018-01-17 15:23:58 +01:00
OpenStack Proposal Bot c81964c737 Updated from global requirements
Change-Id: I7ec250debcd7ddf4a23c3906c231090c5b186b35
2018-01-16 04:13:05 +00:00
Amir Mofakhar 4250756a1f Implemented a policy enforcement engine
Under monasca_common/policy an enforcement engine is added for using
oslo.policy in the other monasca projects.
There are same methods as in enforcement engings currently used in
nova and keystone projects.
Also added unit tests under tests/policy for testing implemented
methods.

Task: 6105
Story: 2001233

Change-Id: Ic5402ba0986416c9386c1dc3fc1559f148ea9625
Signed-off-by: Amir Mofakhar <amofakhar@op5.com>
2017-12-19 15:16:09 +01:00
OpenStack Proposal Bot b2bda29d20 Updated from global requirements
Change-Id: If140ece1d81a2e39ecaeb5a30623889337d41eaf
2017-11-16 11:10:37 +00:00
zhangyangyang 5711485cf2 Cleanup test-requirements
python-subunit is not used directly anywhere
and it is dependency of both testrepository
and os-testr
(probably was used by some tox wrapper script before)

Change-Id: I9614d3dcfc007c27c271907372ee26a2cd55d298
2017-09-21 19:12:52 +08:00
OpenStack Proposal Bot 32fb6f063a Updated from global requirements
Change-Id: Iff5af8970ba8472774b95251df3801381a3f6d17
2017-09-13 00:06:29 +00:00
OpenStack Proposal Bot 7fb6be59a1 Updated from global requirements
Change-Id: I12e9b8e29ea0589aab1d17c41813db96b577c735
2017-08-18 04:43:22 +00:00
OpenStack Proposal Bot 1279947a62 Updated from global requirements
Change-Id: I2c1a2b08e537ae96d4a46777836254483fe62146
2017-05-15 00:46:47 +00:00
OpenStack Proposal Bot c2c84a7a5f Updated from global requirements
Change-Id: I684d43a2193e3543327f855bff094f0109bfb278
2017-04-07 06:07:27 +00:00
OpenStack Proposal Bot 7b18e479f9 Updated from global requirements
Change-Id: I3e5dce79d0714135ed122c4f036572644ed195a6
2017-03-07 05:46:17 +00:00
Tomasz Trębski cabc2ddd5f Migrate to ostestr framework and PY3
Following commits does several things:

* migrates CI of monasca-common to ostestr
* enables PY35 compatybility

Also:

* marked one tests as excluded under PY35 because changing
it would require affecting embedded kafka library which
will be eventually removed in future

Change-Id: I432a466e2620bc8d305ef2630307b636461c8e81
2017-03-02 19:51:04 +01:00
ricolin c3265ee7d2 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: I60333b309b63d3078428f588855b3c7b8a69fb90
2017-03-02 19:25:13 +08:00
OpenStack Proposal Bot 80d93fcad4 Updated from global requirements
Change-Id: I524ab9e1beee6761d1b8a8324307cdbf514669b7
2017-02-10 05:51:16 +00:00
Craig Bryant e8005cf1f1 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Had to ignore assert check since those are use for performance in the
validation code. Also, skipped bandit checks of monasca_common/kafka_lib
since that is just a clone of kafka-python and will be deleted in the
future

Change-Id: Ie2e726a8e45ef463c4e863792eed663ee472ed07
2017-02-09 09:04:56 -07:00
OpenStack Proposal Bot b28f16fcfc Updated from global requirements
Change-Id: I7adeb6517e694d95a411bae4041d6fea2d960213
2016-10-27 12:15:42 +00:00
Swapnil Kulkarni (coolsvap) 1e33980acc Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: I4e7a351d7c294728db0d2d0f65e829f0fae0dbcb
2016-07-22 06:29:35 +00:00
OpenStack Proposal Bot e22862bccd Updated from global requirements
Change-Id: I189ea43268f561a36950619683b8da8b38536689
2016-07-01 16:06:45 +00:00
Laszlo Hegedus c98478df18 Make monasca-common pep8 compatible
Cleaned up test-requirements.txt in order to use the latest hacking
package.
Removed the ignored pep8 checks and made the code pass all of them.

Also removed the OpenStack Foundation copyright notice that was put
there accidentally before.

Change-Id: I3d287eb71fc2bf0e4d52856c11cbc8a347cac2ed
2016-06-04 09:22:43 +00:00
Andreas Jaeger 94882c2fad Remove sphinx requires from test-requirements
This repository does not have any RST documents and thus building
with sphinx is not supported. Remove the docs requirements, including
some dead requirements.

Change-Id: I3bae1d112d7c51c186d5877eb5586e9566decc80
2016-03-29 19:52:32 +02:00
cindy oneill 21d3947845 initial python monasca-common code in monasca_common
This is the start of a python monasca-common package.
Initially it has a common python logging config,
common oslo opts, and mysql common code.

Change-Id: I15c32b72fc42a8c5ce9eeedf20ca3a11907bf29f
2015-09-01 13:56:39 -06:00