Skip using DH engine for validation when fetching from DH
Change-Id: Ib91e6d029be88e6db54fd68f1c48e58111d8a680
This commit is contained in:
parent
9624f7fb34
commit
393fd5cff0
|
@ -61,9 +61,9 @@ class Configuration:
|
|||
|
||||
@classmethod
|
||||
def from_design_ref(cls, design_ref, **kwargs):
|
||||
documents = get_documents(design_ref)
|
||||
documents, should_validate = get_documents(design_ref)
|
||||
|
||||
return cls(documents=documents, **kwargs)
|
||||
return cls(documents=documents, validate=should_validate, **kwargs)
|
||||
|
||||
def __getitem__(self, path):
|
||||
return self.get_path(path,
|
||||
|
|
|
@ -18,13 +18,15 @@ def get_documents(design_ref):
|
|||
LOG.debug('Fetching design_ref="%s"', design_ref)
|
||||
if design_ref.startswith(_DECKHAND_PREFIX):
|
||||
response = _get_from_deckhand(design_ref)
|
||||
should_validate = False
|
||||
else:
|
||||
response = _get_from_basic_web(design_ref)
|
||||
should_validate = True
|
||||
LOG.debug('Got response for design_ref="%s"', design_ref)
|
||||
|
||||
response.raise_for_status()
|
||||
|
||||
return list(yaml.safe_load_all(response.text))
|
||||
return list(yaml.safe_load_all(response.text)), should_validate
|
||||
|
||||
|
||||
def _get_from_basic_web(design_ref):
|
||||
|
|
Loading…
Reference in New Issue