6464 Commits

Author SHA1 Message Date
Artem Goncharov
70a06d9990 Stop sending tenant_id to Neutron
For a long time we are supporting both tenant_id and project_id for most
of the networking resources. tenant_id is deprecated since long time
already and we should stop sending it ourselves to Neutron, while
leaving it as attribute where it was present.

Change-Id: I19c4b76258eb22897b3ae5d9573b01ea4ce8022b
2021-05-07 13:37:34 +00:00
Artem Goncharov
6db391f674 Switch networking function in cloud layer to proxy
We need to complete rework of our cloud layer to rely on proxy layer
instead of reimplementing direct API calls. This time networking
functions are touched.

Change-Id: I23dc30abc8977c8ff14f5e7b9c9940af0d0894c7
2021-05-07 13:37:22 +00:00
Artem Goncharov
03b2b3b00e Add access to the resource attribute by server-side name
In order to keep backward compatibility while we are switching more and
more things to the proxy layer add possibility to get attribute (in dict
style only) by server-side attribute name. While we do this inform user
not to use this anymore.

Change-Id: I981892aaba8d3f476a5d1ad71d22ab82b8798975
2021-05-07 13:35:44 +00:00
2d16931ca9 Update TOX_CONSTRAINTS_FILE for feature/r1
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as feature/r1 branch, tests will
continue to use the upper-constraints list on master.

Change-Id: I9c01131c4415ad4d0ed5c6cdc6830728734cc261
2021-05-04 16:12:33 +00:00
7a19a5ff27 Update .gitreview for feature/r1
Change-Id: I47d4f3830fb7372c8341510f82b8c569cfc5c40f
2021-05-04 16:12:29 +00:00
Zuul
b38e7173e2 Merge "Drop jobs failing for too long" 2021-04-24 00:01:45 +00:00
Zuul
2392508d27 Merge "placement: Add support for resource providers" 2021-04-23 18:41:27 +00:00
Artem Goncharov
ad82856bea Drop jobs failing for too long
There are 2 jobs failing for a very long time and nobody taking care of
fixing them. Disable them for now while still keeping job definitions.

Change-Id: I99abe18e3d91d52fc580a3d75146d04ec3de775a
2021-04-23 16:18:57 +02:00
Zuul
a28e043a6d Merge "Adds Node Vendor passthru" 2021-04-22 19:16:10 +00:00
Zuul
e787798f4e Merge "Allow unknown attributes to be included in request body" 2021-04-22 16:30:58 +00:00
Zuul
d3914d22f5 Merge "Fix import order in network unit tests" 2021-04-22 16:30:25 +00:00
Zuul
9d3ea52938 Merge "Allow for override of statsd/influxdb settings per cloud" 2021-04-22 13:20:57 +00:00
Zuul
4ac86afb45 Merge "Add support for Resource Filters" 2021-04-22 10:27:29 +00:00
Zuul
3e53729441 Merge "Use py3 as the default runtime for tox" 2021-04-22 10:25:55 +00:00
Zuul
54fb754c46 Merge "Add compute microversion 2.77" 2021-04-22 09:06:15 +00:00
Zuul
b6f4485fb5 Merge "Drop lower-constraints job" 2021-04-22 05:36:40 +00:00
Zuul
44b545c751 Merge "Add compute microversion 2.57" 2021-04-21 19:32:55 +00:00
Zuul
15d7ae8ddf Merge "Add tags option to the image upload" 2021-04-21 18:04:43 +00:00
Ryan Zimmerman
18a5cde815 Add compute microversion 2.77
Compute 2.77 [1] added support for specifying an availability zone when
unshelving a server.

[1] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id70

Change-Id: I603b39e39ab0fd8c95d7340e0895f38cc7d6daf7
2021-04-21 09:58:12 -07:00
Zuul
4174a18cd7 Merge "Don't send empty remote_address_group_id for security groups" 2021-04-21 10:01:16 +00:00
Slawek Kaplonski
e5381d1296 Allow unknown attributes to be included in request body
It is optional for resources to send in request's body attributes
which aren't included in mapping.
This is needed for Neutron to allow sending extra arguments in
POST/PUT requests to Neutron.

If that will be possible in SDK and OSC, Neutron team should be finally
able to deprecate (and drop) support for neutronclient CLI.

