Commit Graph

20 Commits

Author SHA1 Message Date
Brian Haley db94234398 tox: Add py39 and py312 targets
Master branches need to support py39 and py312 (non-voting)
based on governance for 2024.2 [0].

Removed old targets that are no longer needed in master.

[0] https://review.opendev.org/c/openstack/governance/+/908862

Change-Id: I46feebfe449d956c0b9e35e42209162fcec52c44
2024-03-22 10:57:21 -04:00
Trent Lloyd ec900beaca tox: Add py311 target
Update tox.ini to include the py311 target as required by the current
openstack-python3-charm-jobs zuul template.

Change-Id: Iec0cad398f25e32fafdc064652f3d576b45e4550
2024-01-09 14:58:25 +08:00
James Page bf2e867e9e adapters: fix compat for auto accessors
The keystone interface rebase to the Endpoint base class re-uses
the auto_accessors approach from RelationBase which makes the
interface smell a little different to other Endpoint based interfaces.

Check and map any keys listed in auto_accessors for all relation
class types rather than just for RelationBase.

This also fixes a minor issue where self.accessors was reset to []
when the auto_accessors attribute was not found in the relation
overwriting any accessors passed in during object construction.

Change-Id: I4481c6d8ad5c9f0a8bc5e892d1d7472be83f3454
2022-09-21 11:02:44 +01:00
Ghanshyam Mann d99799bb85 [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

charm repos need few updates on either py2 drop or updating
ussuri python template, tox.ini etc.

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

Needed-By: https://review.opendev.org/#/c/714728/

Change-Id: I6cb655295287c367e128194f1264910a2d761e79
2021-12-14 13:01:26 +00:00
James Page f0a486c59d Drop flake8 upper version constraint
Clear up lint as a result of new pep8/flake8 version.

Change-Id: I3698766cb751b31ef1e6b806baa45c1cf6f7d899
2020-06-08 10:29:45 +01:00
Alex Kavanagh dc2b95bff4 policy.d override support for reactive OpenStack charms
This patchset provides support for policy.d overrides in
charms.openstack based charms.  It is essentially an adapter for the
charm-helpers policyd module which does the heavy lifting for all of the
policy.d overrides.

This change depends on the charm-helpers change:
https://github.com/juju/charm-helpers/pull/368

Change-Id: I495ce9f5be1815c78a2295d33bab4b9a774d805c
2019-09-26 17:22:18 +01:00
Corey Bryant 6d0082a5a6 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: Ic296327e11a22478f55b39a8211fe997216015bf
Story: #2005924
Task: #34228
2019-07-30 10:19:14 -04:00
Ghanshyam Mann 2149704f76 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: Ibea0d909fe6628a387becc89bb58af18278d27c8
2019-04-23 04:53:32 +00:00
Frode Nordahl 3e9f4096f9
Set appropriate permissons for certificate data
Change-Id: I8a4ba53a09f61a4f40555bd5892ba0ae2beb2de4
Closes-Bug: #1821314
2019-03-22 15:30:32 +01:00
Frode Nordahl 34bc40a2f8 Allow overriding of source configuration option key
The charms.openstack library contains lots of useful code for
reactive charms which is reusable for other charms.

Allow direct consumers of the OpenStackCharm class to override
the key used for package source selection.  This is usefull for
non-OpenStack charms deploying binaries from UCA (for example
Ceph)

Retain 'openstack-origin' as a default.

Also add and default to a `py3` target in tox for developer
friendliness.

Change-Id: I67d2e5d68bc4da87bcaba813f99d3f782f1d9907
2019-01-10 16:30:29 +01:00
Doug Hellmann a7a21f9d7a 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: I9d7ecf78c245107013a507fe1ddde7c218b32a73
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:41:09 -04:00
James Page 0ac8eb2781 Ensure target charm is used during upgrades
When upgrading openstack components, ensure that the charm class
representing the target release is used for packages and
config file rendering, supporting changes in config files or
packages to be installed.

Also set OPENSTACK_RELEASE_KEY to new release to ensure that
Charm class resolution in future hook executions observes the
current release, rather than the release at install.

Change-Id: I724ae652460e352e24ed7bf2bf57ea181fadff1c
Closes-Bug: 1779062
2018-07-17 10:09:05 -04:00
Vu Cong Tuan 537ebe9b5a Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I627b39fccfe7a06b90c9d5d371c1bf6fa6ca056a
2018-06-27 11:19:57 +07:00
Ryan Beisner 3c86e57d16 Update tox.ini to stop using unverified package
As of pip 10.0, --allow-unverified is not permitted.

Use of the flag in this repo was previously used to force
installation of python-apt to accommodate certain unit tests.

The unverified package, python-apt, is no longer necessary
for test execution.

Change-Id: I3bb8af99cd8303c105f85a4712ca0b057994ef7d
Related-Bug: #1760720
2018-05-09 10:54:42 -05:00
Alex Kavanagh 747b5e1d87 Remove py2.7 support
The underlying library (charms.reactive) no longer support py27, and
reactive charms are only py35 and later supported.  Thus, there is no
reason to support py27 in charms.openstack.

Note: the zuul gate still has a py27 test so that is left in the tox.ini
but it simply evaluates to true.

Change-Id: I9a4e18038b706286f60e64fcf67f3e63a90feda9
2017-05-12 16:50:58 +01:00
Alex Kavanagh 6e589d1793 Use charmhelpers OPENSTACK_RELEASES instead of internal KNOWN_RELEASES
As part of the fix-alpha-comparisons-1659575 topic, OpenStack reactive
charms that use charms.openstack don't generally need an update.
However, it was noticed that charms.openstack used its own list, as it
predated the charm-helpers version.  In order to only have to maintain
the list in one place (contrib.openstack.utils.OPENSTACK_RELEASES) this
changeset removes the internal list and uses the external list.

The py27 test has been disabled as the charms.reactive library has
become py3.5+ only.  However, the gate retains the test (policy) so we
need to just disable the py27 here in the tox.ini.

Change-Id: Iaa08252e5093f69a201af2a61cbe952d3ab3b171
Related-Bug: #1659575
2017-05-12 16:09:52 +01:00
Alex Kavanagh b08f224d38 Make the module work with python3
This makes the module work with Python 3 and adds a tox target to
perform python 3.5 tests.
2016-05-23 17:35:43 +00:00
Alex Kavanagh b82302808a Start of renaming charmers.openstack to charms_openstack
This is probably 1 of 3 commits to rename the module to charms_openstack
which will enable it to live happily alongside charms.reactive without
conflicting with it's namespace - and also taking over the charmers
namespace.
2016-05-20 17:06:31 +00:00
Alex Kavanagh fdeaeac763 Rename charms to charmers as the charms.reactive is locked down
This package can't share the namespace with charms.reactive, hence the
change to charmers.openstack.
2016-05-19 20:17:33 +00:00
Alex Kavanagh ffb9996696 Initial commit of OpenStackCharm for layer-openstack 2016-05-17 18:06:03 +00:00