[Fix] Fix Incorrect Method Name

We are seeing the following error [0] while using Shipyard to run
a commit configdocs. The relevant exceptions are [1] and it is a
result of incorrect reference to method name.

The bug will be triggered when we use ext_marker. This patch set is
meant to correct that.

[0] shipyard commit configdocs

Error: Validations failed
Reason: Validation
- Error: None
        Message: Promenade unable to validate configdocs
        Source: Promenade
- Error: None
        Message: 500 Server Error: Internal Server Error for url: http://promenade-api.ucp.svc.cluster.local:80/api/v1.0/validatedesign
        Source: Promenade

[1] Exceptions messages in Promenade API pod

2018-05-14 14:56:20,147 ERROR    - - - promenade.exceptions:default_exception_handler [142] Unhanded Exception being handled:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/falcon/api.py", line 201, in __call__
    process_request(req, resp)
  File "./promenade/control/middleware.py", line 103, in process_request
    if ext_marker is not None and self.is_uuid_like(ext_marker):
AttributeError: 'ContextMiddleware' object has no attribute 'is_uuid_like'

Change-Id: I89713fbb953a46e61093c4dadaa5a752b1a81c6c
This commit is contained in:
Anthony Lin 2018-05-14 17:27:14 +00:00
parent 8060aa9783
commit 16f23daee9
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class ContextMiddleware(object):
def process_request(self, req, resp):
ctx = req.context
ext_marker = req.get_header('X-Context-Marker')
if ext_marker is not None and self.is_uuid_like(ext_marker):
if ext_marker is not None and self._is_uuid_like(ext_marker):
# external passed in an ok context marker
ctx.set_external_marker(ext_marker)
else: