Commit Graph

34 Commits

Author SHA1 Message Date
Ghanshyam Mann 9b22cf5f8f Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg

Change-Id: I850407259de142c1022ab06c04c6b8c035feaac4
2024-01-11 16:19:14 -08:00
Ghanshyam 93129eb742 Revert "Moves supported python runtimes from version 3.8 to 3.10"
This reverts commit 67a3d3b0db.

Keeping Python 3.10 in setup.cfg classifier and zuul.yaml changes.

Reason for revert:

Needed-By: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/882175

TC has been discussing about re-adding the python 3.8
testing in current master 2023.2 release testing.

- https://meetings.opendev.org/meetings/tc/2023/tc.2023-04-25-18.00.log.html#l-191
- https://lists.openstack.org/pipermail/openstack-discuss/2023-April/033469.html

While governance changes are under review, TC agreed to add py3.8 testing
so that we do not see more project/lib dropping python 3.8 and make them
uninstalable on python 3.8

- https://meetings.opendev.org/meetings/tc/2023/tc.2023-05-02-18.00.log.html#l-17
- https://review.opendev.org/c/openstack/governance/+/882165

Also adding py3.8 testing back in job https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/882175

Change-Id: I50a55442701be16bae3b7ae2035743b9f174dcfd
2023-05-05 18:52:47 +00:00
Hervé Beraud 67a3d3b0db Moves supported python runtimes from version 3.8 to 3.10
Within 2023.2 python version 3.9 and 3.10 are the
supported python runtimes [1].
[1] https://review.opendev.org/c/openstack/governance/+/872232

Change-Id: I82682282703def588ce95b9b0067651ccf5ce924
2023-04-10 16:27:16 +00:00
Hervé Beraud 6471443811 Drop python3.6/3.7 support in testing runtime
In Zed cycle testing runtime, we are targetting to drop the
python 3.6/3.7 support, project started adding python 3.8 as minimum,

example nova:
- 56b5aed08c/setup.cfg (L13)

Change-Id: Icd143d8880666c1282e1e7821c108ab3e4de7813
2022-05-05 16:14:04 +02:00
dengzhaosen 641b4f7ae0 Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I977e8e5d1a4e4b4aeebf484cfb2fca28dec7b724
2021-12-21 17:47:24 +08:00
yangyawei 5713170c3e setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I58b9521882d81ab508bb7ce28308d88771daf1fe
2021-05-14 17:22:01 +08:00
Ghanshyam Mann e40632bb4b Add oslopolicy-convert-json-to-yaml tool
Add ``oslopolicy-convert-json-to-yaml`` tool which can be
used to convert the json formatted policy file to yaml format.
It takes json formatted policy file as input and convert it to
a yaml formatted policy file similar to 'oslopolicy-sample-generator'
tool except keeping the overridden rule as uncommented.

This tool does the following:

* Comment out any rules that match the default from policy-in-code.
* Keep rules uncommented if rule is overridden.
* Does not auto add the deprecated rules in the file unless it not already
  present in the file.
* Keep any extra rules or already exist deprecated rules uncommented
  but at the end of the file with a warning text.

I did not add the new functionality in existing 'oslopolicy-policy-upgrade'
tool because the above listed features of new tool end up creating a
complete different code path instead of reusing it from existing tool so it
better to have separate tool which can be removed in future once all deployments
are migrated to YAML formatted file.

This commits add doc and reno also for this tool

Partial implement blueprint policy-json-to-yaml

Change-Id: Icc245951b2992cc09a891516ffd14f3d4c009920
2020-08-27 16:33:29 +00:00
Ben Nemec 283768e910 Add oslopolicy-validator tool
As requested in the referenced RFE bug, this is a validator tool
similar to the oslo.config validator tool that operators can use to
look for basic errors in their policy files.

It's very similar to the redundant rule tool, but I decided not to
combine them because I feel like the target use cases are enough
different to warrant separate tools. Specifically, the redundant
rule tool is looking for perfectly valid rules that just happen to
be unnecessary. The validator is looking for errors in the policy
file. While it's unlikely someone looking for redundant rules wouldn't
also want to know if there is something broken in their policy file,
it's likely that someone just looking to sanity check their policy
before deployment wouldn't want to see a bunch of messages about
redundant rules that won't cause any problems.

