import unittest
from lcm.pub.verifyvnfd import verifyvnfd
from . import const
-from lcm.pub.exceptions import NFLCMException
class VerifyVnfdTest(unittest.TestCase):
self.assertEqual(ret, True)
def test_vnfd_verfify_fail_for_missing_required(self):
- try:
- verifyvnfd.verify(const.vnfd_model_miss_required)
- except NFLCMException as e:
- self.assertNotEqual(e.args[0], "")
+ ret = verifyvnfd.verify(const.vnfd_model_miss_required)
+ self.assertNotEqual(ret, "")
import six
import logging
import jsonschema
-from lcm.pub.exceptions import NFLCMException
logger = logging.getLogger(__name__)
logger.error("vnfd verify fail,%s" % _format_validation_error(error))
errors_found.append(_format_validation_error(error))
if len(errors_found) > 0:
- raise NFLCMException(errors_found)
+ logger.error(errors_found)
+ return errors_found
return True