Change-Id: Ia3fd1052f438aedc6bc89bcca71834bcbafec9b9
2021-04-21 11:50:38 +02:00
Kajal Sah
bf73fd91ad Adds Node Vendor passthru
Implements: Adds node vendor passthru
Task: #40959
Story: #2008193
Change-Id: Ie63d8232fa86d93f0ae71d2e1bd808c80c8c93cf
2021-04-20 19:18:16 +05:30
songwenping
e6d4c4c959 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update this at
each new cycle.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Ic55a211381b901f2203988c0fac4e7545666f382
2021-04-20 01:37:47 +00:00
Ian Wienand
2395651429 Allow for override of statsd/influxdb settings per cloud
There is currently no way to separate out statsd settings per cloud.
While you can set a prefix other than 'openstack.api', this applies to
all clouds and groups all the stats together.

While this may be what you want, it may also be not what you want :)
For example in nodepool, we have multiple cloud providers who each
have their own grafana page, so we'd like them all to log themselves
to different stats buckets (i.e. set individual prefixes).

This allows setting a "metrics" field in each individual cloud entry
that overrides the global settings.  TBH I don't know if this is
important for InfluxDB as well, but I've implemented it for that too
for consistency.

Test cases are added for the global and merged settings.

I've also updated the documentation page a bit.  I've separated it
into subsections for the three types of stats available.  I removed
some of the in-depth stuff about logging types which wasn't that clear
(I think we can just present what we support and let people decide).

Change-Id: I9c3342161a257603f3cfd26bd03f6b71ffbfdd0d
2021-04-20 08:36:10 +10:00
Riccardo Pittau
d1676c24d3 Fix import order in network unit tests
Change-Id: I9bc1d42cfb0cb6574a9f765b21a50e338a98f2b6
2021-04-19 15:42:27 +02:00
James Palmer
ea1d5c74b4 Add support for Resource Filters
Introduct the resource_filters resource, its attributes,
and API Calls for interacting with resource_filters.

Task: 41813 Story: 2008619
Change-Id: I03f618648da1f11583fb0dae990e0163ddc0624e
Signed-off-by: James Palmer <jpalmer7698@gmail.com>
2021-04-18 16:54:36 +00:00
wu.shiming
d783b5889f Drop lower-constraints job
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].

I propose to drop this job because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes, and
We need to drop the lower-constraints.txt file as well as the corresponding
tox target

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Change-Id: Ib0ef1fadf4fe44f1d6af2f7d542b8af919652501
2021-04-16 15:15:18 +08:00
Ian Wienand
b562d779e6 Don't send empty remote_address_group_id for security groups
We are seeing an error raised by older Neutron's

 400: Client Error for url: <cloud>/v2.0/security-group-rules,
 Unrecognized attribute(s) 'remote_address_group_id'

This field was added unconditionally with
I50374c339ab7685a6e74f25f9521b8810c532e13 but, per above, appears to
cause problems for older Neutron instances.

To work around this, remove the argument from the body when blank by
overriding the _prepare_request function of SecurityGroupRule.

Two tests where this are used are updated; one checks the body is not
sent when None and the other is modified to send a
remote_address_group_id value to validate the other path.

Story: #2008577
Task: #41729
Change-Id: I25dabfde27b843df1c91c7fc37a1fe8d207b8010
2021-04-14 13:43:17 +10:00
Riccardo Pittau
abfb719f06 Fix more import orders
Remove corresponding filters from tox.ini

Change-Id: Ic30ee6c568ff78effcfc11b0473d6256f22e17c6
2021-04-13 17:50:11 +02:00
Riccardo Pittau
9081cd54e8 Fixing more import orders
Remove corresponding filters from tox.ini

