Merge "Separating logs by test in VOLTHA Sanity"
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index d3b226a..d887d32 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -98,7 +98,7 @@
 
     # matching repos that should be version tagged by the version-tag job
     # (basically the same as imagebuilder projects + helm charts + tools
-    version-tag-projects-regexp: '^(?!aether)(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric.*|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|.*-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter.*|voltha-lib-go|voltha-python-base|voltha-docker-tools|mn-stratum-siab|ofagent.*|bng|voltctl|openolt-scale-tester|nem-ondemand-proxy|multifabric|openolt-test|omci-lib-go|kind-voltha|voltha-docs|mac-learning|goloxi|device-management-interface|bbsim-sadis-server)$'
+    version-tag-projects-regexp: '^(?!aether)(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric.*|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|.*-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoe.*|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter.*|voltha-lib-go|voltha-python-base|voltha-docker-tools|mn-stratum-siab|ofagent.*|bng|voltctl|openolt-scale-tester|nem-ondemand-proxy|multifabric|openolt-test|omci-lib-go|kind-voltha|voltha-docs|mac-learning|goloxi|device-management-interface|bbsim-sadis-server)$'
 
     # List of all repos that contribute to the CORD guide
     cord-guide-projects-regexp: '^(att-workflow-driver|cord-tester|cordctl|exampleservice|fabric|fabric-crossconnect|hippie-oss|kubernetes-service|olt-service|onos-service|openolt|openstack|rcord|simpleexampleservice|vrouter|vtn-service|xos|xos-gui|xos-tosca)$'
diff --git a/jjb/omec-ci.yaml b/jjb/omec-ci.yaml
index c3097da..8f468b4 100644
--- a/jjb/omec-ci.yaml
+++ b/jjb/omec-ci.yaml
@@ -988,7 +988,12 @@
       - string:
           name: logSince
           default: '{log-since}'
-          description: 'Only upload logs newer than a relative duration e.g. 1h'
+          description: 'Only upload logs newer than a relative duration e.g. 1h. Leave empty if logSinceTime is specified'
+
+      - string:
+          name: logSinceTime
+          default: ''
+          description: 'Only upload logs newer than a date (RFC3339). Leave empty if logSince is specified'
 
     concurrent: false
 
diff --git a/jjb/pipeline/voltha-dt-physical-functional-tests.groovy b/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
index c1f16c0..566d245 100644
--- a/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha-dt-physical-functional-tests.groovy
@@ -227,6 +227,26 @@
       }
     }
 
+    stage('Multiple OLT Tests') {
+      environment {
+        ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
+        ROBOT_FILE="Voltha_DT_MultiOLT_Tests.robot"
+        ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/dt-workflow/MultipleOLTScenarios"
+      }
+      steps {
+        sh """
+        mkdir -p $ROBOT_LOGS_DIR
+        if ( ${powerSwitch} ); then
+             export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -i PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
+        else
+             export ROBOT_MISC_ARGS="--removekeywords wuks -L TRACE -i functionalDt -e PowerSwitch -e bbsim -e notready -d $ROBOT_LOGS_DIR -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} -v container_log_dir:$WORKSPACE"
+        fi
+        make -C $WORKSPACE/voltha-system-tests voltha-dt-test || true
+        """
+      }
+    }
+
+
     stage('Error Scenario Tests') {
       environment {
         ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml"
diff --git a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
index 2017c89..24c015b 100644
--- a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
+++ b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
@@ -159,6 +159,21 @@
       }
     }
 
