These are detected as errors since the clean up was done[1] in
the requirements repository.
[1] 314734e938f107cbd5ebcc7af4d9167c11347406
Also remove the note about old pip's behavior because the resolver
in recent pip no longer requires specific order.
Change-Id: I5355c3fa692df22f4dc0c8aeac4fb12bae6dfec6
The lower-constraints test was removed because of an issue where pip
could not correctly determine the required packages versions to install,
ending in an almost infinite loop that would end up in timeout, failure,
and general mayhem.
Recently the issue has been fixed and, if properly configured, the
lower-constraints test can provide good indication of which minimum
versions are required to support the current code.
This patch adds the test back to the current development branch, and it
runs only on master.
The lower-constraints file will stay in the future stable branches.
Adjust min versions in requirements.txt accordingly.
Change-Id: I3678c29fb090244f5e00208e4dcc8f1ad8a54ff5
It was used to smoothen out the difference in handling bytes in
Python 2 and 3. Now that we only support Python 3, it can be
replaced.
A side effect of this change is that we no longer accept bytes
in JSON. JSON does not support bytes, but this problem has been
hidden due to oslo.serialization until now. The configdrive
handling has been updated to account for that.
Change-Id: I230b55db55bce08d46f5023ad7a3f6501c96d100
It is only used to populate the list of supported Session options.
Use openstacksdk to create a session with all arguments instead.
Since it's already a dependency of osc-lib, this changes adds no
new dependencies, while substantially simplifying the code.
Change-Id: I6100f94c18cbf3e90d4a6d3ec2a3fc74ebea53a5
In an ideal world we would have all messages translated to at least major
languages. In reality, ironic has never boasted a great set of translation,
and according to Zanata only 2.94% of messages are translated for ironic
in Train (1.33% for ironic-inspector). Given that ironic-python-agent is
not translated at all, using i18n by default seems an overkill.
Change-Id: I30d0f5ae6c7428ebbf018e14a3b78c430681c6a6
This changes adds a new command ``baremetal`` that works mostly like
the OSC ``openstack baremetal`` command but does not require OSC and
defaults to no-auth. No changes in existing commands are required,
the existing OSC plugins are pulled in.
Change-Id: Id4895ec37bfb58eb635e5c8519f96f1bdc30c925
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: I4b60638bb0268e5d1cf54fdf7d61964082536f4f
The code in ironicclient.client that uses session_loader.get_conf_options
requires oslo.config to operate. This patch makes the dependency explicit.
Story: #2006601
Task: #36764
Change-Id: I472896ddd0ced8535d71d807fb5e01d1471571eb
The ironic command is dead, long live the OSC baremetal command.
Also removed the json_respose tests, which seemed ot be geared
to checking json returned data on the command line. For ironic
these tests seemed to be very explicit for our CLI where as OSC
should be covering the return data handling, the only real end
effect is field level expectation enforcement in the functional
test... which seems excessive and un-needed.
Story: 1726605
Task: 11974
Depends-on: https://review.opendev.org/677183
Change-Id: I3e3ae416a65d8e01956434ba51bd3187ab001f80
We have jsonschema capped at a fairly old version. Other than some
specific releases, it looks like keeping it below 3.0 was added in
I943fd68b9fab3bce1764305a5058df5339470757 without really any explanation
why.
In order to update to a 3.x release we need to:
1. Remove the cap from global-requirements.txt (see Depends-On), leaving
upper-constraints.txt at a 2.x release
2. Remove the cap from all consumers (this change)
3. Release a new version of consumers that are published to pypi
4. Update upper-constraints.txt with those new releases
5. Update jsonschema in upper-constraints.txt to a 3.X release
(See: https://review.openstack.org/649789)
6. Test consumers with the change from 5.
7. [Optional] fix issues in consumers that arise from 6.
8. Merge the change from 5.
Change-Id: I27ce9430d3f20a3c6cf0fbeac5a2a277667b4c3e
Co-Authored-by: Sean McGinnis <sean.mcginnis@gmail.com>
Depends-On: https://review.openstack.org/649669
Currently, during the ironic shell client construction, if only
os_auth_token and endpoint arguments are passed, custom
HTTPClient class based on requests' sessions is used. This is
unnecessary, as there is admin_token auth type in keystoneauth
that does basically the same, eliminating the need for our
custom implementation. Apart from that, there is a none auth,
which requires only passing the desired endpoint to use, so we
can use it too without having to specify fake token strings
anymore. Let's use these auth methods instead and deprecate
HTTPClient.
Also this patch deprecates a bunch of arguments to client.get_client
function, changing them to the standard keystoneauth naming.
DocImpact
Story: 1696791
Task: 11836
Depends-On: https://review.openstack.org/559116
Change-Id: Ifc7b45d047c8882a41021e1604b74d17eac2e6e8
OpenStack client is not a runtime dependency of ironicclient,
and having it in requirements just brings in many dependencies
which might not be needed at all when using the Python API of the client
only (for example in server-side applications).
Although dependency on osc-lib is enough for unit tests, add
python-openstackclient to test-requirements so that functional tests
pass.
Also, add a setuptools 'extra' so that users can install
python-openstackclient together with ironicclient if wishing to do so
as follows:
pip install python-ironicclient[cli]
Change-Id: Ic7d06e61cd234b327613287802361c58bf6bf11e
Closes-Bug: #1562023
When trying to contact Ironic with a bad token, Forbidden exception
should be raised, in python3 a TypeError is raised due to json
lib being unable do decode a bytes object.
In order to be really python3 compatible, the json lib was replaced
with oslo.serialization module jsontuils since it's the recommended
migration to python3 guide. This is to ensure that data coming from
the requests lib can be read even if it's not string any more but
bytes.
https://wiki.openstack.org/wiki/Python3
Change-Id: I27540f58e31817d4de604334bc4c62899d82f4cc
Closes-Bug: #1629068
Base classes of commands are defined in cliff,
but have been encapsulated again in osc-lib for
all plugin clients. So use osc-lib instead of
cliff.
Since osc-lib 1.0.2 has released, it is stable
to use.
Change-Id: I0b9bf1c867be0181d573decadc840a887a784ca9