Skip to content

Commit 1355933

Browse files
authored
Merge pull request #6805 from deathly809/preview
[Azure Stack] Fix to match documentation
2 parents 3b37a63 + 4de7d20 commit 1355933

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Azs.Fabric.Admin.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Licensed under the MIT License. See License.txt in the project root for license
8888
'Start-AzsScaleUnitNode', 'Get-AzsInfrastructureRoleInstance',
8989
'Repair-AzsScaleUnitNode', 'Stop-AzsInfrastructureRoleInstance',
9090
'Stop-AzsScaleUnitNode', 'Add-AzsScaleUnitNode',
91-
'New-ScaleOutScaleUnitParametersObject', 'New-ScaleOutScaleUnitParametersListObject'
91+
'New-AzsScaleUnitNodeObject'
9292

9393
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
9494
CmdletsToExport = @()
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ Licensed under the MIT License. See License.txt in the project root for license
1717
Computer name of the physical machine.
1818
1919
#>
20-
function New-ScaleOutScaleUnitParametersObject
20+
function New-AzsScaleUnitNodeObject
2121
{
22-
param(
22+
param(
2323
[Parameter(Mandatory = $false)]
2424
[string]
2525
$BMCIPv4Address,
26-
26+
2727
[Parameter(Mandatory = $false)]
2828
[string]
2929
$ComputerName
3030
)
31-
31+
3232
$Object = New-Object -TypeName Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParameters
3333

34-
$PSBoundParameters.GetEnumerator() | ForEach-Object {
34+
$PSBoundParameters.GetEnumerator() | ForEach-Object {
3535
if(Get-Member -InputObject $Object -Name $_.Key -MemberType Property)
3636
{
3737
$Object.$($_.Key) = $_.Value

src/StackAdmin/Azs.Fabric.Admin/Module/Azs.Fabric.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Add-AzsScaleUnitNode.ps1

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the MIT License. See License.txt in the project root for license
55

66
<#
77
.SYNOPSIS
8-
8+
99
1010
.DESCRIPTION
1111
Scale out a scale unit.
@@ -26,29 +26,33 @@ Licensed under the MIT License. See License.txt in the project root for license
2626
function Add-AzsScaleUnitNode
2727
{
2828
[CmdletBinding(DefaultParameterSetName='ScaleUnits_ScaleOut')]
29-
param(
29+
param(
3030
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
31-
[Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParametersList]
31+
[Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParameters[]]
3232
$NodeList,
33-
33+
3434
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
3535
[System.String]
3636
$ResourceGroupName,
37-
37+
3838
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
3939
[System.String]
4040
$ScaleUnit,
41-
41+
4242
[Parameter(Mandatory = $true, ParameterSetName = 'ScaleUnits_ScaleOut')]
4343
[System.String]
4444
$Location,
4545

46+
[Parameter(Mandatory = $false)]
47+
[switch]
48+
$AwaitStorageConvergence,
49+
4650
[Parameter(Mandatory = $false)]
4751
[switch]
4852
$AsJob
4953
)
5054

51-
Begin
55+
Begin
5256
{
5357
Initialize-PSSwaggerDependencies -Azure
5458
$tracerObject = $null
@@ -61,7 +65,7 @@ function Add-AzsScaleUnitNode
6165
}
6266

6367
Process {
64-
68+
6569
$ErrorActionPreference = 'Stop'
6670

6771
$NewServiceClient_params = @{
@@ -70,18 +74,20 @@ function Add-AzsScaleUnitNode
7074

7175
$GlobalParameterHashtable = @{}
7276
$NewServiceClient_params['GlobalParameterHashtable'] = $GlobalParameterHashtable
73-
77+
7478
$GlobalParameterHashtable['SubscriptionId'] = $null
7579
if($PSBoundParameters.ContainsKey('SubscriptionId')) {
7680
$GlobalParameterHashtable['SubscriptionId'] = $PSBoundParameters['SubscriptionId']
7781
}
7882

7983
$FabricAdminClient = New-ServiceClient @NewServiceClient_params
8084

85+
$ParamList = New-ScaleOutScaleUnitParametersListObject -NodeList $NodeList -AwaitStorageConvergence $AwaitStorageConvergence:IsPresent
86+
8187

8288
if ('ScaleUnits_ScaleOut' -eq $PsCmdlet.ParameterSetName) {
8389
Write-Verbose -Message 'Performing operation ScaleOutWithHttpMessagesAsync on $FabricAdminClient.'
84-
$TaskResult = $FabricAdminClient.ScaleUnits.ScaleOutWithHttpMessagesAsync($ResourceGroupName, $Location, $ScaleUnit, $NodeList)
90+
$TaskResult = $FabricAdminClient.ScaleUnits.ScaleOutWithHttpMessagesAsync($ResourceGroupName, $Location, $ScaleUnit, $ParamList)
8591
} else {
8692
Write-Verbose -Message 'Failed to map parameter set to operation method.'
8793
throw 'Module failed to find operation to execute.'
@@ -91,7 +97,7 @@ function Add-AzsScaleUnitNode
9197

9298
$PSSwaggerJobScriptBlock = {
9399
[CmdletBinding()]
94-
param(
100+
param(
95101
[Parameter(Mandatory = $true)]
96102
[System.Threading.Tasks.Task]
97103
$TaskResult,
@@ -105,9 +111,9 @@ function Add-AzsScaleUnitNode
105111
$GetTaskResult_params = @{
106112
TaskResult = $TaskResult
107113
}
108-
114+
109115
Get-TaskResult @GetTaskResult_params
110-
116+
111117
}
112118
}
113119

0 commit comments

Comments
 (0)