Commit Graph

1417 Commits (58ff270a9c54c591e743092f0002997ba5b62b79)

Author SHA1 Message Date
Zuul 58ff270a9c Merge "tox: Ignore .venv files for flake8" 2022-10-10 17:01:29 +00:00
Zuul 6510200ee1 Merge "remove unicode prefix from code" 2022-10-10 16:08:27 +00:00
Stephen Finucane a894a938c6 Remove Python 3 guide in HACKING
All files are Python 3 and unicode these days.

Change-Id: If444d9f667666154e36c345cbb1290e0f0feef3f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-09-27 17:40:49 +01:00
OpenStack Release Bot 899e8c8a44 Add Python3 antelope unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I1907a1785b7b2600e5f99005758bdbf898f89db0
2022-09-09 11:21:39 +00:00
OpenStack Release Bot d2b70bc04d 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: Ifd96607a202a9d7b570724901c9278b1d95ef329
2022-09-09 11:21:37 +00:00
niuke ae0aad4b37 remove unicode prefix from code
All strings are considered as unicode string from Python 3.

This patch drops the explicit unicode literal (u'...')
appearances from the unicode strings.

Change-Id: I9ecbedd5c31ed098c4a6d913a1cafebd7af49573
2022-08-30 05:37:18 +00:00
Zuul d438afaff1 Merge "doc: Comment out language option" 2022-08-02 13:06:35 +00:00
Takashi Kajinami bf47118a12 doc: Comment out language option
... because explicit language=None causes the below warning since
Sphinx 5.0.0.

Invalid configuration value found: 'language = None'. Update your
configuration to a valid language code. Falling back to 'en' (English).

Change-Id: Ib48278aa7e995477b5d3f970fa9234274d4f4556
2022-06-07 00:35:38 +09:00
David Hill 973e16960d Do not output log on bash autocomplete generation
Do not output log on bash autocomplete generation as it requires
manual sanitizing.   For instance, when running `openstack complete`,
it appends the following two lines:
~~~
complete -F _openstack openstack
2022-05-10 12:50:25.052 863 INFO osc_lib.shell [-] END return value: 0
~~~
and in the current .spec file, we manually remove the `complete -F`
line but we still get that LOG.info output in train at least.  This
behavior was not seen on master/wallaby.

Change-Id: Id99791831ffc145b10a0ec8c211a99f8a714fa0a
2022-05-10 12:52:15 -04:00
Zuul 65c73fd503 Merge "Add Python3 zed unit tests" 2022-03-09 12:24:13 +00:00
Zuul d720002588 Merge "Update master for stable/yoga" 2022-03-09 11:30:31 +00:00
Zuul 0d088d62a0 Merge "Fixed test for interface key" 2022-03-07 15:18:21 +00:00
OpenStack Release Bot 098efa38ef Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I928b7ec69a6bc3646c9cbea1ebd861d9dd8b6f43
2022-03-04 17:01:53 +00:00
OpenStack Release Bot 9e4105af16 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: Ib1bfe9d5a77a947ef0d7920958cd5a2a301f9867
2022-03-04 17:01:50 +00:00
Zuul cce539d65e Merge "Don't fail on extlinks warnings for reno build" 2022-02-21 12:20:36 +00:00
Zuul a8fde07fe4 Merge "Fix TestTagHelps for python3.10" 2022-02-21 12:20:34 +00:00
Zuul ce936a2f72 Merge "Respect 'interface' key from clouds.yaml" 2022-02-21 12:20:26 +00:00
Dr. Jens Harbott d993b52b30 Don't fail on extlinks warnings for reno build
With Sphinx==4.4.0 some "helpful" warnings were introduced when an
external link could be replaced by a macro, like for :lpbug:. Sadly we
have a very high number of existing release notes that trigger these
warnings and no good way to fix them retrospectively, because would mess
up their mapping to releases. So we change the logging for the
sphinx.ext.extlinks to ignore these warnings for now.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Id646d77afc6817921e29eeab3bee75c50021c50b
2022-02-21 12:24:45 +01:00
Jakob Meng 333c681a4c Fixed test for interface key
Previously, key interface was asserted to be 'public'
when testing reads from clouds.yaml. But to effectively
assert values from clouds.yaml, one has to use values
which differ from the defaults.

