Skip to content

Commit f3417b3

Browse files
committed
Added missing object cmdlets
1 parent 2952e0b commit f3417b3

File tree

3 files changed

+98
-1
lines changed

3 files changed

+98
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ Licensed under the MIT License. See License.txt in the project root for license
8787
'Get-AzsStoragePool', 'Suspend-AzsInfrastructureRoleInstance',
8888
'Start-AzsScaleUnitNode', 'Get-AzsInfrastructureRoleInstance',
8989
'Repair-AzsScaleUnitNode', 'Stop-AzsInfrastructureRoleInstance',
90-
'Stop-AzsScaleUnitNode', 'Add-AzsScaleUnitNode'
90+
'Stop-AzsScaleUnitNode', 'Add-AzsScaleUnitNode',
91+
'New-ScaleOutScaleUnitParametersObject', 'New-ScaleOutScaleUnitParametersListObject'
9192

9293
# 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.
9394
CmdletsToExport = @()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<#
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the MIT License. See License.txt in the project root for license information.
4+
#>
5+
6+
<#
7+
.SYNOPSIS
8+
A list of input data that allows for adding a set of scale unit nodes.
9+
10+
.DESCRIPTION
11+
A list of input data that allows for adding a set of scale unit nodes.
12+
13+
.PARAMETER NodeList
14+
The list of nodes.
15+
16+
.PARAMETER AwaitStorageConvergence
17+
The list of nodes.
18+
19+
#>
20+
function New-ScaleOutScaleUnitParametersListObject
21+
{
22+
param(
23+
[Parameter(Mandatory = $false)]
24+
[Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParameters[]]
25+
$NodeList,
26+
27+
[Parameter(Mandatory = $false)]
28+
[switch]
29+
$AwaitStorageConvergence
30+
)
31+
32+
$Object = New-Object -TypeName Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParametersList
33+
34+
$PSBoundParameters.GetEnumerator() | ForEach-Object {
35+
if(Get-Member -InputObject $Object -Name $_.Key -MemberType Property)
36+
{
37+
$Object.$($_.Key) = $_.Value
38+
}
39+
}
40+
41+
if(Get-Member -InputObject $Object -Name Validate -MemberType Method)
42+
{
43+
$Object.Validate()
44+
}
45+
46+
return $Object
47+
}
48+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<#
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the MIT License. See License.txt in the project root for license information.
4+
#>
5+
6+
<#
7+
.SYNOPSIS
8+
Input data that allows for adding a scale unit node.
9+
10+
.DESCRIPTION
11+
Input data that allows for adding a scale unit node.
12+
13+
.PARAMETER BMCIPv4Address
14+
Bmc address of the physical machine.
15+
16+
.PARAMETER ComputerName
17+
Computer name of the physical machine.
18+
19+
#>
20+
function New-ScaleOutScaleUnitParametersObject
21+
{
22+
param(
23+
[Parameter(Mandatory = $false)]
24+
[string]
25+
$BMCIPv4Address,
26+
27+
[Parameter(Mandatory = $false)]
28+
[string]
29+
$ComputerName
30+
)
31+
32+
$Object = New-Object -TypeName Microsoft.AzureStack.Management.Fabric.Admin.Models.ScaleOutScaleUnitParameters
33+
34+
$PSBoundParameters.GetEnumerator() | ForEach-Object {
35+
if(Get-Member -InputObject $Object -Name $_.Key -MemberType Property)
36+
{
37+
$Object.$($_.Key) = $_.Value
38+
}
39+
}
40+
41+
if(Get-Member -InputObject $Object -Name Validate -MemberType Method)
42+
{
43+
$Object.Validate()
44+
}
45+
46+
return $Object
47+
}
48+

0 commit comments

Comments
 (0)