From 6c2b029014de54b9baa6cfadd459e10cdeb30b45 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Tue, 5 May 2020 13:47:19 -0400 Subject: [PATCH] Update Parameter Name to work with filter --- Tests/Public/Get-ZertoEvent.Tests.ps1 | 4 ++-- ZertoApiWrapper/Public/Get-ZertoEvent.ps1 | 6 +++--- docs/Get-ZertoEvent.md | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Tests/Public/Get-ZertoEvent.Tests.ps1 b/Tests/Public/Get-ZertoEvent.Tests.ps1 index 5a418e8..b35a69f 100644 --- a/Tests/Public/Get-ZertoEvent.Tests.ps1 +++ b/Tests/Public/Get-ZertoEvent.Tests.ps1 @@ -1,6 +1,6 @@ #Requires -Modules Pester $global:here = (Split-Path -Parent $PSCommandPath) -$global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0] +$global:function = ((Split-Path -Leaf $PSCommandPath).Split('.'))[0] Describe $global:function -Tag 'Unit', 'Source', 'Built' { @@ -12,7 +12,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { $ParameterTestCases = @( @{ParameterName = 'startDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } @{ParameterName = 'endDate'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } - @{ParameterName = 'vpg'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } + @{ParameterName = 'vpgName'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } @{ParameterName = 'vpgIdentifier'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } @{ParameterName = 'eventType'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } @{ParameterName = 'siteName'; Type = 'String'; Mandatory = $false; Validation = 'NotNullOrEmpty' } diff --git a/ZertoApiWrapper/Public/Get-ZertoEvent.ps1 b/ZertoApiWrapper/Public/Get-ZertoEvent.ps1 index 76584f6..1dbec44 100644 --- a/ZertoApiWrapper/Public/Get-ZertoEvent.ps1 +++ b/ZertoApiWrapper/Public/Get-ZertoEvent.ps1 @@ -19,8 +19,8 @@ function Get-ZertoEvent { HelpMessage = "The name of the VPG for which you want to return events." )] [ValidateNotNullOrEmpty()] - [Alias("vpgName")] - [string]$vpg, + [Alias("vpg")] + [string]$vpgName, [Parameter( ParameterSetName = "filter", HelpMessage = "The identifier of the VPG for which you want to return events." @@ -69,7 +69,7 @@ function Get-ZertoEvent { ParameterSetName = "filter", HelpMessage = "The type of event to return. This filter behaves in the same way as the eventCategory filter. Possible Values are: Possible Values are: 'All', 'Events', 'Alerts'" )] - [ValidateSet('All','Events','Alerts')] + [ValidateSet('All', 'Events', 'Alerts')] [string]$category, [Parameter( ParameterSetName = "filter", diff --git a/docs/Get-ZertoEvent.md b/docs/Get-ZertoEvent.md index 79b37d7..53d4589 100644 --- a/docs/Get-ZertoEvent.md +++ b/docs/Get-ZertoEvent.md @@ -19,7 +19,7 @@ Get-ZertoEvent [] ### filter ``` -Get-ZertoEvent [-startDate ] [-endDate ] [-vpg ] [-vpgIdentifier ] +Get-ZertoEvent [-startDate ] [-endDate ] [-vpgName ] [-vpgIdentifier ] [-eventType ] [-siteName ] [-siteIdentifier ] [-zorgIdentifier ] [-entityType ] [-userName ] [-category ] [-eventCategory ] [-alertIdentifier ] [] @@ -292,13 +292,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -vpg -The name of the VPG for which you want to return events. +### -vpgIdentifier +The identifier of the VPG for which you want to return events. ```yaml Type: String Parameter Sets: filter -Aliases: vpgName +Aliases: vpgId Required: False Position: Named @@ -307,13 +307,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -vpgIdentifier -The identifier of the VPG for which you want to return events. +### -vpgName +The name of the VPG for which you want to return events. ```yaml Type: String Parameter Sets: filter -Aliases: vpgId +Aliases: vpg Required: False Position: Named