Change-Id: Ifc9a10e6ca02369c2f00b10d9b2b5412140dbeee
2022-02-21 10:55:31 +00:00
Zuul 78d276e722 Merge "parseractions: Make key validation reusable" 2022-02-11 18:28:22 +00:00
Jakob Meng 4b593699bc Respect 'interface' key from clouds.yaml
Commit c500b63703 assigned DEFAULT_INTERFACE as the default value of cli
parser's 'interface' key. But this resulted in the 'interface' key from
clouds.yaml aka OSC_Config always being ignored/overridden.

Instead this commit overrides the config default for 'interface' key with
DEFAULT_INTERFACE which can still be overridden with keys 'interface' or
'endpoint_type' in clouds.yaml or via the existing
--os-interface/OS_INTERFACE methods.

Ref.: c500b63703

Task: 38955
Story: 2007380
Change-Id: Ia4e511c9d47201cca175711e1c4cfa596168202f
2022-02-11 09:38:55 +00:00
Artem Goncharov 650795af70 Replace allow_get check with allow_fetch
We got rid of all allow_get checks in the code and now can let SDK drop
the attribute

Change-Id: I61750cc491cf769b1daf42af2eca6b6199fa2b5d
2022-01-17 15:19:38 +01:00
Dr. Jens Harbott d538d6ed68 Fix TestTagHelps for python3.10
With pytheon3.10 the naming of the "optional arguments" section has been
changed to "options"[0]. Adapt the reference texts accordingly.

[0] https://docs.python.org/3/whatsnew/3.10.html#argparse

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I4c572153b53ca381e2f100456bf77f6fe2892b5c
2021-12-22 21:18:08 +01:00
Stephen Finucane e47109370e tox: Ignore .venv files for flake8
Commonly used for testing virtual environments (at least by me).

Change-Id: I3b711bd3464a2ca2a8dced37d9d6ec328b8bf827
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-10-13 12:39:15 +01:00
OpenStack Release Bot 58eff5e7f9 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ia1659dec8b6b7f683704c2ad33c91f0219276345
2021-09-10 14:35:51 +00:00
OpenStack Release Bot efc33767f9 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: I48902ee9b4b0eaff4cbdd822fbcac4c90e7270b4
2021-09-10 14:35:41 +00:00
Zuul 415a6c7b19 Merge "Correct the tox option for skipping sdist generation" 2021-07-30 00:15:54 +00:00
Ghanshyam Mann 4c3d3a0cad Moving IRC network reference to OFTC
Change-Id: I558e26423b7788cd3d296661d90a4de737263fbd
2021-07-08 08:23:42 -05:00
yatinkarel 97c578bcad Close session at clean_up if available
To avoid unclosed socket[1] left overs, explicitly
close session at clean_up if available.

[1] sys:1: ResourceWarning: unclosed <socket.socket fd=4>

Story: 2009015
Task: 42735
Related-Bug: #1934098
Change-Id: Idf4865686c37f6f9f61d1f3333b976cc687de9e1
2021-06-30 14:36:38 +05:30
Jeremy Stanley e3f58c1f99 Correct the tox option for skipping sdist generation
The tox option to skip source distribution building is skipsdist,
but this seems to be often misspelled skipdist instead, which gets
silently ignored and so does not take effect. Correct it
everywhere, in hopes that new projects will finally stop copying
this mistake around.

See https://tox.readthedocs.io/en/latest/config.html#conf-skipsdist
and https://github.com/tox-dev/tox/issues/1388 for details.

Change-Id: I639066169913072b992c0e1073f9398d6ac8cdd2
2021-06-17 17:04:29 +00:00
Kevin Carter dd75c8fdbf Add check for sdk_connection
This change checks if the attribute sdk_connection exists
before attempting to close it. Without this change we're
seeing the following exception:

> Could not clean up: 'ClientManager' object has no attribute 'sdk_connection'

Related-Change: https://review.opendev.org/c/openstack/osc-lib/+/765650
Signed-off-by: Kevin Carter <kecarter@redhat.com>
Change-Id: Ib7e9958d5a64e6500bc38eed9d3e783d5a48d21f
2021-05-19 13:24:55 -05:00
Zuul 1354890f0b Merge "Add Python3 xena unit tests" 2021-04-15 16:43:02 +00:00
Zuul 1c818ab2ef Merge "Update master for stable/wallaby" 2021-04-15 16:04:42 +00:00
Zuul 90b83fde95 Merge "Add support for SDK auth caching" 2021-04-09 16:58:30 +00:00
OpenStack Release Bot 9948b15670 Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I07faaf33e6cf3c0d47334ce5ea75aac4eb3eb67f
2021-03-19 13:13:42 +00:00
OpenStack Release Bot a9c5d7869f 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: I943adedca1b66bdd0159a9e36ea057bff6af64a2
2021-03-19 13:13:39 +00:00
Stephen Finucane 86a42cc7ec parseractions: Make key validation reusable
Sub-classes of 'MultiKeyValueAction' may wish to reuse the key
validation aspects of the action (Do I have the required keys? Do I have
unknown keys?) wile overriding other aspects of the action. Make this
possible, reducing some duplication in the process.

