Commit Graph

73 Commits

Author SHA1 Message Date
Zuul 5e0fa925f5 Merge "reno: Update master for unmaintained/xena" 2024-03-12 14:29:20 +00:00
Zuul 8966f550d7 Merge "reno: Update master for unmaintained/wallaby" 2024-03-12 14:24:58 +00:00
Zuul 5586acbdfc Merge "reno: Update master for unmaintained/victoria" 2024-03-12 13:11:28 +00:00
OpenStack Release Bot 5aaabf6a34 Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.

Sem-Ver: feature
Change-Id: I44eb0d050f653f16e1135acb872166d238e29d15
2024-03-08 14:23:44 +00:00
OpenStack Release Bot 14bdc08319 reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I42a12859aa2e1628d0431a6d0fcc0b3e43f20fbc
2024-03-07 14:27:37 +00:00
OpenStack Release Bot e3fc92d3cf reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I2192d2821322d24925557d2f0923b8296cfa08a6
2024-03-07 14:23:18 +00:00
OpenStack Release Bot 7a3dd70bde reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: I6e233e29a86e0965220c5c3f0393aa6cc015c5b2
2024-03-07 14:18:20 +00:00
Adam Rozman 72c80f6993 add <range-in> spec DSL operator
Add a new spec DSL operator called `range-in` that allowes users of
the spec_matcher to match values against numeric ranges.
The surrounding brackets determines whether the limit should be
inclusive or not.

examples:
 <range-in> [ 10 20 ]  : 10 <= x <= 20
 <range-in> ( 10 20 ]  : 10 <  x <= 20
 <range-in> [ 10 20 )  : 10 <= x <  20
 <range-in> ( 10 20 )  : 10 <  x <  20

Closes-Bug: #2052619
Change-Id: I444c01219d02ea7572d4b82117b89b8d3eb75e56
Signed-off-by: Adam Rozman <adam.rozman@est.tech>
Co-authored-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2024-02-19 13:23:13 +02:00
OpenStack Release Bot 093f20df8d reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: Ic0b7be56e16626bb8dd2b5267cf655dd2b57fa38
2024-02-06 14:29:48 +00:00
Zuul 4c4c4e3c1b Merge "Remove strict from is_same_callback()" 2023-11-16 17:48:42 +00:00
OpenStack Proposal Bot a122f5c065 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ife474c6e16f8228c5ae28b062ab446047ca3bc6d
2023-09-08 04:01:37 +00:00
OpenStack Release Bot 7ef1004a98 Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.

Sem-Ver: feature
Change-Id: Ifc44797b29130afa8fc7c668d8b6ca3c49b82702
2023-09-07 09:38:49 +00:00
OpenStack Proposal Bot a5941e8f84 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I3525e493d197644c4d2c70a93eafecf877ba6933
2023-06-28 04:48:41 +00:00
Zuul 7c2b949ce9 Merge "Add netutils.get_my_ipv6()" 2023-06-09 05:04:33 +00:00
Brian Haley 650b31f8ea Add netutils.get_my_ipv6()
Analog to netutils.get_my_ipv4(), except will return an
IPv6 address on the local host.

Change-Id: I26812ca6eaaeff70796bafa9f735d15d80f1bc30
2023-05-24 13:58:29 +00:00
Takashi Kajinami 2c8668c4e5 Fix compatibility with Python 3.8
We removed compatibility with Python 3.8 once but it was added back to
tested runtimes for 2023.2. Thus we have to make sure the code works
with Python 3.8, which was broken by [1].

Note that ptyz is added back to requirmenets.txt and is now required
regardless of the python version. This is a short term solution until
we figure out the way to fix the requirement-check job (or we again
remove python 3.8 support).

[1] 7d9fda625f

