From: Alexandru Avadanii Date: Wed, 17 Jun 2020 17:19:28 +0000 (+0000) Subject: Merge "Revert "Add a line to change loglevel"" X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=validation.git;a=commitdiff_plain;h=abd8930d6b07fc32b2ed66e6768f158ccb8baaa7;hp=88f84cff9e56c3c8113be49729db9473b2906d47 Merge "Revert "Add a line to change loglevel"" --- diff --git a/INFO.yaml b/INFO.yaml index 96eb18b..e14f346 100644 --- a/INFO.yaml +++ b/INFO.yaml @@ -34,16 +34,6 @@ repositories: - validation committers: - <<: *akraino_validation_ptl - - name: 'Cristina Pauna' - email: 'cristina.pauna@enea.com' - company: 'enea' - id: 'cristinapauna' - timezone: 'Europe/Bucharest' - - name: 'Juha Kosonen' - email: 'juha.kosonen@nokia.com' - company: 'nokia' - id: 'jukosone' - timezone: 'Europe/Helsinki' - name: 'Andrew Wilkinson' email: 'arkwilkinson@gmail.com' company: 'gmail' diff --git a/bluval/blucon.py b/bluval/blucon.py index 6913330..804bf63 100644 --- a/bluval/blucon.py +++ b/bluval/blucon.py @@ -74,7 +74,7 @@ def invoke_docker(bluprint, layer, tag): if _PULL: pull_docker(layer, tag) volume_list = get_volumes('common') + get_volumes(layer) - cmd = ("docker run --rm" + volume_list + _SUBNET + + cmd = ("docker run --rm --net=host" + volume_list + _SUBNET + " akraino/validation:{0}-{3}" " /bin/sh -c" " 'cd /opt/akraino/validation " diff --git a/bluval/bluval-icn.yaml b/bluval/bluval-icn.yaml new file mode 100644 index 0000000..9d190bc --- /dev/null +++ b/bluval/bluval-icn.yaml @@ -0,0 +1,25 @@ +blueprint: + name: icn + layers: + - os + - k8s + + os: &os + - + name: lynis + what: lynis + optional: "False" + - + name: vuls + what: vuls + optional: "False" + + k8s: &k8s + - + name: conformance + what: conformance + optional: "False" + - + name: kube-hunter + what: kube-hunter + optional: "False" diff --git a/bluval/bluval-rec.yaml b/bluval/bluval-rec.yaml index 07df9da..0f66df0 100644 --- a/bluval/bluval-rec.yaml +++ b/bluval/bluval-rec.yaml @@ -27,10 +27,13 @@ blueprint: - name: hp_baremetal what: hp_baremetal + optional: "True" + os: &os_rec - name: ltp what: ltp + optional: "True" - name: cyclictest what: cyclictest @@ -38,16 +41,23 @@ blueprint: - name: lynis what: lynis - optional: "True" + optional: "False" + - + name: vuls + what: vuls + optional: "False" docker: &docker_base - name: docker_bench what: docker_bench + optional: "True" + k8s: &k8s - name: conformance what: conformance + optional: "False" - name: etcd_ha what: etcd_ha @@ -55,4 +65,4 @@ blueprint: - name: kube-hunter what: kube-hunter - optional: "True" + optional: "False" diff --git a/bluval/bluval.py b/bluval/bluval.py index 73cc68a..f8762bd 100644 --- a/bluval/bluval.py +++ b/bluval/bluval.py @@ -61,10 +61,15 @@ def run_testcase(testcase): variables_dict['log_path'] = str(results_path) variables_updated_file = mypath.parents[1].joinpath("tests/variables_updated.yaml") variables_updated_file.write_text(str(variables_dict)) + variables_loglevel = variables_dict['loglevel'] # run the test - args = ["robot", "-V", str(variables_updated_file), "-d", str(results_path), - "-n", "non-critical", "-b", "debug.log", str(test_path)] + args = ["robot", "-V", str(variables_updated_file), + "-d", str(results_path), + "-n", "non-critical", + "-b", "debug.log", + "-L", str(variables_loglevel), + str(test_path)] print('Executing testcase {}'.format(name)) print('show_stopper {}'.format(show_stopper)) diff --git a/tests/variables.yaml b/tests/variables.yaml index 4ba17b4..fa3fe71 100644 --- a/tests/variables.yaml +++ b/tests/variables.yaml @@ -76,3 +76,9 @@ rootpswd: rootpassword # Required root password to log in to the host ### Input variables for Conformance test internal_registry: '' # Docker internal registry dns_domain: cluster.local # cluster's DNS domain + +### Debug support +# Log level is passed to Robot which accepts the values +# NONE, WARN, INFO, DEBUG, and TRACE. +# Default is INFO +loglevel: INFO