Uploaded image for project: 'VNF Validation Program'
  1. VNF Validation Program
  2. VVP-291

Cognitive Complexity - test_nova_servers_environment_context.py

XMLWordPrintable

    • VVP- Frankfurt 2, VVP- Frankfurt 3

      Fix issues in validate_metadata.

      Options:

      • Use get_param function to simplify the logic (ex: if get_param(value) == "environment_context")
      • Use any function to simplify the logic and determine if any of the metadata is environment_context (ex: has_env_context = any(get_param(value) == "environment_context" for value in metadata.values())
      • Then if has_env_context is True return the error message if the parameter type of environment context is not True (there is already a check that all get_param calls in a Heat template have their corresponding parameter defined so there's no need to account for that in the error message)

            dasarianusha dasarianusha
            tl2972 tl2972
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: