Modify VTN keyword file to get VTN Coordinator distribution 34/44134/7
authorKarthik.S <siva-karthik@hcl.com>
Wed, 17 Aug 2016 16:14:37 +0000 (21:44 +0530)
committerVenkatrangan Govindarajan <venkatrangang@hcl.com>
Tue, 23 Aug 2016 21:27:16 +0000 (21:27 +0000)
 * VTN Coordinator distribution is removed from karaf distribution,
   and it is placed in different path. So, here modified VtnCoKeyword.robot
   file to get correct distribution and to deploy for VTN Coordinator CSIT.

Change-Id: I66625db456229cfd023f292e6ed4447cb600ba4f
Signed-off-by: Karthik.S <siva-karthik@hcl.com>
csit/libraries/VtnCoKeywords.robot

index 408306fce1794bf72842aa35bedd6c21b79d9ba3..edd39bbfcbdc3373a1580603d25479794684e0f6 100644 (file)
@@ -12,6 +12,10 @@ Resource          ./Utils.robot
 
 *** variable ***
 ${vlan_topo}      sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --custom vlan_vtn_test.py --topo vlantopo
+${nexus_path}    https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/vtn/distribution.vtn-coordinator
+${boron}    6.3.0-SNAPSHOT
+${carbon}    6.4.0-SNAPSHOT
+${vtn_dist}    distribution.vtn-coordinator
 
 *** Keywords ***
 Get VtnCo
@@ -38,7 +42,15 @@ Start SuiteVtnCo
     SSHLibrary.Execute Command    sudo chown jenkins /usr/local/vtn
     SSHLibrary.Execute Command    sudo yum install -q -y http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
     SSHLibrary.Execute Command    sudo yum install -q -y postgresql93-libs postgresql93 postgresql93-server postgresql93-contrib postgresql93-odbc-09.03.0400
-    SSHLibrary.Execute Command    tar -C/ -jxvf ${WORKSPACE}/${BUNDLEFOLDER}/externalapps/*vtn-coordinator*-bin.tar.bz2
+    Run Keyword If    '${ODL_STREAM}' == 'boron'    SSHLibrary.Execute Command    wget "${nexus_path}/${boron}/maven-metadata.xml"
+    ...    ELSE IF    '${ODL_STREAM}' == 'carbon'   SSHLibrary.Execute Command    wget "${nexus_path}/${carbon}/maven-metadata.xml"
+    Run Keyword If    '${ODL_STREAM}' == 'boron' or '${ODL_STREAM}' == 'carbon'   SSHLibrary.Get_file    maven-metadata.xml
+    ${time_stamp}=    XML.Get Element Text    maven-metadata.xml    xpath=.//snapshot/timestamp
+    ${build_number}=    XML.Get Element Text    maven-metadata.xml    xpath=.//snapshot/buildNumber
+    Run Keyword If    '${ODL_STREAM}' == 'boron'    SSHLibrary.Execute Command    wget '${nexus_path}/${boron}/${vtn_dist}-6.3.0-${time_stamp}-${build_number}-bin.tar.bz2'
+    ...    ELSE IF    '${ODL_STREAM}' == 'carbon'    SSHLibrary.Execute Command    wget '${nexus_path}/${carbon}/${vtn_dist}-6.4.0-${time_stamp}-${build_number}-bin.tar.bz2'
+    Run Keyword If    '${ODL_STREAM}' == 'boron' or '${ODL_STREAM}' == 'carbon'   SSHLibrary.Execute Command    tar -C/ -jxvf ${vtn_dist}*-bin.tar.bz2
+    ...    ELSE    SSHLibrary.Execute Command    tar -C/ -jxvf ${WORKSPACE}/${BUNDLEFOLDER}/externalapps/${vtn_dist}*-bin.tar.bz2
     SSHLibrary.Execute Command    /usr/local/vtn/sbin/db_setup
     SSHLibrary.Execute Command    /usr/local/vtn/bin/vtn_start
     SSHLibrary.Execute Command    /usr/local/vtn/bin/unc_dmctl status