+    stage('Multiple OLT Tests') {
+      environment {
+        ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/MultipleOLTTests"
+      }
+      steps {
+        sh '''
+           set +e
+           mkdir -p $WORKSPACE/RobotLogs
+
+           export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR"
+           make -C $WORKSPACE/voltha-system-tests ${makeMultiOltTarget} || true
+           '''
+      }
+    }
+
     stage('Error Tests') {
       environment {
         ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/ErrorTests"
diff --git a/jjb/pipeline/voltha-openonu-go-tests.groovy b/jjb/pipeline/voltha-openonu-go-tests.groovy
index f356767..19e57ef 100755
--- a/jjb/pipeline/voltha-openonu-go-tests.groovy
+++ b/jjb/pipeline/voltha-openonu-go-tests.groovy
@@ -332,6 +332,54 @@
            '''
       }
     }
+
+    stage('TT workflow') {
+      environment {
+        ROBOT_LOGS_DIR="$WORKSPACE/RobotLogs/TTWorkflow"
+      }
+      steps {
+        sh '''
+           cd $WORKSPACE/kind-voltha/
+           WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down
+
+           export EXTRA_HELM_FLAGS+="--set use_openonu_adapter_go=true,log_agent.enabled=False ${extraHelmFlags} "
+
+           IMAGES="adapter_open_onu_go"
+
+           for I in \$IMAGES
+           do
+             EXTRA_HELM_FLAGS+="--set images.\$I.tag=citest,images.\$I.pullPolicy=Never "
+           done
+
+           # Workflow-specific flags
+           export WITH_RADIUS=no
+           export WITH_EAPOL=no
+           export WITH_DHCP=yes
+           export WITH_IGMP=yes
+           export CONFIG_SADIS="external"
+           export BBSIM_CFG="configs/bbsim-sadis-tt.yaml"
+
+           DEPLOY_K8S=n ./voltha up
+
+           mkdir -p $ROBOT_LOGS_DIR
+           export ROBOT_MISC_ARGS="-d $ROBOT_LOGS_DIR -e PowerSwitch"
+
+           # By default, all tests tagged 'sanityTt' are run.  This covers basic functionality
+           # like running through the TT workflow for a single subscriber.
+           export TARGET=sanity-kind-tt
+
+           # If the Gerrit comment contains a line with "functional tests" then run the full
+           # functional test suite.  This covers tests tagged either 'sanityTt' or 'functionalTt'.
+           # Note: Gerrit comment text will be prefixed by "Patch set n:" and a blank line
+           REGEX="functional tests"
+           if [[ "$GERRIT_EVENT_COMMENT_TEXT" =~ \$REGEX ]]; then
+             TARGET=functional-single-kind-tt
+           fi
+
+           make -C $WORKSPACE/voltha-system-tests \$TARGET || true
+           '''
+      }
+    }
   }
   post {
     always {
diff --git a/jjb/verify/pppoeagent.yaml b/jjb/verify/pppoeagent.yaml
new file mode 100644
index 0000000..9702b87
--- /dev/null
+++ b/jjb/verify/pppoeagent.yaml
@@ -0,0 +1,18 @@
+---
+# jobs for 'pppoeagent' repo
+
+- project:
+    name: pppoeagent
+    project: '{name}'
+
+    jobs:
+      - 'pppoeagent-jobs':
+          branch-regexp: '^(.*)$'
+
+- job-group:
+    name: 'pppoeagent-jobs'
+    jobs:
+      - 'verify-licensed'
+      - 'tag-collision-reject'
+      - 'maven-test'
+      - 'maven-publish'
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index f534efd..3d1c8e8 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -11,6 +11,7 @@
     make-target-failtest: bbsim-failurescenarios
     make-target-errortest: bbsim-errorscenarios
     make-target-alarmtest: bbsim-alarms-kind
+    make-target-multipleolt: bbsim-multiolt-kind
 
     jobs:
       - 'voltha-periodic-test':
@@ -21,6 +22,7 @@
           make-target-failtest: bbsim-failurescenarios
           make-target-errortest: bbsim-errorscenarios
           make-target-alarmtest: bbsim-alarms-kind
+          make-target-multipleolt: bbsim-multiolt-kind
           withAlarms: true
           code-branch: 'master'
           olts: 1
@@ -36,6 +38,7 @@
           make-target-failtest: bbsim-multiolt-failurescenarios
           make-target-errortest: bbsim-multiolt-errorscenarios
           make-target-alarmtest: bbsim-alarms-kind
+          make-target-multipleolt: bbsim-multiolt-kind
           withAlarms: false
           code-branch: 'master'
           olts: 2
@@ -50,6 +53,7 @@
           make-target-failtest: bbsim-failurescenarios
           make-target-errortest: bbsim-errorscenarios
           make-target-alarmtest: bbsim-alarms-kind
+          make-target-multipleolt: bbsim-multiolt-kind
           withAlarms: true
           make-target: functional-single-kind
           code-branch: 'master'
@@ -229,6 +233,11 @@
           description: 'Makefile target to invoke during failure/based test'
 
       - string:
+          name: makeMultiOltTarget
+          default: '{make-target-multipleolt}'
+          description: 'Makefile target to invoke during multiple olt test'
+
+      - string:
           name: makeErrortestTarget
           default: '{make-target-errortest}'
           description: 'Makefile target to invoke during error test'