Merge "Fix IPA for stable/mitaka with noauth mode"
This commit is contained in:
commit
c4c7115d4f
@ -123,7 +123,8 @@ class APIClient(object):
|
|||||||
headers=self.ramdisk_api_headers,
|
headers=self.ramdisk_api_headers,
|
||||||
params=params)
|
params=params)
|
||||||
if response.status_code in (requests.codes.NOT_FOUND,
|
if response.status_code in (requests.codes.NOT_FOUND,
|
||||||
requests.codes.UNAUTHORIZED):
|
requests.codes.UNAUTHORIZED,
|
||||||
|
requests.codes.NOT_ACCEPTABLE):
|
||||||
# Assume that new API is not available and retry
|
# Assume that new API is not available and retry
|
||||||
LOG.warning('New API is not available, falling back to old '
|
LOG.warning('New API is not available, falling back to old '
|
||||||
'agent vendor passthru')
|
'agent vendor passthru')
|
||||||
|
@ -353,3 +353,6 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase):
|
|||||||
|
|
||||||
def test_do_lookup_fallback_unauthorized(self):
|
def test_do_lookup_fallback_unauthorized(self):
|
||||||
self._test_do_lookup_fallback(error_code=requests.codes.UNAUTHORIZED)
|
self._test_do_lookup_fallback(error_code=requests.codes.UNAUTHORIZED)
|
||||||
|
|
||||||
|
def test_do_lookup_fallback_not_acceptable(self):
|
||||||
|
self._test_do_lookup_fallback(error_code=requests.codes.NOT_ACCEPTABLE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user