Change-Id: I009de26adf21c7e6a5076a2432e3fce057743475
2021-04-13 17:41:42 +02:00
Zuul
e13b59c7bd Merge "Add deploy_steps to baremetal node provisioning" 2021-04-12 23:13:01 +00:00
Aija Jauntēva
c206d4b7f2 Add deploy_steps to baremetal node provisioning
Story: 2008043
Task: 41825
Change-Id: Ic44d3dfeb6d68875951feabbc480461f5db5d22a
2021-04-12 04:40:07 -04:00
Zuul
83fff69637 Merge "Cache auth token in keyring" 2021-04-09 15:08:42 +00:00
cenne
19a9480477 Fix typo - _list lists, doesn't delete
Change-Id: I742fc6247bbecf0129026895607b895a420a538e
2021-04-08 18:48:56 +02:00
Zuul
2c5200748d Merge "Apply import order in more tests" 2021-04-07 11:53:28 +00:00
Zuul
61770d9219 Merge "Fix more import order in tests" 2021-04-07 11:53:20 +00:00
Zuul
1d4fbe610f Merge "Apply import order in some tests" 2021-04-07 11:51:23 +00:00
Tobias Henkel
3f2034832b
Avoid prometheus metrics explosion
Openstacksdk reports metrics for prometheus and adds an endpoint-label
containing the full url of every request. In case the endpoints
contain query strings this can easily cause metric explosion. To fix
this we can parse the url and strip the query string.

Change-Id: Ief3c3981a039b3ae38eeaeccd1fb70e974c94082
2021-04-06 12:16:18 +02:00
Zuul
88f6a31d73 Merge "tox: Enable parallel docs build" 2021-04-04 16:04:07 +00:00
Zuul
c1f7aa10d4 Merge "docs: Add intro doc to user guide" 2021-04-04 15:52:36 +00:00
Zuul
ad2aba13d3 Merge "Improve README to provide example of Resource usage" 2021-04-04 15:42:01 +00:00
Ryan Zimmerman
41377bf78a Add compute microversion 2.57
Compute 2.57 [1] removed the personality parameter and added the
user_data parameter to the server rebuild API. Also removed
maxPersonality and maxPersonalitySize from the limits API response.

https: //docs.openstack.org/nova/latest/reference/api-microversion-history.html#id53
Change-Id: Id098e7b9eddb2c94e93864211ab1bc6cfc068972
2021-03-31 09:26:33 -07:00
Slawek Kaplonski
215403731d Add support for the Neutron L3 conntrack helper API
Neutron has got CRUD API for L3 conntrack helper since some time.
This patch adds support for it in the SDK.

Related-Bug: #1823633
Change-Id: I7614e3f4e5e3a77c7797fc5793febdcb3ad694fb
2021-03-31 11:03:34 +00:00
Dmitriy Rabotyagov
38a3409410 Add tags option to the image upload
Despite having tags support while create_image and even testing this
part in [1], appropriate params were not created for method and thus
were not documented/available for usage.

[1] https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/tests/unit/cloud/test_image.py#L358

Change-Id: Ia27bf629f3c422e036031f78679a1bdd8962eb2b
2021-03-30 17:13:13 +03:00
Stephen Finucane
c1a475cae0 placement: Add support for resource providers
We want some functionality in osc-placement. Add it here rather than
there.

Initially only the resource providers resource type is supported.
Additional resources will be added in future patches.

We're skipping the tests for the broken placement API versions, pending
discussions with keystone folks on how to resolve this long-term.

Change-Id: Ibf5f01b842e6fc79eb95c2c21bd69732de849597
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-03-26 15:52:46 +00:00
Riccardo Pittau
768a114c90 Apply import order in more tests
Remove corresponding filters from tox.ini

Change-Id: Ifa3741bafc88901f330bfc81d2d464fd54859dd8
2021-03-25 14:53:04 +00:00
Riccardo Pittau
d376c4fc5c Fix more import order in tests
Add single filters in tox.ini

Change-Id: Iab7d348f85e6f5cbc2fc2e1257a1f8055c049225
2021-03-25 14:52:52 +00:00
Riccardo Pittau
9bee004a04 Apply import order in some tests
Modify the tox.ini filter

Change-Id: Icfb869a8283158391756b4f54608adc0f2f4754a
2021-03-25 13:51:45 +01:00
Zuul
fd0c9778d4 Merge "Update master for stable/wallaby" 2021-03-24 21:05:51 +00:00
Stephen Finucane
5ba1e90273 tox: Enable parallel docs build
Add the '-j auto' flag to all 'sphinx-build' invocations. While we're
here remove the unnecessary '-d DIR' argument: Sphinx will configure a
sane doctree directory for us without any special configuration. This
results in a tidy little speed boost. Before:

  real    1m23.772s
  user    1m9.665s
  sys     0m6.299s

After:

  real    0m54.613s
  user    1m26.129s
  sys     0m7.810s

Change-Id: Id9240456f8bb289620a64792b433dbde4fa09586
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-03-24 13:46:10 +00:00