Change-Id: Ica344021a4e922bcfd20d20cffcce585a5742c8f
2023-05-15 17:29:46 +09:00
Zuul 328b6243c7 Merge "Implement zoneinfo support to drop dependency to pytz" 2023-04-17 11:26:34 +00:00
Hervé Beraud 7d9fda625f Implement zoneinfo support to drop dependency to pytz
Zoneinfo was introduced within python 3.9.

The support of pytz will be removed within RHEL 10 [1].

2023.2 (bobcat) will move our testing runtime to py3.9 and py3.10
so we want to see pytz removed within this series.

tzdata is required at runtime in our gates, because, by default,
zoneinfo uses the system’s time zone data if available; if no system
time zone data is available, the library will fall back to using the
first-party tzdata package available on PyPI. Apparently our gates have no
time zone data available nor tzdata installed by default because we get the
following error without tzdata installed [3]:
`ModuleNotFoundError: No module named 'tzdata'

So I prefer to add tzdata in our requirements to avoid runtime failure
related to time zone and ensure that time zone are always available.

[1] https://issues.redhat.com/browse/RHEL-219
[2] https://review.opendev.org/c/openstack/governance/+/872232
[3] https://zuul.opendev.org/t/openstack/build/0a1576775e894b09bc31269fea00ba03/log/job-output.txt#1445`

Depends-on: https://review.opendev.org/c/openstack/requirements/+/875854
Change-Id: I1f88bdadc68bfa726eac1da1c5824c1ed352ad98
2023-03-23 17:13:44 +01:00
Takashi Kajinami 2319e6d328 Remove strict from is_same_callback()
The strict argument has been deprecated since 4.6.0 because it has no
effect in Python >=3.8 [1].

Because now this library supports only Python >=3.8, the logic for old
python versions can be removed.

[1] https://review.opendev.org/c/openstack/oslo.utils/+/750216

Related-Bug: #1841072
Change-Id: I5873c0df347a4e9a8a1fbfcf9f1212af14f7aef2
2023-03-15 03:31:45 +00:00
OpenStack Release Bot 067a0dbd10 Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.

Sem-Ver: feature
Change-Id: Ic971c4dc343681e8016361a23ab88dc08621d8dd
2023-02-24 15:24:32 +00:00
OpenStack Proposal Bot cb8076bbe4 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ifc167609013d83f7140efd1ad912ae83e75af773
2022-09-10 03:10:00 +00:00
OpenStack Release Bot da17141ed5 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: I9fc3a12e0596370e9d602e178ba40ba7f5e6a098
2022-09-09 09:18:49 +00:00
OpenStack Proposal Bot 760deb9cc4 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2834d2d5427efca3ab83cd04fd603efc02aab19a
2022-06-27 03:54:08 +00:00
OpenStack Proposal Bot 6a5d497069 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib718d3ebd82a9fa81528775569c779e389bb8fdd
2022-06-21 03:50:50 +00:00
Zuul 7df64737c2 Merge "Remove deprecated helpers from oslo_utils.timeutils" 2022-06-13 17:10:27 +00:00
Zuul 3b7c49730a Merge "Remove oslo_utils.fnmatch" 2022-06-13 17:10:25 +00:00
Stephen Finucane 76146aaca8 Remove deprecated helpers from oslo_utils.timeutils
Remove the 'isotime', 'strtime' and 'iso8601_from_timestamp' helpers
from 'oslo_utils.timeutils'. These are all available in the stdlib now.

Change-Id: If4afb9242b14c48cc70e409463865b7b644a919f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-05-26 17:52:11 +01:00
Stephen Finucane 5832a7485e Remove oslo_utils.fnmatch
This has been deprecated for a long time. No need to keep it around any
longer.

Change-Id: I8273e164243e014a658b725a375e5632af211945
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-05-18 13:00:08 +01:00
songwenping de2b367b48 Remove unnecessary unicode prefixes
Change-Id: Iaae10962581b84b4ae2af1a064dd27d78c05dd4d
2022-04-22 01:28:16 +00:00
Hervé Beraud de4429f2be fix strutils password regex
Those regexes will fix Object style representation output.
See the payload used in tests for details. This kind
of output can be obtained by using the command:

