From d45131fbea51442d1cc11b71146fd8870614c332 Mon Sep 17 00:00:00 2001 From: mgaliar <53537622+mgaliar@users.noreply.github.com> Date: Wed, 1 May 2024 13:47:58 -1000 Subject: [PATCH] Updating SCEPTRE app automation (#27) * sceptre app closing QC on backup opc * Update historian.mako --------- Co-authored-by: root --- .../apps/sceptre/templates/historian.mako | 1 - .../apps/sceptre/templates/topserver.mako | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/python/phenix_apps/apps/sceptre/templates/historian.mako b/src/python/phenix_apps/apps/sceptre/templates/historian.mako index 889ac53..184dcd8 100644 --- a/src/python/phenix_apps/apps/sceptre/templates/historian.mako +++ b/src/python/phenix_apps/apps/sceptre/templates/historian.mako @@ -82,7 +82,6 @@ Do { $no = Get-UIAWindow -Name "Wonderware Historian Configuration Editor" | Get-UIAButton -n "No" $countDown-- } Until ($no -or ($countDown -le 0)) -CheckTimeout -count $countDown $no | Invoke-UIAButtonClick | Out-Null Echo 'Remove old historian group HISTORIAN' diff --git a/src/python/phenix_apps/apps/sceptre/templates/topserver.mako b/src/python/phenix_apps/apps/sceptre/templates/topserver.mako index 7328fdd..45d3126 100644 --- a/src/python/phenix_apps/apps/sceptre/templates/topserver.mako +++ b/src/python/phenix_apps/apps/sceptre/templates/topserver.mako @@ -157,6 +157,18 @@ Do { } Until (($qc.ProcessName -eq "opcquickclient") -or ($countDown -le -0)) Start-Sleep -s 10 +%if primary_opc==False: +# Close the Quick Client software +$qc | Send-Keys '%{F4}' +Do { + Start-Sleep -s 1 + $countDown-- + $close_win = Get-UIAWindow -Name "OPC Quick Client" | Get-UIAButton -n "No" +} Until ($close_win -or ($countDown -le -0)) +Start-Sleep -s 2 +$close_win | Invoke-UIAButtonClick | Out-Null +%endif + Echo 'Informing SCADA server that TOP Server configuration is complete...' % for scada_addr in scada_ips: % if scada_addr.split('.')[:-1] == opc_ip.split('.')[:-1]: