fuel-ccp/fuel_ccp/validate.py
Yuriy Taraday b722dd7a28 Fix issued with validation part
* fixed one implicit relative import (doesn't work on Python 3.x)
* remove using getLogger from oslo.log (removed everywhere else in
  previous CRs)

Change-Id: I4dc2d18ee89de0b088503233498b8f3df2c44b80
2016-09-19 20:16:09 +03:00

19 lines
612 B
Python

from fuel_ccp.common import utils
from fuel_ccp.validation import service as service_validation
def validate(components, types):
if not types:
types = ["service-def"]
for validation_type in set(types):
if validation_type == "service-def":
component_map = utils.get_deploy_components_info()
service_validation.validate_service_definitions(component_map,
components)
else:
raise RuntimeError(
"Unexpected validation type: '{}'".format(validation_type)
)