Skip to content

Commit 2443a8b

Browse files
authored
Merge pull request Azure#44 from LingyunSu/dev
Fabric.Admin update
2 parents 36607df + 5476801 commit 2443a8b

21 files changed

+2383
-545
lines changed

src/Azs.Fabric.Admin/custom/Disable-AzsScaleUnitNode.ps1

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# ----------------------------------------------------------------------------------
1515
<#
1616
.Synopsis
17-
Start maintenance mode for a scale unit node.
17+
Stop maintenance mode for a scale unit node.
1818
.Description
19-
Start maintenance mode for a scale unit node.
19+
Stop maintenance mode for a scale unit node.
2020
.Example
2121
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/disable-azsscaleunitnode
2222
.Inputs
@@ -55,37 +55,37 @@ https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/disable-azss
5555
#>
5656
function Disable-AzsScaleUnitNode {
5757
[OutputType([System.Boolean])]
58-
[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
58+
[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5959
param(
60-
[Parameter(ParameterSetName='Disable')]
60+
[Parameter(ParameterSetName='Stop')]
6161
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
6262
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
6363
[System.String]
6464
# Location of the resource.
6565
${Location},
6666

67-
[Parameter(ParameterSetName='Disable', Mandatory)]
67+
[Parameter(ParameterSetName='Stop', Mandatory)]
6868
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
6969
[System.String]
7070
# Name of the scale unit node.
7171
${Name},
7272

73-
[Parameter(ParameterSetName='Disable')]
73+
[Parameter(ParameterSetName='Stop')]
7474
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
7575
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
7676
[System.String]
7777
# Name of the resource group.
7878
${ResourceGroupName},
7979

80-
[Parameter(ParameterSetName='Disable')]
80+
[Parameter(ParameterSetName='Stop')]
8181
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
8282
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
8383
[System.String]
8484
# Subscription credentials that uniquely identify Microsoft Azure subscription.
8585
# The subscription ID forms part of the URI for every service call.
8686
${SubscriptionId},
8787

88-
[Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)]
88+
[Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)]
8989
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
9090
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity]
9191
# Identity Parameter
@@ -158,7 +158,6 @@ param(
158158
${ProxyUseDefaultCredentials}
159159
)
160160

161-
162161
process {
163162
# Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here
164163
if ($PSBoundParameters.ContainsKey(('Name')))

src/Azs.Fabric.Admin/custom/Enable-AzsScaleUnitNode.ps1

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# ----------------------------------------------------------------------------------
1515
<#
1616
.Synopsis
17-
Stop maintenance mode for a scale unit node.
17+
Start maintenance mode for a scale unit node.
1818
.Description
19-
Stop maintenance mode for a scale unit node.
19+
Start maintenance mode for a scale unit node.
2020
.Example
2121
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/enable-azsscaleunitnode
2222
.Inputs
@@ -55,37 +55,37 @@ https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/enable-azssc
5555
#>
5656
function Enable-AzsScaleUnitNode {
5757
[OutputType([System.Boolean])]
58-
[CmdletBinding(DefaultParameterSetName='Enable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
58+
[CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5959
param(
60-
[Parameter(ParameterSetName='Enable')]
60+
[Parameter(ParameterSetName='Start')]
6161
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
6262
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
6363
[System.String]
6464
# Location of the resource.
6565
${Location},
6666

67-
[Parameter(ParameterSetName='Enable', Mandatory)]
67+
[Parameter(ParameterSetName='Start', Mandatory)]
6868
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
6969
[System.String]
7070
# Name of the scale unit node.
7171
${Name},
7272

73-
[Parameter(ParameterSetName='Enable')]
73+
[Parameter(ParameterSetName='Start')]
7474
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
7575
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
7676
[System.String]
7777
# Name of the resource group.
7878
${ResourceGroupName},
7979

80-
[Parameter(ParameterSetName='Enable')]
80+
[Parameter(ParameterSetName='Start')]
8181
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
8282
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
8383
[System.String]
8484
# Subscription credentials that uniquely identify Microsoft Azure subscription.
8585
# The subscription ID forms part of the URI for every service call.
8686
${SubscriptionId},
8787

88-
[Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)]
88+
[Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)]
8989
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
9090
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity]
9191
# Identity Parameter
@@ -158,7 +158,6 @@ param(
158158
${ProxyUseDefaultCredentials}
159159
)
160160

161-
162161
process {
163162
# Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here
164163
if ($PSBoundParameters.ContainsKey(('Name')))
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
#
4+
# Copyright Microsoft Corporation
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ----------------------------------------------------------------------------------
15+
<#
16+
.Synopsis
17+
Return the requested IP pool.
18+
.Description
19+
Return the requested IP pool.
20+
.Example
21+
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/get-azsippool
22+
.Inputs
23+
Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity
24+
.Outputs
25+
Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.Api20160501.IIPPool
26+
.Notes
27+
COMPLEX PARAMETER PROPERTIES
28+
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
29+
30+
INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
31+
[Drive <String>]: Name of the storage drive.
32+
[EdgeGateway <String>]: Name of the edge gateway.
33+
[EdgeGatewayPool <String>]: Name of the edge gateway pool.
34+
[FabricLocation <String>]: Fabric location.
35+
[FileShare <String>]: Fabric file share name.
36+
[IPPool <String>]: IP pool name.
37+
[Id <String>]: Resource identity path
38+
[InfraRole <String>]: Infrastructure role name.
39+
[InfraRoleInstance <String>]: Name of an infrastructure role instance.
40+
[Location <String>]: Location of the resource.
41+
[LogicalNetwork <String>]: Name of the logical network.
42+
[LogicalSubnet <String>]: Name of the logical subnet.
43+
[MacAddressPool <String>]: Name of the MAC address pool.
44+
[Operation <String>]: Operation identifier.
45+
[ResourceGroupName <String>]: Name of the resource group.
46+
[ScaleUnit <String>]: Name of the scale units.
47+
[ScaleUnitNode <String>]: Name of the scale unit node.
48+
[SlbMuxInstance <String>]: Name of a SLB MUX instance.
49+
[StoragePool <String>]: Storage pool name.
50+
[StorageSubSystem <String>]: Name of the storage system.
51+
[SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
52+
[Volume <String>]: Name of the storage volume.
53+
.Link
54+
https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/get-azsippool
55+
#>
56+
function Get-AzsIPPool {
57+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.Api20160501.IIPPool])]
58+
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
59+
param(
60+
[Parameter(ParameterSetName='Get')]
61+
[Parameter(ParameterSetName='List')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
63+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
64+
[System.String]
65+
# Location of the resource.
66+
${Location},
67+
68+
[Parameter(ParameterSetName='Get', Mandatory)]
69+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
70+
[System.String]
71+
# IP pool name.
72+
${Name},
73+
74+
[Parameter(ParameterSetName='Get')]
75+
[Parameter(ParameterSetName='List')]
76+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
77+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
78+
[System.String]
79+
# Name of the resource group.
80+
${ResourceGroupName},
81+
82+
[Parameter(ParameterSetName='Get')]
83+
[Parameter(ParameterSetName='List')]
84+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
85+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
86+
[System.String[]]
87+
# Subscription credentials that uniquely identify Microsoft Azure subscription.
88+
# The subscription ID forms part of the URI for every service call.
89+
${SubscriptionId},
90+
91+
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
92+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
93+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity]
94+
# Identity Parameter
95+
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
96+
${InputObject},
97+
98+
[Parameter(ParameterSetName='List')]
99+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Query')]
100+
[System.String]
101+
# OData filter parameter.
102+
${Filter},
103+
104+
[Parameter()]
105+
[Alias('AzureRMContext', 'AzureCredential')]
106+
[ValidateNotNull()]
107+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Azure')]
108+
[System.Management.Automation.PSObject]
109+
# The credentials, account, tenant, and subscription used for communication with Azure.
110+
${DefaultProfile},
111+
112+
[Parameter(DontShow)]
113+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
114+
[System.Management.Automation.SwitchParameter]
115+
# Wait for .NET debugger to attach
116+
${Break},
117+
118+
[Parameter(DontShow)]
119+
[ValidateNotNull()]
120+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
121+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.SendAsyncStep[]]
122+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
123+
${HttpPipelineAppend},
124+
125+
[Parameter(DontShow)]
126+
[ValidateNotNull()]
127+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
128+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.SendAsyncStep[]]
129+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
130+
${HttpPipelinePrepend},
131+
132+
[Parameter()]
133+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
134+
[System.Management.Automation.SwitchParameter]
135+
# Returns true when the command succeeds
136+
${PassThru},
137+
138+
[Parameter(DontShow)]
139+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
140+
[System.Uri]
141+
# The URI for the proxy server to use
142+
${Proxy},
143+
144+
[Parameter(DontShow)]
145+
[ValidateNotNull()]
146+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
147+
[System.Management.Automation.PSCredential]
148+
# Credentials for a proxy server to use for the remote call
149+
${ProxyCredential},
150+
151+
[Parameter(DontShow)]
152+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')]
153+
[System.Management.Automation.SwitchParameter]
154+
# Use the default credentials for the proxy
155+
${ProxyUseDefaultCredentials}
156+
)
157+
158+
process {
159+
# Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here
160+
if ($PSBoundParameters.ContainsKey(('Name')))
161+
{
162+
if ($null -ne $Name -and $Name.Contains('/'))
163+
{
164+
$PSBoundParameters['Name'] = $Name.Split("/")[-1]
165+
}
166+
}
167+
168+
Azs.Fabric.Admin.internal\Get-AzsIPPool @PSBoundParameters
169+
}
170+
}

src/Azs.Fabric.Admin/custom/Get-AzsInfrastructureRoleInstance.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ function Get-AzsInfrastructureRoleInstance {
5757
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.Api20160501.IInfraRoleInstance])]
5858
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
5959
param(
60-
[Parameter(ParameterSetName='Get', Mandatory)]
61-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
62-
[System.String]
63-
# Name of an infrastructure role instance.
64-
${Name},
65-
6660
[Parameter(ParameterSetName='Get')]
6761
[Parameter(ParameterSetName='List')]
6862
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
@@ -71,6 +65,12 @@ param(
7165
# Location of the resource.
7266
${Location},
7367

68+
[Parameter(ParameterSetName='Get', Mandatory)]
69+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
70+
[System.String]
71+
# Name of an infrastructure role instance.
72+
${Name},
73+
7474
[Parameter(ParameterSetName='Get')]
7575
[Parameter(ParameterSetName='List')]
7676
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]

src/Azs.Fabric.Admin/custom/Repair-AzsScaleUnitNode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ param(
7272
[Parameter(ParameterSetName='Repair')]
7373
[Parameter(ParameterSetName='RepairExpanded')]
7474
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
75-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Name')]
75+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
7676
[System.String]
7777
# Location of the resource.
7878
${Location},

src/Azs.Fabric.Admin/custom/Restart-AzsInfrastructureRoleInstance.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ function Restart-AzsInfrastructureRoleInstance {
5757
[OutputType([System.Boolean])]
5858
[CmdletBinding(DefaultParameterSetName='Reboot', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5959
param(
60-
[Parameter(ParameterSetName='Reboot', Mandatory)]
61-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
62-
[System.String]
63-
# Name of an infrastructure role instance.
64-
${Name},
65-
6660
[Parameter(ParameterSetName='Reboot')]
6761
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
6862
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
6963
[System.String]
7064
# Location of the resource.
7165
${Location},
7266

67+
[Parameter(ParameterSetName='Reboot', Mandatory)]
68+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
69+
[System.String]
70+
# Name of an infrastructure role instance.
71+
${Name},
72+
7373
[Parameter(ParameterSetName='Reboot')]
7474
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
7575
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]

src/Azs.Fabric.Admin/custom/Start-AzsInfrastructureRoleInstance.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ function Start-AzsInfrastructureRoleInstance {
5757
[OutputType([System.Boolean])]
5858
[CmdletBinding(DefaultParameterSetName='PowerOn', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5959
param(
60-
[Parameter(ParameterSetName='PowerOn', Mandatory)]
61-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
62-
[System.String]
63-
# Name of an infrastructure role instance.
64-
${Name},
65-
6660
[Parameter(ParameterSetName='PowerOn')]
6761
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
6862
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
6963
[System.String]
7064
# Location of the resource.
7165
${Location},
7266

67+
[Parameter(ParameterSetName='PowerOn', Mandatory)]
68+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
69+
[System.String]
70+
# Name of an infrastructure role instance.
71+
${Name},
72+
7373
[Parameter(ParameterSetName='PowerOn')]
7474
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
7575
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]

src/Azs.Fabric.Admin/custom/Start-AzsScaleUnitNode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function Start-AzsScaleUnitNode {
5959
param(
6060
[Parameter(ParameterSetName='PowerOn')]
6161
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
62-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Name')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
6363
[System.String]
6464
# Location of the resource.
6565
${Location},

0 commit comments

Comments
 (0)