Rename FailoverTest functions to start and stop

This commit is contained in:
Wes Carroll
2019-03-01 13:08:59 -05:00
parent 3568ac49a3
commit 64d7de78d0
2 changed files with 2 additions and 2 deletions
@@ -0,0 +1,35 @@
function Stop-ZertoFailoverTest {
[cmdletbinding()]
param(
[Parameter(
HelpMessage = "Name(s) of VPG(s) to stop testing.",
Mandatory = $true
)]
[string[]]$vpgName,
[Parameter(
HelpMessage = "Was the test successful? True or False. True is Default."
)]
[bool]$failoverTestSuccess = $true,
[Parameter(
HelpMessage = "Free text field for any notes to add to the test report."
)]
[string]$failoverTestSummary = "Stop Failover Test for $vpgName"
)
begin {
$baseUri = "vpgs"
$body = @{"FailoverTestSuccess" = $failoverTestSuccess; "FailoverTestSummary" = $failoverTestSummary}
}
process {
foreach ($name in $vpgName) {
$vpgId = $(Get-ZertoVpg -name $name).vpgIdentifier
$uri = "{0}/{1}/FailoverTestStop" -f $baseUri, $vpgId
Invoke-ZertoRestRequest -uri $uri -method "POST" -body $($body | ConvertTo-Json)
}
}
end {
#Nothing to do
}
}