Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 1 | // Copyright 2017-present Open Networking Foundation |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | node ("${TestNodeName}") { |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 16 | def withKind = false |
| 17 | if (params.withKind != null){ |
| 18 | withKind = params.withKind |
| 19 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 20 | timeout (100) { |
| 21 | try { |
| 22 | stage ("Parse deployment configuration file") { |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 23 | sh returnStdout: true, script: "rm -rf ${configBaseDir} voltha-system-tests kind-voltha" |
Suchitra Vemuri | e514b8c | 2019-09-23 19:37:18 -0700 | [diff] [blame] | 24 | sh returnStdout: true, script: "git clone -b master ${cordRepoUrl}/${configBaseDir}" |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 25 | sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/voltha-system-tests" |
Suchitra Vemuri | 6f78778 | 2020-04-10 20:56:34 -0700 | [diff] [blame] | 26 | sh returnStdout: true, script: "git clone -b master ${cordRepoUrl}/kind-voltha" |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 27 | if ( params.workFlow == "DT" ) { |
| 28 | deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-DT.yaml" |
| 29 | } |
| 30 | else |
| 31 | { |
| 32 | deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml" |
| 33 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 34 | } |
| 35 | stage('Clean up') { |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 36 | timeout(10) { |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 37 | sh returnStdout: true, script: """ |
| 38 | export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf |
Matteo Scandolo | 1294aeb | 2019-09-24 16:20:32 -0700 | [diff] [blame] | 39 | for hchart in \$(helm list -q | grep -E -v 'docker-registry|mavenrepo|ponnet'); |
| 40 | do |
| 41 | echo "Purging chart: \${hchart}" |
| 42 | helm delete --purge "\${hchart}" |
| 43 | done |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 44 | """ |
| 45 | timeout(5) { |
| 46 | waitUntil { |
| 47 | helm_deleted = sh returnStdout: true, script: """ |
| 48 | export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf && |
| 49 | helm ls -q | grep -E -v 'docker-registry|mavenrepo|ponnet' | wc -l |
| 50 | """ |
| 51 | return helm_deleted.toInteger() == 0 |
| 52 | } |
| 53 | } |
| 54 | timeout(5) { |
| 55 | waitUntil { |
| 56 | kubectl_deleted = sh returnStdout: true, script: """ |
| 57 | export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf && |
| 58 | kubectl get pods --all-namespaces --no-headers | grep -E -v 'kube-system|docker-registry|mavenrepo|ponnet' | wc -l |
| 59 | """ |
| 60 | return kubectl_deleted.toInteger() == 0 |
| 61 | } |
| 62 | } |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 63 | timeout(1) { |
Hung-Wei Chiu | 7ea92dd | 2020-04-07 16:40:35 -0700 | [diff] [blame] | 64 | sh returnStdout: false, script: """ |
| 65 | #Remove all while true; do kubectl port-forward ...done; rules |
| 66 | for port_fwd_id in `ps -ax | grep "port-forward" | grep -E "onos|voltha" | grep "while true"| awk '{print \$1}'`; |
| 67 | do |
| 68 | cat /proc/\$port_fwd_id/cmdline |
| 69 | kill -9 \$port_fwd_id |
| 70 | done |
| 71 | |
| 72 | #Remove all kubectl port-forward rules |
| 73 | for port_fwd_id in `ps -ax | grep "port-forward" | grep -E "onos|voltha" | awk '{print \$1}'`; |
| 74 | do |
| 75 | cat /proc/\$port_fwd_id/cmdline |
| 76 | kill -9 \$port_fwd_id |
| 77 | done |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 78 | """ |
| 79 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 80 | } |
| 81 | } |
Suchitra Vemuri | 1934abc | 2019-11-05 12:41:11 -0800 | [diff] [blame] | 82 | stage('Install Voltha') { |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 83 | timeout(10) { |
| 84 | sh returnStdout: true, script: """ |
| 85 | export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf |
| 86 | cd kind-voltha/ |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 87 | if [ "${branch}" != "master" ]; then |
| 88 | cd $WORKSPACE/kind-voltha |
| 89 | source releases/${branch} |
Suchitra Vemuri | b948386 | 2019-11-05 21:37:29 -0800 | [diff] [blame] | 90 | else |
Andy Bavier | 7cee6f4 | 2019-11-05 16:49:47 -0700 | [diff] [blame] | 91 | export EXTRA_HELM_FLAGS='-f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/voltha/${configFileName}.yml' |
Suchitra Vemuri | 1934abc | 2019-11-05 12:41:11 -0800 | [diff] [blame] | 92 | fi |
Andy Bavier | 7cee6f4 | 2019-11-05 16:49:47 -0700 | [diff] [blame] | 93 | |
| 94 | # VOL-2194 ONOS SSH and REST ports hardcoded to 30115/30120 in tests |
hwchiu | f2a2414 | 2020-04-04 05:00:29 +0000 | [diff] [blame] | 95 | # JENKINS_NODE_COOKIE=dontKillMe ask Jenkins doesn't kill the proces after this job. we want the `while true; do kubectl port-forward` keep alive |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 96 | if [[ "${workFlow}" == "DT" ]]; then |
hwchiu | f2a2414 | 2020-04-04 05:00:29 +0000 | [diff] [blame] | 97 | JENKINS_NODE_COOKIE=dontKillMe ONOS_SSH_PORT=30115 ONOS_API_PORT=30120 VOLTHA_LOG_LEVEL=DEBUG WITH_SIM_ADAPTERS=n WITH_TP=yes DEPLOY_K8S=no INSTALL_KUBECTL=no INSTALL_HELM=no WITH_EAPOL=no WITH_DHCP=no WITH_IGMP=no WITH_RADIUS=no FANCY=0 ./voltha up |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 98 | else |
hwchiu | f2a2414 | 2020-04-04 05:00:29 +0000 | [diff] [blame] | 99 | JENKINS_NODE_COOKIE=dontKillMe ONOS_SSH_PORT=30115 ONOS_API_PORT=30120 VOLTHA_LOG_LEVEL=DEBUG WITH_SIM_ADAPTERS=n WITH_RADIUS=y WITH_TP=yes DEPLOY_K8S=no INSTALL_KUBECTL=no INSTALL_HELM=no FANCY=0 ./voltha up |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 100 | fi |
Andy Bavier | 7cee6f4 | 2019-11-05 16:49:47 -0700 | [diff] [blame] | 101 | |
Suchitra Vemuri | 1934abc | 2019-11-05 12:41:11 -0800 | [diff] [blame] | 102 | kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c |
| 103 | kubectl get nodes -o wide |
| 104 | kubectl get pods -n voltha -o wide |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 105 | """ |
Suchitra Vemuri | 1934abc | 2019-11-05 12:41:11 -0800 | [diff] [blame] | 106 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 107 | } |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 108 | if ( withKind && deployment_config.fabric_switches.size() > 0 ) { |
| 109 | stage('OpenFlow port forward for aggregation switch') { |
| 110 | timeout(1) { |
| 111 | sh returnStdout: true, script: """ |
| 112 | export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf |
| 113 | #This uses the default route out, porperly configured is the management |
| 114 | mgmt_address=`ip route get 1 | awk '{print \$NF;exit}'` |
| 115 | JENKINS_NODE_COOKIE=dontkill kubectl port-forward -n default service/onos-openflow --address=\$mgmt_address 6653:6653 >> /dev/null 2>&1 & |
| 116 | """ |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | if ( params.configurePod && params.profile != "Default" ) { |
Suchitra Vemuri | 7268009 | 2019-10-03 12:39:20 -0700 | [diff] [blame] | 121 | stage('Push Tech-Profile') { |
| 122 | timeout(1) { |
| 123 | out_push_tp = sh returnStatus: true, script: """ |
| 124 | export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf |
| 125 | etcd_container=\$(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk 'NR==1{print \$1}') |
hwchiu | c77c7d2 | 2019-10-18 13:58:35 -0700 | [diff] [blame] | 126 | kubectl cp $WORKSPACE/voltha-system-tests/tests/data/TechProfile-${profile}.json voltha/\$etcd_container:/tmp/flexpod.json |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 127 | put_result=\$(kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/XGS-PON/64') |
Suchitra Vemuri | 7268009 | 2019-10-03 12:39:20 -0700 | [diff] [blame] | 128 | """ |
| 129 | return out_push_tp == 0 |
| 130 | } |
| 131 | timeout(1) { |
| 132 | out_get_tp = sh returnStatus: true, script: """ |
| 133 | etcd_container=\$(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk 'NR==1{print \$1}') |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 134 | get_result=\$(kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/voltha/technology_profiles/XGS-PON/64') |
Suchitra Vemuri | 7268009 | 2019-10-03 12:39:20 -0700 | [diff] [blame] | 135 | """ |
| 136 | return out_get_tp == 0 |
| 137 | } |
hwchiu | c77c7d2 | 2019-10-18 13:58:35 -0700 | [diff] [blame] | 138 | } |
| 139 | } |
| 140 | stage('Push Sadis-config') { |
| 141 | timeout(1) { |
| 142 | sadis_out = sh returnStatus: true, script: """ |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 143 | if [[ "${workFlow}" == "DT" ]]; then |
| 144 | curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis-DT.json |
| 145 | else |
Suchitra Vemuri | 7268009 | 2019-10-03 12:39:20 -0700 | [diff] [blame] | 146 | curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/voltha-system-tests/tests/data/${configFileName}-sadis.json |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 147 | fi |
| 148 | """ |
| 149 | return sadis_out == 0 |
You Wang | b9526e6 | 2019-10-07 15:25:48 -0700 | [diff] [blame] | 150 | } |
hwchiu | c77c7d2 | 2019-10-18 13:58:35 -0700 | [diff] [blame] | 151 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 152 | if ( params.reinstallOlt ) { |
| 153 | stage('Reinstall OLT software') { |
| 154 | for(int i=0; i < deployment_config.olts.size(); i++) { |
| 155 | sh returnStdout: true, script: """ |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 156 | sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} "dpkg --install ${oltDebVersion}" |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 157 | sleep 10 |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 158 | """ |
| 159 | timeout(5) { |
| 160 | waitUntil { |
| 161 | olt_sw_present = sh returnStdout: true, script: """ |
| 162 | sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'dpkg --list | grep asfvolt16 | wc -l' |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 163 | if ( ${deployment_config.olts[i].fortygig} ); then |
| 164 | sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'echo "port ce128 sp=40000" >> /broadcom/qax.soc' |
| 165 | fi |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 166 | """ |
| 167 | return olt_sw_present.toInteger() == 1 |
| 168 | } |
| 169 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 170 | } |
| 171 | } |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 172 | stage('Restart OLT processes') { |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 173 | for(int i=0; i < deployment_config.olts.size(); i++) { |
| 174 | timeout(5) { |
| 175 | sh returnStdout: true, script: """ |
| 176 | ssh-keyscan -H ${deployment_config.olts[i].ip} >> ~/.ssh/known_hosts |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 177 | sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'reboot' || true |
| 178 | sleep 120 |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 179 | """ |
| 180 | } |
| 181 | timeout(15) { |
| 182 | waitUntil { |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 183 | devprocess = sh returnStdout: true, script: "sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'ps -ef | grep dev_mgmt_daemon | wc -l'" |
| 184 | return devprocess.toInteger() > 0 |
| 185 | } |
| 186 | } |
| 187 | timeout(15) { |
| 188 | waitUntil { |
| 189 | openoltprocess = sh returnStdout: true, script: "sshpass -p ${deployment_config.olts[i].pass} ssh -l ${deployment_config.olts[i].user} ${deployment_config.olts[i].ip} 'ps -ef | grep openolt | wc -l'" |
| 190 | return openoltprocess.toInteger() > 0 |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 191 | } |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | } |
Matteo Scandolo | 1294aeb | 2019-09-24 16:20:32 -0700 | [diff] [blame] | 196 | if ( deployment_config.fabric_switches.size() > 0 ) { |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 197 | stage('Switch Configurations in ONOS') { |
| 198 | timeout(1) { |
| 199 | netcfg_out = sh returnStatus: true, script: """ |
| 200 | curl -sSL --user karaf:karaf -X POST -H Content-Type:application/json http://${deployment_config.nodes[0].ip}:30120/onos/v1/network/configuration --data @$WORKSPACE/${configBaseDir}/${configToscaDir}/voltha/${configFileName}-onos-netcfg-switch.json |
| 201 | curl -sSL --user karaf:karaf -X POST http://${deployment_config.nodes[0].ip}:30120/onos/v1/applications/org.onosproject.segmentrouting/active |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 202 | |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 203 | """ |
| 204 | return netcfg_out == 0 |
| 205 | } |
| 206 | timeout(1) { |
| 207 | waitUntil { |
| 208 | sr_active_out = sh returnStatus: true, script: """ |
You Wang | eb76aeb | 2019-12-09 22:08:23 -0800 | [diff] [blame] | 209 | ssh-keygen -R [${deployment_config.nodes[0].ip}]:30115 |
Suchitra Vemuri | c325726 | 2019-12-05 19:06:42 -0800 | [diff] [blame] | 210 | ssh-keyscan -p 30115 -H ${deployment_config.nodes[0].ip} >> ~/.ssh/known_hosts |
| 211 | sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set TRACE org.opencord.dhcpl2relay" |
| 212 | sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set TRACE org.opencord.aaa" |
| 213 | sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "log:set TRACE org.opencord.olt" |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 214 | curl -sSL --user karaf:karaf -X GET http://${deployment_config.nodes[0].ip}:30120/onos/v1/applications/org.onosproject.segmentrouting | jq '.state' | grep ACTIVE |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 215 | sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.onosproject.net.flow.impl.FlowRuleManager purgeOnDisconnection false" |
Andrea Campanella | a1b0651 | 2020-04-01 09:56:23 +0200 | [diff] [blame] | 216 | sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "cfg set org.onosproject.net.meter.impl.MeterManager purgeOnDisconnection false" |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 217 | """ |
| 218 | return sr_active_out == 0 |
| 219 | } |
| 220 | } |
Suchitra Vemuri | cf5c5c5 | 2020-05-05 17:54:07 -0700 | [diff] [blame^] | 221 | timeout(5) { |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 222 | for(int i=0; i < deployment_config.hosts.src.size(); i++) { |
Suchitra Vemuri | cf5c5c5 | 2020-05-05 17:54:07 -0700 | [diff] [blame^] | 223 | def aggPort = -1 |
| 224 | for(int j=0; j < deployment_config.olts.size(); j++) { |
| 225 | if(deployment_config.olts[j].serial == deployment_config.hosts.src[j].olt){ |
| 226 | aggPort = deployment_config.olts[j].aggPort |
| 227 | } |
| 228 | } |
| 229 | if(aggPort == -1){ |
| 230 | throw new Exception("Upstream port for the olt is not configured, field aggPort is empty") |
| 231 | } |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 232 | xconnect_out = sh returnStatus: true, script: """ |
Suchitra Vemuri | f82086d | 2020-01-16 19:55:16 -0800 | [diff] [blame] | 233 | version=\$(sshpass -p karaf ssh -p 30115 karaf@${deployment_config.nodes[0].ip} "summary" | grep version) |
Suchitra Vemuri | 0c40ebe | 2020-03-27 15:09:36 -0700 | [diff] [blame] | 234 | sleep 10 |
Suchitra Vemuri | f82086d | 2020-01-16 19:55:16 -0800 | [diff] [blame] | 235 | if [[ \$version == *"version=2.2"* ]]; then |
Suchitra Vemuri | cf5c5c5 | 2020-05-05 17:54:07 -0700 | [diff] [blame^] | 236 | curl -X POST --user karaf:karaf --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"deviceId": "${deployment_config.fabric_switches[0].device_id}", "vlanId": "${deployment_config.hosts.src[i].s_tag}", "endpoints": [${deployment_config.fabric_switches[0].bngPort},${aggPort}]}' 'http://${deployment_config.nodes[0].ip}:30120/onos/segmentrouting/xconnect' |
Suchitra Vemuri | f82086d | 2020-01-16 19:55:16 -0800 | [diff] [blame] | 237 | else |
Suchitra Vemuri | cf5c5c5 | 2020-05-05 17:54:07 -0700 | [diff] [blame^] | 238 | curl -X POST --user karaf:karaf --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"deviceId": "${deployment_config.fabric_switches[0].device_id}", "vlanId": "${deployment_config.hosts.src[i].s_tag}", "ports": [${deployment_config.fabric_switches[0].bngPort},${aggPort}]}' 'http://${deployment_config.nodes[0].ip}:30120/onos/segmentrouting/xconnect' |
Suchitra Vemuri | f82086d | 2020-01-16 19:55:16 -0800 | [diff] [blame] | 239 | fi |
You Wang | 25e5861 | 2019-10-01 16:30:28 -0700 | [diff] [blame] | 240 | """ |
| 241 | } |
| 242 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 243 | } |
Matteo Scandolo | 1294aeb | 2019-09-24 16:20:32 -0700 | [diff] [blame] | 244 | } |
Kailash | 6f5acb6 | 2019-08-28 14:38:45 -0700 | [diff] [blame] | 245 | currentBuild.result = 'SUCCESS' |
| 246 | } catch (err) { |
| 247 | currentBuild.result = 'FAILURE' |
| 248 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false]) |
| 249 | throw err |
| 250 | } |
| 251 | echo "RESULT: ${currentBuild.result}" |
| 252 | } |
| 253 | } |