Merge "Revert "Add a line to change loglevel""
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 17 Jun 2020 17:19:28 +0000 (17:19 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Wed, 17 Jun 2020 17:19:28 +0000 (17:19 +0000)
INFO.yaml
bluval/blucon.py
bluval/bluval-icn.yaml [new file with mode: 0644]
bluval/bluval-rec.yaml
bluval/bluval.py
tests/variables.yaml

index 96eb18b..e14f346 100644 (file)
--- 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'
index 6913330..804bf63 100644 (file)
@@ -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 (file)
index 0000000..9d190bc
--- /dev/null
@@ -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"
index 07df9da..0f66df0 100644 (file)
@@ -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"
index 73cc68a..f8762bd 100644 (file)
@@ -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))
index 4ba17b4..fa3fe71 100644 (file)
@@ -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