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,
|
||||
params=params)
|
||||
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
|
||||
LOG.warning('New API is not available, falling back to old '
|
||||
'agent vendor passthru')
|
||||
|
@ -353,3 +353,6 @@ class TestBaseIronicPythonAgent(test_base.BaseTestCase):
|
||||
|
||||
def test_do_lookup_fallback_unauthorized(self):
|
||||
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