openstacksdk/openstack
Ian Wienand f7c5564550 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
(cherry picked from commit b562d779e6)
2021-04-24 09:56:12 +00:00
..
accelerator Merge "Refresh deprecated link" 2021-01-12 18:40:31 +00:00
baremetal Improve Ironic API on OpenStack SDK 2021-02-24 22:34:47 +05:30
baremetal_introspection baremetal-introspection: allow fetching unprocessed data 2020-07-28 14:04:08 +02:00
block_storage Merge "Add support for updating Block Storage Volume type extra_spec attributes" 2021-01-11 17:37:54 +00:00
cloud Merge "Switch cloud.networking.qos* operations to rely on proxy layer" 2021-03-02 21:44:06 +00:00
clustering add cluster_id to filter by cluster_id when list actions 2020-09-25 15:58:14 +07:00
compute Add compute microversion 2.70 2021-02-17 23:25:18 -08:00
config Fix a trivial error in one of the error messages 2021-02-24 11:43:54 +01:00
database Implement If-Match support for Neutron resources 2020-02-28 11:52:08 +01:00
dns Add support for filters into the project cleanup 2020-08-03 19:35:03 +02:00
fixture Replace catalog-v3.json with keystoneauth fixture 2019-08-20 08:45:53 -04:00
identity NIT: Fix application credential 2020-06-10 12:37:46 +05:30
image encapsulate md5 calls for fips 2021-01-04 15:09:43 -05:00
instance_ha add masakari enabled to segment 2021-03-04 09:51:16 +08:00
key_manager Remove uses of from six.moves 2020-05-10 08:23:40 -05:00
load_balancer Add ALPN support to load balancer pools 2021-01-29 13:50:34 +01:00
message Properly convert baremetal fields to server-side values 2019-09-11 13:47:29 +02:00
network Don't send empty remote_address_group_id for security groups 2021-04-24 09:56:12 +00:00
object_store Merge "Remove use of six" 2020-05-13 04:25:35 +00:00
orchestration Move 'collections.Mapping' to 'collections.abc' 2021-02-01 11:00:14 +00:00
shared_file_system Add shared file systems support 2021-02-18 08:48:21 -08:00
tests Don't send empty remote_address_group_id for security groups 2021-04-24 09:56:12 +00:00
workflow Adds missing "params" attribute for creating a Mistral workflow execution 2019-03-27 16:02:17 +03:00
__init__.py Raise hacking to 2.x 2020-03-29 11:07:34 -05:00
__main__.py Add a __main__ handler, version command 2018-11-07 16:04:05 +11:00
_hacking.py Update local hacking checks 2020-03-29 11:07:34 -05:00
_log.py Allow passing in a logging handler 2020-07-09 08:35:44 -05:00
_services_mixin.py Add shared file systems support 2021-02-18 08:48:21 -08:00
connection.py Add shared file systems support 2021-02-18 08:48:21 -08:00
exceptions.py Fix exception parsing when using WSME 2020-11-23 15:47:30 +01:00
format.py Stop subclassing object 2020-05-10 08:29:41 -05:00
proxy.py Change microseconds to total_seconds() 2021-02-05 07:24:21 +00:00
py.typed Start supporting type info 2019-10-04 13:08:21 +02:00
resource.py Merge "Prevent the endless loop in resource listing" 2021-03-03 21:39:28 +00:00
service_description.py Stop subclassing object 2020-05-10 08:29:41 -05:00
utils.py Add TODO to remove md5 wrapper 2021-02-17 16:39:31 -05:00
version.py Move version definition 2016-06-03 09:32:26 -04:00