Change-Id: I799a754aceac080c11baffd7ff635b2a9cb825f7
Closes-Bug: 1853038
2020-06-26 14:55:26 +00:00
melissaml 9f025d08ff Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: I01d74cb5ff4701ca537dc3ec0f877b45cda7c895
2020-05-15 11:08:42 +08:00
Sean McGinnis dec467206c
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I602d143c89792824a2f206cdb45667b2f97e2e67
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:13 -05:00
Hervé Beraud 5fb2045c7a [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in Ussuri cycle.

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

Change-Id: If6a07eee86a2aaf65bdf9fbb338809ad47e02a46
2020-02-06 07:21:40 +00:00
Corey Bryant b7da7a92ad 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: I64676b14b8a69d07e1b5fdc85e2a29523d4cf31d
Story: #2005924
Task: #34234
2019-07-05 14:55:57 -04:00
Ghanshyam Mann bf400ddf34 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: Ic757ff7963f1dabd70610a884a4c61e747cd3961
2019-04-15 01:17:27 +00:00
wangxiyuan ab28b32ee9 Add policy-upgrade tool
Add a new "oslopolicy-policy-upgrade" commnd. Using this command,
operator can upgrade their self-defined policy files to follow
the new format in the new release when upgrading OpenStack services.

Change-Id: Iad9740bd8a5e4fdf1d1e64d61bc93f2483c531f3
2018-12-11 10:32:47 +08:00
ZhongShengping eeb68896b9 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I84f738109f098415496619df423db7778b2fdcf2
2018-12-04 09:47:03 +08:00
Davanum Srinivas 7e185ad96b http/https check rules as stevedore extensions
Why? HttpCheck/HttpsCheck are examples of rule checks
that can be implemented outside of the oslo.policy
library. Once we setup the infra for registering and
using these as stevedore extensions, we automatically
get the capability of other folks contributing to
writing custom rules for their own use cases.

* Add HttpCheck/HttpsCheck as entrypoints in setup.cfg
* parser will check get_extensions() to see if there
  are any external checks registered
* Move HttpCheck/HttpsCheck into external module
* Move related test cases to test_external.py

Change-Id: Icde2b26a38d7c7842defae053228d9208454b969
2017-10-05 08:40:47 -04:00
ChangBo Guo(gcb) 3fe7d8e474 Update URLs in documents according to document migration
Change-Id: I7c9a0cef77d8564b8c6f0513da985b8ed0a404b9
2017-07-12 23:01:31 +08:00
Doug Hellmann 88a104d852 move existing documentation into new standard layout
Change-Id: Iaefc26222d42663423f736946dea97c5613b7d1c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 16:46:38 -04:00
Stephen Finucane 886d8c6dab Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section.  Migrate the
setting from the old warnerrors one.

There are some invalid docstrings. These are cleaned up.

Change-Id: Ic6a028bab428b23255f36e5b2d64ee8d4d32978d
2017-03-20 10:11:47 +00:00
Eric Brown b0621b439c Remove references to Python 3.4
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.

Change-Id: I1459093004581ea89c95e38a90f199ab4930d4ea
2017-01-09 10:17:01 -08:00
Luong Anh Tuan 9bba72c06c Changed the home-page link
Set the correct url link for home-page

Change-Id: I72da413012e2a967c4b7e0095b3452e7272fd19b
2016-10-11 16:06:59 +07:00
ChangBo Guo(gcb) 72043117a0 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: I712c4e32e4db3e5ef826c69a11b8c3338753906f
2016-07-12 16:40:47 +08:00
Andrew Laski 202340cebd Fix mispelled method name in setup.cfg
The oslopolicy-policy-generator script was configured to use a method
named genarate_policy. Unfortunately that method does not exist but
there is one called generate_policy. This fixes the mistake.

Change-Id: I04125bb3305f695e156e901543393abfae527a09
2016-07-06 15:08:57 -04:00
Andrew Laski 85ebe9eb5f Add helper scripts for generating policy info
This adds two helper scripts that consuming projects can use to get
information that helps deployers.

The oslopolicy-policy-generator script looks at an entry_point for a
configured policy.Enforcer and outputs a yaml formatted policy file for
that configuration. This is a merge of registered rules and configured
rules.

The oslopolicy_list_redundant script looks at an entry_point for a
configured policy.Enforcer and outputs a yaml formatted policy file with
a list of policies where the registered default matches the project
configuration. These are policies that can be removed from the
configuration file(s) without affecting policy.

Change-Id: Ibe4e6c9288768bcc8f532e384524580c57e58275
Implements: bp policy-sample-generation
2016-06-08 15:12:53 -04:00
Andrew Laski 474c120ae6 Add sample file generation script and helper methods
This adds a console script to oslo.policy that will output a sample
policy file in yaml format. It works by looking at the configured
namespace(s) under an 'oslo.policy.policies' entry point. A method, or
methods, should be provided which return a list of
oslo_policy.policy.RuleDefault objects.

To use this script add an entry to setup.cfg in a project with something
like:

oslo.policy.policies =
    nova.api = nova.api.opts:list_policies

list_policies should be a method which returns a list of
oslo_policy.policy.RuleDefault objects.

Then run it like:

oslopolicy-sample-generator --namespace nova.api

--output-file can also be specified, or those options can be configured
in a file which can be specified with --config-file.

Change-Id: If25d48313b91a6610119220e13f635c6e28b2a59
Partially-Implements: bp policy-sample-generation
2016-06-06 10:12:04 -04:00
Andreas Jaeger b97a12c059 Update translation setup
Follow new infra setup for translations, see spec
http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html
for full details.

This basically renames
oslo.policy/locale/oslo.policy.pot to
oslo_policy/locale/oslo_policy.pot. For this we need to update
setup.cfg.

Update also domain name in i18n.py.

The project has no translations currently, let's remove the outdated
pot file, the updated scripts work without them. So, we can just
delete the file and once there are translations, an updated pot file
together with translations can be imported automatically.

Change-Id: I9ca723834b1634a9ed965a92724d72fefc15e0d2
2016-01-29 11:47:44 +01:00
Adam Young f4c533b25f Add oslopolicy-checker command-line tool
Allows testing the access_data from a Keystone token against
all rules in a policy file.

Optionally can test a single rule. See

$ tox -e venv -- oslopolicy-checker --help

For more details

Co-Authored-By: Ian Cordasco <graffatcolmingov@gmail.com>
Implements-Blueprint: oslopolicy-cli
Change-Id: I8b2e8739c85077e856775f37e9868eb0a8babb3c
2016-01-12 15:44:03 -06:00
ChangBo Guo(gcb) 0975d6ce42 Remove Python 2.6 classifier
We have decided to remove Python 2.6 support, this commit
removes Python 2.6 classifier before dropping any Python
2.6 support in code.

Change-Id: I4de8aad0981f5af33964c1833410e79288938044
2015-11-17 16:49:11 +08:00
David Stanek 59ebc39d26 Fixes up the API docs and module index
- Automatically generate the API docs
- Makes the index on the modules index page useful

Change-Id: I4eafe2c64a0733f6fb81b20e85cd943355860f9a
2015-07-07 22:23:00 +00:00
Davanum Srinivas 3474d07e47 Remove support for Python 3.3
Change-Id: Ibaac655357e822344661b32a33124a87351ccd2c
2015-05-10 19:19:43 -04:00
Steve Martinelli 3beba6b63b Cleanup README.rst and setup.cfg
Provide a more complete description in README.rst, which is used
when viewing the library on pypi.

Also standardize the short-description used in setup.cfg.

Change-Id: Ia3b56ba2abfc0c2826bff8e10f31e196d5c4031b
2015-04-04 02:33:28 -04:00
Steve Martinelli ad2c5dd1f8 Add entry points for option discovery
Create entry points for oslo.policy, and make the necessary
changes to grouping the options into a new 'oslo_policy' group.

Change-Id: I32fd78c8a90fd2d49824db145362069b81fcaec5
Closes-Bug: #1415631
2015-02-05 23:00:59 +00:00
Doug Hellmann ed59249609 Fix project metadata
Update the README and short description to fix links and be more
descriptive.

Change-Id: I8ff8130c66c35369d52ea59f9037cb32565518ae
2015-01-28 15:34:29 -05:00
Rodrigo Duarte Sousa 520a60538b exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00