adding xos-tosca verify and unit test jobs

Change-Id: Ib5687c81800fc63ba3425957b0aeba9a18be4cf6
diff --git a/jjb/verify/xos-tosca.yaml b/jjb/verify/xos-tosca.yaml
new file mode 100644
index 0000000..3fbf0df
--- /dev/null
+++ b/jjb/verify/xos-tosca.yaml
@@ -0,0 +1,22 @@
+---
+# verification jobs for 'xos-tosca' repo
+
+- project:
+    name: xos-tosca
+    project: '{name}'
+
+    jobs:
+      - 'verify-xos-jobs':
+          branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+    name: 'verify-xos-tosca-jobs'
+    jobs:
+      - 'verify-licensed'
+      - 'verify-sonarqube':
+          dependency-jobs: 'verify_xos-tosca_licensed'
+      - 'api-test':
+          dependency-jobs: 'verify_xos-tosca_sonarqube'
+          pipeline_script: 'all-xos-tosca-api-test-helm.groovy'
+      - 'xos-tosca-unit-test':
+          dependency-jobs: 'verify_xos-tosca_sonarqube'
diff --git a/jjb/xos-tosca-unit.yaml b/jjb/xos-tosca-unit.yaml
new file mode 100644
index 0000000..8b6f601
--- /dev/null
+++ b/jjb/xos-tosca-unit.yaml
@@ -0,0 +1,80 @@
+---
+# xos tosca unit test
+
+- job-template:
+    id: 'xos-tosca-unit-test'
+    name: 'verify_{project}_unit-test'
+
+    description: |
+      Created by {id} job-template from ci-management/jjb/xos-tosca-unit.yaml
+
+    triggers:
+      - cord-infra-gerrit-trigger-patchset:
+          gerrit-server-name: '{gerrit-server-name}'
+          project-regexp: '^{project}$'
+          branch-regexp: '{branch-regexp}'
+          dependency-jobs: '{dependency-jobs}'
+          file-include-regexp: '{all-files-regexp}'
+
+    properties:
+      - cord-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+          artifact-num-to-keep: '{artifact-num-to-keep}'
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: 20
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '$GIT_URL/$GERRIT_PROJECT'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: 'false'
+          choosing-strategy: gerrit
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    node: 'ubuntu16.04-basebuild-1c-2g'
+    project-type: freestyle
+    concurrent: true
+
+    builders:
+      - shell: |
+          #/usr/bin/env bash
+          BASEDIR=$(pwd)
+
+          # setup virtual env
+          virtualenv -q venv-xos --no-site-packages
+          source $BASEDIR/venv-xos/bin/activate
+          pip install --upgrade pip setuptools
+
+          # download changeset
+          mkdir cord && cd cord/
+          repo init -u https://gerrit.opencord.org/manifest -b $GERRIT_BRANCH
+          repo sync
+          repo download $GERRIT_PROJECT $GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER
+
+          # Install XOS dependencies
+          pip install nose2 requests_mock plyxproto jinja2 pattern astunparse pyyaml colorama
+          pip install pykwalify==1.6.1
+          pip install multistructlog==1.5
+          pip install networkx==1.11
+          pip install netaddr==0.7.19
+          pip install ipaddress==1.0.19
+          echo "Requirements Installed"
+
+          cd $BASEDIR/cord/orchestration/xos/lib/xos-util; python setup.py install; echo "xos-util Installed"
+          cd $BASEDIR/cord/orchestration/xos/lib/xos-config; python setup.py install; echo "xos-config Installed"
+          cd $BASEDIR/cord/orchestration/xos/lib/xos-genx; python setup.py install; echo "xos-genx Installed"
+
+          cp -R $BASEDIR/cord/component/chameleon $BASEDIR/cord/orchestration/xos/xos/xos_client/xosapi/chameleon
+          cd $BASEDIR/cord/orchestration/xos/xos/xos_client/xosapi/chameleon/protos; VOLTHA_BASE=anything make
+          cd $BASEDIR/cord/orchestration/xos/xos/xos_client; python setup.py install
+          chmod 777 $BASEDIR/venv-xos/lib/python2.7/site-packages/xosapi/chameleon/protoc_plugins/gw_gen.py
+          chmod 777 $BASEDIR/venv-xos/lib/python2.7/site-packages/xosapi/chameleon/protoc_plugins/swagger_gen.py
+          pip install -r $BASEDIR/cord/orchestration/xos-tosca/pip_requirements.txt
+
+          # Run the tests
+          cd $BASEDIR/cord/orchestration/xos-tosca
+          make tests