From 55b6614a69026496af69975d50c1f220bfcc76d4 Mon Sep 17 00:00:00 2001 From: Mitchell Enfinger Date: Wed, 16 Feb 2022 13:51:46 -0500 Subject: [PATCH 1/2] added lines for multiple CPUs --- ZertoApiWrapper/Public/Install-ZertoVra.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ZertoApiWrapper/Public/Install-ZertoVra.ps1 b/ZertoApiWrapper/Public/Install-ZertoVra.ps1 index 3ce61d2..eb76faa 100644 --- a/ZertoApiWrapper/Public/Install-ZertoVra.ps1 +++ b/ZertoApiWrapper/Public/Install-ZertoVra.ps1 @@ -25,6 +25,11 @@ function Install-ZertoVra { )] [ValidateRange(1, 16)] [int]$memoryInGB = 3, + [Parameter( + HelpMessage = "Initial number of CPUs to assign to the VRA. Default is 1, Minimum is 1, Maximum is 4" + )] + [ValidateRange(1, 4)] + [int]$NumOfCpus = 1, [Parameter( HelpMessage = "Bandwidth group to assign to the VRA. If unspecified will assign to the 'default_group'" )] @@ -136,6 +141,7 @@ function Install-ZertoVra { } $vraBasic['HostIdentifier'] = $hostIdentifier.toString() $vraBasic['MemoryInGB'] = $memoryInGB + $vraBasic['NumOfCpus'] = $NumOfCpus $vraBasic['NetworkIdentifier'] = $networkIdentifier.toString() $vraBasic['UsePublicKeyInsteadOfCredentials'] = $true $vraBasicNetwork = [ordered]@{ } From 4b1506f962aac6285116d376ec8eb5c2e023bca5 Mon Sep 17 00:00:00 2001 From: Mitchell Enfinger Date: Wed, 16 Feb 2022 14:23:38 -0500 Subject: [PATCH 2/2] forgot to include the test changes --- Tests/Public/Install-ZertoVra.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Public/Install-ZertoVra.Tests.ps1 b/Tests/Public/Install-ZertoVra.Tests.ps1 index a5005d3..221000f 100644 --- a/Tests/Public/Install-ZertoVra.Tests.ps1 +++ b/Tests/Public/Install-ZertoVra.Tests.ps1 @@ -6,7 +6,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' { Context "$global:function::Parameter Unit Tests" { It "$global:function should have exactly 24 parameters defined" { - (Get-Command $global:function).Parameters.Count | Should -Be 24 + (Get-Command $global:function).Parameters.Count | Should -Be 25 } $ParameterTestCases = @(