```
$ openstack --debug
```

Co-Authored-By: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I9024be93b109d1b64ca736546c0f69db7a5e06d0
2022-03-10 08:49:26 +01:00
OpenStack Release Bot 7855d96c65 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: If66133112990e5bcffa302b8802ded88f60a0116
2022-03-04 17:20:07 +00:00
Pierre Riteau ad49b3ace4 Fix formatting of release list
Change-Id: I678d0d3d9506709404d534dc1c68ed6f75445558
2022-02-07 13:21:49 +01:00
Hervé Beraud 6e17ae1f79 Fix regex used to mask password
Some use cases are poorly handled by the regex used
to mask password. Indeed when the password contains
quotes or double quotes in the middle such as `pass"word`,
the mask_password method will return `***"word`.

For more details please see
https://bugs.launchpad.net/oslo.utils/+bug/1949623

Closes-Bug: #1949623
Change-Id: I941750b4d49d2d75f0831b24d6dd17f4040f70a2
2022-01-11 15:25:40 +01:00
Zuul d8b3e046ce Merge "QemuImgInfo: Fix inconsistent value format of encrypted" 2021-10-13 14:25:59 +00:00
OpenStack Release Bot 5586872536 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: Ia84d6f887003f1368757c604d828e7badfc1ba66
2021-09-10 14:39:40 +00:00
Takashi Kajinami 2922a3491a QemuImgInfo: Fix inconsistent value format of encrypted
The qemu-img info command shows the encrpyed field in different formats
according to the output format. When the default human format is used
the field can be 'yes' or None while when json format is used the same
field can be True or False.
This change ensures the corresponding attribute has the consistent
format regardless of the output format used.

Closes-Bug: #1942682
Change-Id: I949f07582a708114fdfba76f1a05aa3a3e5c4f40
2021-09-05 00:43:48 +09:00
Alexey Stupnikov 2c74bb92e5 Modify UUID sentinel to support keystone-like UUIDs
Keystone User IDs and Project IDs are used in unit tests, but
_UUIDSentinels() class doesn't generate UUIDs without hyphens.

This patch makes backward compatible modifications to
_UUIDSentinels() class and introduces keystoneidsentinel global
that could be used in the same way as existing uuidsentinel.

Original "UUID sentinel" change: I214ff21b461fa1ca4b83476e1d0a763efe986217

Related-Bug: #1746747
Change-Id: Idb3e893cc03d64ad0522b5e4cedfa30c4f4a2a2f
2021-08-03 13:13:58 +02:00
Zuul d4a00db7c1 Merge "Deprecate the fnmatch module." 2021-05-26 18:52:55 +00:00
Hervé Beraud 4c893c92f5 Deprecate the fnmatch module.
Oslo.utils's fnmatch module was added to fix the py2.7 fnmatch module
who was not thread safe [1]. Python 2.7 is no longer supported so now we
can use the stdlib's fnmatch module and deprecate the one of oslo.utils.

[1] https://bugs.python.org/issue23191$
[2] e46a46ba90

Change-Id: I538379f91d2ba415c566ada8d221b62b47ba80bb
2021-05-11 13:41:22 +02:00
Hervé Beraud 73eb0673f6 Deprecate the human format on QemuImgInfo
``human`` format parsing introduced many issue in the past.

Each time qemu will update it's human format output we could be
impacted by their changes and it could introduce new issues on
oslo.utils.

Human format is a human readable format which need to be parsed by
regexes, in other words it's not really a format that machine can
consume natively.

Qemu introduced json output since version 1.3 [1] and this format is
machine readable, for the sake of stability on oslo.utils we decided to
drop the support of the human format and to use json as the unique and
only supported format.

We will reach our goal by following this scenario:
step 1: deprecate the human format
step 2: remove the human format and deprecate the format parameters
step 3: remove the parameter (json all the time)

