Browse Source

placement client: fix routed prov networks working

Routed provider networks works with placement microversion 1.1, that
version returned no body for resource provider creation, but from 1.20
body is returned and the client expected that as bandwidth feature were
designed after that.

Related-Bug: #1828543
Change-Id: Id6e6d633b00237d8909160e7ed6f5e495399a252
tags/1.28.0
elajkat 1 year ago
parent
commit
28e71cbd74
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      neutron_lib/placement/client.py

+ 6
- 1
neutron_lib/placement/client.py View File

@@ -202,7 +202,12 @@ class PlacementAPIClient(object):
:returns: The resource provider created.
"""
url = '/resource_providers'
return self._post(url, resource_provider).json()
rsp = self._post(url, resource_provider)
if (self._target_version <
_get_version(PLACEMENT_API_RETURN_PROVIDER_BODY)):
return
else:
return rsp.json()

@_check_placement_api_available
def update_resource_provider(self, resource_provider):


Loading…
Cancel
Save