Change-Id: I549d0897ef3704b7f47000f867d6731ad15d3f2b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-03-05 12:37:54 +00:00
Stephen Finucane 2b7a679a42 Fix lower-constraints job
pip 20.3 finally includes a proper dependency resolver. Its use is
causing the following error messages on the lower-constraints job:

  ERROR: Could not find a version that satisfies the requirement
  hacking<3.1.0,>=3.0.1
  ERROR: No matching distribution found for hacking<3.1.0,>=3.0.1

Resolve this by moving the 'hacking' and 'flake8-import-order'
dependencies from 'test-requirements.txt' to 'tox.ini' since we don't
need to use our constraints machinery for linters.

While we're here, also drop 'bandit' from 'test-requirements.txt'. This
was introduced in change I691829c1224557d1d239c9f665ac539d0f13c4d3 but
commit f78173f0e1 (there's no change ID)
removed the 'bandit' testenv from 'tox.ini' meaning we no longer use
this anywhere.

Change-Id: I744efd75c4cbf8c630c5f95dc254acff581be959
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-01-11 10:35:42 +00:00
Artem Goncharov 25011a09df Add support for SDK auth caching
SDK starts caching authorization state in keyring (when available and
enabled). Respecting it requires few minor changes: closing connection
and reusing auth_ref.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/735352
Change-Id: I7b7cff4887ec77e4c9d98809150d9064eedafaf6
2020-12-05 15:36:48 +01:00
sunyandi 239b001a14 Replace 'assertFalse(a in b)' with 'assertNotIn(a, b)'
Trivial fix.

Change-Id: Id034f3ddb9be5f1a05e99b5d36b3381edda58ddb
2020-11-06 10:26:20 +00:00
Zuul 0a7bc3eb8c Merge "Add Python3 wallaby unit tests" 2020-11-05 12:32:19 +00:00
Zuul e0cd4a27c0 Merge "bump py37 to py38 in tox.ini" 2020-11-05 11:25:31 +00:00
OpenStack Release Bot 60eb124713 Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I06e4b9dda2d6ccb22737ff06b37881b9f5bd85a5
2020-11-05 10:16:16 +00:00
Zuul 96fb2ccff7 Merge "tox: Set 'ignore_basepython_conflict'" 2020-11-04 21:38:27 +00:00
Zuul e80a991deb Merge "formatters: Cast columns before outputting" 2020-11-04 21:27:55 +00:00
Zuul 95393c3816 Merge "zuul: Stop testing against Tempest" 2020-11-04 19:59:35 +00:00
Stephen Finucane ce3e3783f1 tox: Set 'ignore_basepython_conflict'
Resolves the following warning:

  /usr/lib/python3.7/site-packages/tox/config/__init__.py:578:
  UserWarning: conflicting basepython version (set 37, should be 36) for
  env 'py36'; resolve conflict or set ignore_basepython_conflict

While here, also fix indentation of this file.

Change-Id: I48bf44cf7237554a48180c8bd3537425f0401f30
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-11-04 15:30:20 +00:00
Stephen Finucane 4bb55ce75d formatters: Cast columns before outputting
Libraries like 'novaclient' return non-primitive types for many
operations. These are typically wrappers around primitive types, e.g.
'OrderedDict', but they all break YAML output formatting since PyYAML is
only compatible with primitive types when operating in safe mode.

The solution is rather simple: simply cast the values for these to their
expected format.

Change-Id: Ib7db6a25f2352a013cb2ce603e60ca48b6cc70e6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Story: #2008320
Task: #41217
2020-11-04 15:30:09 +00:00
Zuul c710e0cc5b Merge "bump py37 to py38 in tox.ini" 2020-10-31 05:09:14 +00:00
Zuul 4737d7fc25 Merge "Remove install unnecessary packages" 2020-10-29 14:41:37 +00:00