# # Name: Wait for acquisition of an OCUM 6X Data Source # Version: 1.0.0 # From: NetApp Inc. # Min WFA version needed: WFA2.2 # Copyright (C) 2015 NetApp, Inc. All rights reserved. # # Email: sinhaa@netapp.com $cd = Get-WfaCredentials -Host "localhost" if(!$cd) { throw ("Credentials for localhost not found") } $jobUri = Get-WfaWorkflowParameter -Name jobUrl $status = Invoke-RestMethod -Uri $jobUri -Method Get -Credential $cd -ContentType "application/xml" $jobStatus = $status.acquisitionJob.jobStatus.status if($jobStatus -eq "FAILED") { throw ("Failed to acquire Datasource : " + $status.acquisitionJob.jobStatus.errorMessage) } if($jobStatus -eq "COMPLETED") { Get-WfaLogger -Info -Message "OCUM DataSource Acquistion job is COMPLETED" Set-WfaCommandProgress -Total 1 -Current 1 -ProgressPercentage 100 } else { Get-WfaLogger -Info -Message $jobStatus Set-WfaCommandProgress -Total 1 -Current 0 -ProgressPercentage 0 }