[Fix] Adhere to UCP spec for validation status
- The spec calls it out capitalized strings - Remove pip cache from Dockerfile build Change-Id: I4c8907120ba0213936060d9f0b463fc5e0bcf7db
This commit is contained in:
parent
8d2973081d
commit
a71c4be911
@ -76,7 +76,7 @@ class YamlIngester(IngesterPlugin):
|
||||
|
||||
# tracking processing status to provide a complete summary of issues
|
||||
ps = objects.TaskStatus()
|
||||
ps.set_status(hd_fields.ActionResult.Success)
|
||||
ps.set_status(hd_fields.ValidationResult.Success)
|
||||
for d in parsed_data:
|
||||
api = d.get('apiVersion', '')
|
||||
if api.startswith('drydock/'):
|
||||
@ -98,7 +98,7 @@ class YamlIngester(IngesterPlugin):
|
||||
ctx = 'Unknown'
|
||||
ps.add_status_msg(
|
||||
msg=msg, error=True, ctx_type='document', ctx=ctx)
|
||||
ps.set_status(hd_fields.ActionResult.Failure)
|
||||
ps.set_status(hd_fields.ValidationResult.Failure)
|
||||
except Exception as ex:
|
||||
msg = "Unexpected error processing document: %s" % str(ex)
|
||||
self.logger.error(msg, exc_info=True)
|
||||
@ -108,7 +108,7 @@ class YamlIngester(IngesterPlugin):
|
||||
ctx = 'Unknown'
|
||||
ps.add_status_msg(
|
||||
msg=msg, error=True, ctx_type='document', ctx=ctx)
|
||||
ps.set_status(hd_fields.ActionResult.Failure)
|
||||
ps.set_status(hd_fields.ValidationResult.Failure)
|
||||
elif api.startswith('promenade/'):
|
||||
(foo, api_version) = api.split('/')
|
||||
if api_version == 'v1':
|
||||
|
@ -191,8 +191,8 @@ class NetworkLinkTrunkingModeField(fields.BaseEnumField):
|
||||
|
||||
|
||||
class ValidationResult(BaseDrydockEnum):
|
||||
Success = 'success'
|
||||
Failure = 'failure'
|
||||
Success = 'Success'
|
||||
Failure = 'Failure'
|
||||
|
||||
|
||||
class MessageLevels(BaseDrydockEnum):
|
||||
|
@ -327,7 +327,7 @@ class Orchestrator(object):
|
||||
"""
|
||||
design_status, site_design = self.get_effective_site(task.design_ref)
|
||||
|
||||
if design_status.status != hd_fields.ActionResult.Success:
|
||||
if design_status.status != hd_fields.ValidationResult.Success:
|
||||
raise errors.OrchestratorError(
|
||||
"Unable to render effective site design.")
|
||||
if failures and successes:
|
||||
|
@ -21,7 +21,9 @@ ENV LANG C.UTF-8
|
||||
|
||||
# Copy direct dependency requirements only to build a dependency layer
|
||||
COPY ./requirements-lock.txt /tmp/drydock/
|
||||
RUN pip3 install -r /tmp/drydock/requirements-lock.txt
|
||||
RUN pip3 install \
|
||||
--no-cache-dir \
|
||||
-r /tmp/drydock/requirements-lock.txt
|
||||
|
||||
COPY . /tmp/drydock
|
||||
|
||||
|
@ -27,7 +27,7 @@ class TestClass(object):
|
||||
design_status, design_data = deckhand_orchestrator.get_effective_site(
|
||||
design_ref)
|
||||
|
||||
assert design_status.status == objects.fields.ActionResult.Success
|
||||
assert design_status.status == objects.fields.ValidationResult.Success
|
||||
|
||||
assert len(design_data.bootactions) > 0
|
||||
|
||||
@ -47,7 +47,7 @@ class TestClass(object):
|
||||
design_status, design_data = deckhand_orchestrator.get_effective_site(
|
||||
design_ref)
|
||||
|
||||
assert design_status.status == objects.fields.ActionResult.Success
|
||||
assert design_status.status == objects.fields.ValidationResult.Success
|
||||
|
||||
assert len(design_data.bootactions) > 0
|
||||
|
||||
|
@ -33,7 +33,7 @@ class TestClass(object):
|
||||
design_state=design_state, design_ref=design_ref)
|
||||
|
||||
print("%s" % str(design_status.to_dict()))
|
||||
assert design_status.status == objects.fields.ActionResult.Success
|
||||
assert design_status.status == objects.fields.ValidationResult.Success
|
||||
rack = design_data.get_rack('rack1')
|
||||
|
||||
assert rack.location.get('grid') == 'EG12'
|
||||
|
@ -35,7 +35,7 @@ class TestRouteDomains(object):
|
||||
design_status, design_data = orchestrator.get_effective_site(
|
||||
design_ref)
|
||||
|
||||
assert design_status.status == hd_fields.ActionResult.Success
|
||||
assert design_status.status == hd_fields.ValidationResult.Success
|
||||
|
||||
net_rack3 = design_data.get_network('storage_rack3')
|
||||
|
||||
@ -66,7 +66,7 @@ class TestRouteDomains(object):
|
||||
design_status, design_data = orchestrator.get_effective_site(
|
||||
design_ref)
|
||||
|
||||
assert design_status.status == hd_fields.ActionResult.Success
|
||||
assert design_status.status == hd_fields.ValidationResult.Success
|
||||
|
||||
net_rack3 = design_data.get_network('storage_rack3')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user