Remove openstacksdk workaround for floating IP

This removes the openstacksdk workaround for the
resource_key bug for dns floating IP [1].

[1] https://review.opendev.org/c/openstack/openstacksdk/+/903879

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/903879
Change-Id: If269cbc261849e2a3daf7a9ab76476b4d91d0e3c
This commit is contained in:
Tobias Urdin 2023-12-18 13:16:18 +01:00
parent db8894f0cc
commit 2c60a9f9f1
3 changed files with 7 additions and 13 deletions

View File

@ -19,8 +19,6 @@ import logging
from openstack_dashboard.api.rest import urls
from openstack_dashboard.api.rest import utils as rest_utils
from openstack.dns.v2 import floating_ip as _fip
LOG = logging.getLogger(__name__)
@ -240,16 +238,8 @@ def update_dns_floatingip(request, **kwargs):
if data.get('ttl', None):
build_kwargs['ttl'] = data['ttl']
# TODO(tobias-urdin): Bug in openstacksdk
# https://review.opendev.org/c/openstack/openstacksdk/+/903879
obj = conn.dns._get_resource(
_fip.FloatingIP, fip_id, **build_kwargs)
obj.resource_key = None
has_body = True
if build_kwargs['ptrdname'] is None:
has_body = False
fip = obj.commit(conn.dns, has_body=has_body)
fip = conn.dns.update_floating_ip(
fip_id, **build_kwargs)
return fip.to_dict()

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
The designate dashboard requires a minimum openstacksdk version of 2.1.0

View File

@ -4,4 +4,4 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
horizon>=17.1.0 # Apache-2.0
openstacksdk>=0.62.0 # Apache-2.0
openstacksdk>=2.1.0 # Apache-2.0