@Library('tcp-qa')_

import groovy.xml.XmlUtil

common = new com.mirantis.mk.Common()
shared = new com.mirantis.system_qa.SharedPipeline()

NODE_LABEL = env.NODE_LABEL ?: "sre-team-infra"
MAINTENANCE_TEAM_SSH_ID = env.MAINTENANCE_TEAM_SSH_ID ?: 'maintenance-team-ssh'
//IPMI_CREDS = 'lab_engineer' // base bm lab
seed_ext_ip = env.SEED_EXT_IP ?: '172.16.180.2'
ssh_params = "-o ConnectTimeout=20 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
kubectl_openstack_cmd = "ssh ${ssh_params} root@${seed_ext_ip} /root/kaas-bootstrap/bin/kubectl --kubeconfig /root/child.kubeconfig -n openstack "

timeout(time: 6, unit: 'HOURS') {
  timestamps {
    node ("${NODE_LABEL}") {
      checkout scm
      shared.update_working_dir()
      sshagent(credentials: ['maintenance-team-ssh']) {
        withCredentials(
        [[$class: 'SSHUserPrivateKeyBinding',
          keyFileVariable: "MAINTENANCE_TEAM_SSH_KEY",
          credentialsId: MAINTENANCE_TEAM_SSH_ID,
          usernameVariable: "MAINTENANCE_TEAM_SSH_USERNAME"]]) {
          stage("Delete old tempest pod") {
            cmd_get_service_list_wo_tempest = "${kubectl_openstack_cmd} get osdpl osh-dev -o jsonpath='{.spec.features.services}' | jq 'del(.[index(\\\"tempest\\\")])' "
            try {
              service_list_wo_tempest = sh(returnStdout: true, script: "${cmd_get_service_list_wo_tempest}").trim()
              sh "${kubectl_openstack_cmd} patch osdpl osh-dev --type merge -p '{\\\"spec\\\":{\\\"features\\\":{\\\"services\\\":${service_list_wo_tempest}}}}'"
              sleep 60
            }
            catch(Exception e) {
              println("Tempest not included in services (Exception: ${e}")}
          }
          stage("Tempest configuration and run") {
            sh "${kubectl_openstack_cmd} patch osdpl osh-dev --type merge -p '{\\\"spec\\\":{\\\"features\\\":{\\\"services\\\":[\\\"tempest\\\"]}}}'"
            tempest_pod_name_cmd = "ssh ${ssh_params} root@${seed_ext_ip} '/root/kaas-bootstrap/bin/kubectl --kubeconfig /root/child.kubeconfig -n openstack get pods -o custom-columns=POD:.metadata.name --no-headers | grep openstack-tempest-run-tests'"
            tempest_pod_name = ''
            while(tempest_pod_name==''){
              try{
                tempest_pod_name = sh(returnStdout: true, script: "${tempest_pod_name_cmd}").trim()
              } catch(Exception e) {
              println("Wait tempest pod start (Exception: ${e}")}
              sleep 30
            }
            tempest_check_cmd = "ssh ${ssh_params} root@${seed_ext_ip} '/root/kaas-bootstrap/bin/kubectl --kubeconfig /root/child.kubeconfig -n openstack get -o jsonpath=\'{.status.phase}\' pod/${tempest_pod_name}'"
            status = ""
            while (status != "Succeeded"){ //Completed
              status = sh(returnStdout: true, script: "${tempest_check_cmd}").trim()
              println("Tempest pod status is ${status}")
              sleep 60
            }
          } //stage tempest
          stage("Run archive artifacts job") {
            def deploy = build job: 'mosk-archive-artifacts',
              parameters: [
                string(name: 'NODE_LABEL', value: NODE_LABEL),
                string(name: 'MAINTENANCE_TEAM_SSH_ID', value: MAINTENANCE_TEAM_SSH_ID),
                string(name: 'TCP_QA_REFS', value: env.TCP_QA_REFS),
                string(name: 'SEED_EXT_IP', value: seed_ext_ip)
              ],
              wait: false,
              propagate: false
          }
        } //withCredentials
      } //sshagent
    } //node
  } //timestamps
} //timeout