These changes deprecate the ``human`` format (step 1)

[1] https://wiki.qemu.org/ChangeLog/1.3

Change-Id: Ia8d6cd08a8989395f9b0f9097d2e57757b8cb915
2021-05-10 16:35:40 +02:00
OpenStack Release Bot 554d1f3539 Update master for stable/wallaby
Add file to the reno documentation build to show release notes for
stable/wallaby.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.

Sem-Ver: feature
Change-Id: I5a6aa9963662929b03c7ecd68fb18235af428b06
2021-03-18 11:31:49 +00:00
Hervé Beraud 3288539a0b Add a ``strict`` flag allowing users to restrict validation of IPv4 format
Add a ``strict`` flag allowing users to restrict validation to IP
addresses in presentation format (``a.b.c.d``) as opposed to address
format (``a.b.c.d``, ``a.b.c``, ``a.b``, ``a``).

https://github.com/netaddr/netaddr/issues/186
https://man7.org/linux/man-pages/man3/inet_pton.3.html
https://bugzilla.redhat.com/show_bug.cgi?id=1924436

Change-Id: I10fed16dad77ac17691a5d175c42b25916dc8bc4
Closes-Bug: #1914386
2021-02-05 14:07:20 +01:00
Zuul 87d2a1f9d4 Merge "Adding pre-commit" 2020-09-22 12:44:51 +00:00
Zuul a0ee8f5d19 Merge "Add function to encapsule md5 for FIPS systems" 2020-09-21 14:41:53 +00:00
Ade Lee 603fa500c1 Add function to encapsule md5 for FIPS systems
For systems in FIPS mode, invocations of MD5 will fail.  This occurs
even in cases where the MD5 is used in a non-cryptographical context
eg. for an etag in swift.

There is a proposal in Python to allow developers to mark these
non-crypto cases as valid through a new usedforsecurity keyword.
See https://bugs.python.org/issue9216.

Some downstream versions of python already implement this keyword.
To permit OpenStack to run in FIPS enabled systems with these versions
of python, we add a simple encapsulation of hashlib.md5() here.

Once the issue is resolved in upstream python, we can remove this
function.

Change-Id: I09433fea6ad6e6849677a93b269e24dec5c05b69
2020-09-16 16:47:07 -04:00
OpenStack Release Bot 99efd435bb Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I0fe9048d788b5d334ba93d97a9c3c6f9562c98db
Sem-Ver: feature
2020-09-11 21:01:50 +00:00
Hervé Beraud 71122a0cca Adding pre-commit
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commithooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker
  (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings
  (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: Iba1e2ce707051ea393ac559fc51b1f07da1f6ee8
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-09 13:38:50 +02:00
Ghanshyam Mann 7c4a94c0c3 Add util methods for checking json and yaml formatted file
As part of oslo_policy policy_file JSON to YAML migration BP,
we need to check if oslo policy_file is JSON or YAML formatted
(almost on all projects with policy in code, example Needed-By).
- https://specs.openstack.org/openstack/oslo-specs/specs/victoria/policy-json-to-yaml.html

These util methods try quick checks of file type by loading the file using
json or yaml.

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

Related Blueprint: policy-json-to-yaml

Change-Id: I0edf030dc5cd6b77e0101089746589332860fa16
2020-08-26 09:39:02 -05:00
Bence Romsics bbf6898b90 New method in netutils: get_mac_addr_by_ipv6
This method is practically the reverse of get_ipv6_addr_by_EUI64(),
so we can extract the MAC address from IPv6 addresses that were
generated from interface identifiers.

Change-Id: I48720d38649104f9f2f0a8fd208f2aac7548644e
Related-Change: https://review.opendev.org/718729
2020-06-29 17:15:16 +02:00
melissaml 00ccff5a0d Fix pygments style
New theme of docs respects pygments_style.

more info: http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I535b0627c37db7eb70c699642da0ffae36590329
2020-06-04 14:08:43 +08:00