Skip to content

Commit 61e1df6

Browse files
authored
Merge pull request Azure#46 from zyxyoshine/fix
Update storage part of Fabric Admin and Compute Admin
2 parents 08a4dcd + 348668d commit 61e1df6

16 files changed

+284
-532
lines changed
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
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+
Create a disk migration job.
18+
.Description
19+
Create a disk migration job.
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.compute.admin/new-azsdiskmigrationjob
22+
.Inputs
23+
Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20180730Preview.IDisk[]
24+
.Outputs
25+
Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20180730Preview.IDiskMigrationJob
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+
DISKS <IDisk[]>: .
31+
[Location <String>]: Location of the resource.
32+
[DiskId <String>]: The disk id.
33+
[SharePath <String>]: The disk share path.
34+
[Status <DiskState?>]: The disk status.
35+
.Link
36+
https://docs.microsoft.com/en-us/powershell/module/azs.compute.admin/new-azsdiskmigrationjob
37+
#>
38+
function New-AzsDiskMigrationJob {
39+
[Alias('Start-AzsDiskMigrationJob')]
40+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20180730Preview.IDiskMigrationJob])]
41+
[CmdletBinding(DefaultParameterSetName='Volume', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
42+
param(
43+
[Parameter(Mandatory)]
44+
[Alias('MigrationId')]
45+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Path')]
46+
[System.String]
47+
# The migration job guid name.
48+
${Name},
49+
50+
[Parameter()]
51+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Path')]
52+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
53+
[System.String]
54+
# Location of the resource.
55+
${Location},
56+
57+
[Parameter()]
58+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Path')]
59+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
60+
[System.String]
61+
# Subscription credentials that uniquely identify Microsoft Azure subscription.
62+
# The subscription ID forms part of the URI for every service call.
63+
${SubscriptionId},
64+
65+
[Parameter(ParameterSetName='Volume', Mandatory)]
66+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Query')]
67+
[System.String]
68+
# The target scale unit name.
69+
${TargetScaleUnit},
70+
71+
[Parameter(ParameterSetName='Share', Mandatory)]
72+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Query')]
73+
[System.String]
74+
# The target share name.
75+
${TargetShare},
76+
77+
[Parameter(ParameterSetName='Volume', Mandatory)]
78+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Query')]
79+
[System.String]
80+
# The target volume label.
81+
${TargetVolumeLabel},
82+
83+
[Parameter(Mandatory, ValueFromPipeline)]
84+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Body')]
85+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20180730Preview.IDisk[]]
86+
# .
87+
# To construct, see NOTES section for DISKS properties and create a hash table.
88+
${Disks},
89+
90+
[Parameter()]
91+
[Alias('AzureRMContext', 'AzureCredential')]
92+
[ValidateNotNull()]
93+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Azure')]
94+
[System.Management.Automation.PSObject]
95+
# The credentials, account, tenant, and subscription used for communication with Azure.
96+
${DefaultProfile},
97+
98+
[Parameter(DontShow)]
99+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Runtime')]
100+
[System.Management.Automation.SwitchParameter]
101+
# Wait for .NET debugger to attach
102+
${Break},
103+
104+
[Parameter(DontShow)]
105+
[ValidateNotNull()]
106+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Runtime')]
107+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Runtime.SendAsyncStep[]]
108+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
109+
${HttpPipelineAppend},
110+
111+
[Parameter(DontShow)]
112+
[ValidateNotNull()]
113+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Runtime')]
114+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Runtime.SendAsyncStep[]]
115+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
116+
${HttpPipelinePrepend},
117+
118+
[Parameter(DontShow)]
119+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Runtime')]
120+
[System.Uri]
121+
# The URI for the proxy server to use
122+
${Proxy},
123+
124+
[Parameter(DontShow)]
125+
[ValidateNotNull()]
126+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Runtime')]
127+
[System.Management.Automation.PSCredential]
128+
# Credentials for a proxy server to use for the remote call
129+
${ProxyCredential},
130+
131+
[Parameter(DontShow)]
132+
[Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Category('Runtime')]
133+
[System.Management.Automation.SwitchParameter]
134+
# Use the default credentials for the proxy
135+
${ProxyUseDefaultCredentials}
136+
)
137+
138+
process {
139+
if ('Share' -eq $PsCmdlet.ParameterSetName)
140+
{
141+
Write-Warning "TargetShare parameter will be deprecated in a future release, please use Volume instead."
142+
}
143+
144+
Azs.Compute.Admin.internal\New-AzsDiskMigrationJob @PSBoundParameters
145+
}
146+
}

src/Azs.Compute.Admin/readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,5 +308,18 @@ directive:
308308
set:
309309
parameter-name: Name
310310

311+
# Remove CancelViaIdentity parameter set in Stop-AzsDiskMigrationJob
312+
- where:
313+
verb: Stop
314+
subject: DiskMigrationJob
315+
variant: CancelViaIdentity
316+
remove: true
317+
318+
# Hide the auto-generated New-AzsDiskMigrationJob and expose it through customized one
319+
- where:
320+
verb: New
321+
subject: DiskMigrationJob
322+
hide: true
323+
311324
subject-prefix: ''
312325
module-version: 0.0.1

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,23 @@ To create the parameters described below, construct a hash table containing the
1515
1616
INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
1717
[Drive <String>]: Name of the storage drive.
18+
[EdgeGateway <String>]: Name of the edge gateway.
19+
[EdgeGatewayPool <String>]: Name of the edge gateway pool.
20+
[FabricLocation <String>]: Fabric location.
1821
[FileShare <String>]: Fabric file share name.
22+
[IPPool <String>]: IP pool name.
1923
[Id <String>]: Resource identity path
24+
[InfraRole <String>]: Infrastructure role name.
25+
[InfraRoleInstance <String>]: Name of an infrastructure role instance.
2026
[Location <String>]: Location of the resource.
27+
[LogicalNetwork <String>]: Name of the logical network.
28+
[LogicalSubnet <String>]: Name of the logical subnet.
29+
[MacAddressPool <String>]: Name of the MAC address pool.
30+
[Operation <String>]: Operation identifier.
2131
[ResourceGroupName <String>]: Name of the resource group.
2232
[ScaleUnit <String>]: Name of the scale units.
33+
[ScaleUnitNode <String>]: Name of the scale unit node.
34+
[SlbMuxInstance <String>]: Name of a SLB MUX instance.
2335
[StorageSubSystem <String>]: Name of the storage system.
2436
[SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
2537
[Volume <String>]: Name of the storage volume.
@@ -47,7 +59,7 @@ param(
4759
[Parameter(ParameterSetName='Get')]
4860
[Parameter(ParameterSetName='List')]
4961
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
50-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Name)')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
5163
[System.String]
5264
# Name of the resource group.
5365
${ResourceGroupName},

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,23 @@ To create the parameters described below, construct a hash table containing the
1515
1616
INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
1717
[Drive <String>]: Name of the storage drive.
18+
[EdgeGateway <String>]: Name of the edge gateway.
19+
[EdgeGatewayPool <String>]: Name of the edge gateway pool.
20+
[FabricLocation <String>]: Fabric location.
1821
[FileShare <String>]: Fabric file share name.
22+
[IPPool <String>]: IP pool name.
1923
[Id <String>]: Resource identity path
24+
[InfraRole <String>]: Infrastructure role name.
25+
[InfraRoleInstance <String>]: Name of an infrastructure role instance.
2026
[Location <String>]: Location of the resource.
27+
[LogicalNetwork <String>]: Name of the logical network.
28+
[LogicalSubnet <String>]: Name of the logical subnet.
29+
[MacAddressPool <String>]: Name of the MAC address pool.
30+
[Operation <String>]: Operation identifier.
2131
[ResourceGroupName <String>]: Name of the resource group.
2232
[ScaleUnit <String>]: Name of the scale units.
33+
[ScaleUnitNode <String>]: Name of the scale unit node.
34+
[SlbMuxInstance <String>]: Name of a SLB MUX instance.
2335
[StorageSubSystem <String>]: Name of the storage system.
2436
[SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
2537
[Volume <String>]: Name of the storage volume.
@@ -47,7 +59,7 @@ param(
4759
[Parameter(ParameterSetName='Get')]
4860
[Parameter(ParameterSetName='List')]
4961
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
50-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Name)')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
5163
[System.String]
5264
# Name of the resource group.
5365
${ResourceGroupName},

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,23 @@ To create the parameters described below, construct a hash table containing the
1515
1616
INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
1717
[Drive <String>]: Name of the storage drive.
18+
[EdgeGateway <String>]: Name of the edge gateway.
19+
[EdgeGatewayPool <String>]: Name of the edge gateway pool.
20+
[FabricLocation <String>]: Fabric location.
1821
[FileShare <String>]: Fabric file share name.
22+
[IPPool <String>]: IP pool name.
1923
[Id <String>]: Resource identity path
24+
[InfraRole <String>]: Infrastructure role name.
25+
[InfraRoleInstance <String>]: Name of an infrastructure role instance.
2026
[Location <String>]: Location of the resource.
27+
[LogicalNetwork <String>]: Name of the logical network.
28+
[LogicalSubnet <String>]: Name of the logical subnet.
29+
[MacAddressPool <String>]: Name of the MAC address pool.
30+
[Operation <String>]: Operation identifier.
2131
[ResourceGroupName <String>]: Name of the resource group.
2232
[ScaleUnit <String>]: Name of the scale units.
33+
[ScaleUnitNode <String>]: Name of the scale unit node.
34+
[SlbMuxInstance <String>]: Name of a SLB MUX instance.
2335
[StorageSubSystem <String>]: Name of the storage system.
2436
[SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
2537
[Volume <String>]: Name of the storage volume.
@@ -47,7 +59,7 @@ param(
4759
[Parameter(ParameterSetName='Get')]
4860
[Parameter(ParameterSetName='List')]
4961
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
50-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Name)')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
5163
[System.String]
5264
# Name of the resource group.
5365
${ResourceGroupName},

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,23 @@ To create the parameters described below, construct a hash table containing the
1515
1616
INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
1717
[Drive <String>]: Name of the storage drive.
18+
[EdgeGateway <String>]: Name of the edge gateway.
19+
[EdgeGatewayPool <String>]: Name of the edge gateway pool.
20+
[FabricLocation <String>]: Fabric location.
1821
[FileShare <String>]: Fabric file share name.
22+
[IPPool <String>]: IP pool name.
1923
[Id <String>]: Resource identity path
24+
[InfraRole <String>]: Infrastructure role name.
25+
[InfraRoleInstance <String>]: Name of an infrastructure role instance.
2026
[Location <String>]: Location of the resource.
27+
[LogicalNetwork <String>]: Name of the logical network.
28+
[LogicalSubnet <String>]: Name of the logical subnet.
29+
[MacAddressPool <String>]: Name of the MAC address pool.
30+
[Operation <String>]: Operation identifier.
2131
[ResourceGroupName <String>]: Name of the resource group.
2232
[ScaleUnit <String>]: Name of the scale units.
33+
[ScaleUnitNode <String>]: Name of the scale unit node.
34+
[SlbMuxInstance <String>]: Name of a SLB MUX instance.
2335
[StorageSubSystem <String>]: Name of the storage system.
2436
[SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
2537
[Volume <String>]: Name of the storage volume.
@@ -47,7 +59,7 @@ param(
4759
[Parameter(ParameterSetName='Get')]
4860
[Parameter(ParameterSetName='List')]
4961
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')]
50-
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Name)')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
5163
[System.String]
5264
# Name of the resource group.
5365
${ResourceGroupName},

src/Azs.Fabric.Admin/docs/Get-AzsDrive.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Aliases:
111111

112112
Required: False
113113
Position: Named
114-
Default value: (Get-AzLocation)[0].Name
114+
Default value: (Get-AzLocation)[0].Location
115115
Accept pipeline input: False
116116
Accept wildcard characters: False
117117
Dynamic: False
@@ -159,7 +159,7 @@ Aliases:
159159

160160
Required: False
161161
Position: Named
162-
Default value: -join("System.",(Get-AzLocation)[0].Name)
162+
Default value: -join("System.",(Get-AzLocation)[0].Location)
163163
Accept pipeline input: False
164164
Accept wildcard characters: False
165165
Dynamic: False
@@ -266,11 +266,23 @@ To create the parameters described below, construct a hash table containing the
266266
267267
#### INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
268268
- `[Drive <String>]`: Name of the storage drive.
269+
- `[EdgeGateway <String>]`: Name of the edge gateway.
270+
- `[EdgeGatewayPool <String>]`: Name of the edge gateway pool.
271+
- `[FabricLocation <String>]`: Fabric location.
269272
- `[FileShare <String>]`: Fabric file share name.
273+
- `[IPPool <String>]`: IP pool name.
270274
- `[Id <String>]`: Resource identity path
275+
- `[InfraRole <String>]`: Infrastructure role name.
276+
- `[InfraRoleInstance <String>]`: Name of an infrastructure role instance.
271277
- `[Location <String>]`: Location of the resource.
278+
- `[LogicalNetwork <String>]`: Name of the logical network.
279+
- `[LogicalSubnet <String>]`: Name of the logical subnet.
280+
- `[MacAddressPool <String>]`: Name of the MAC address pool.
281+
- `[Operation <String>]`: Operation identifier.
272282
- `[ResourceGroupName <String>]`: Name of the resource group.
273283
- `[ScaleUnit <String>]`: Name of the scale units.
284+
- `[ScaleUnitNode <String>]`: Name of the scale unit node.
285+
- `[SlbMuxInstance <String>]`: Name of a SLB MUX instance.
274286
- `[StorageSubSystem <String>]`: Name of the storage system.
275287
- `[SubscriptionId <String>]`: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
276288
- `[Volume <String>]`: Name of the storage volume.

src/Azs.Fabric.Admin/docs/Get-AzsInfrastructureShare.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Aliases:
111111

112112
Required: False
113113
Position: Named
114-
Default value: (Get-AzLocation)[0].Name
114+
Default value: (Get-AzLocation)[0].Location
115115
Accept pipeline input: False
116116
Accept wildcard characters: False
117117
Dynamic: False
@@ -159,7 +159,7 @@ Aliases:
159159

160160
Required: False
161161
Position: Named
162-
Default value: -join("System.",(Get-AzLocation)[0].Name)
162+
Default value: -join("System.",(Get-AzLocation)[0].Location)
163163
Accept pipeline input: False
164164
Accept wildcard characters: False
165165
Dynamic: False
@@ -234,11 +234,23 @@ To create the parameters described below, construct a hash table containing the
234234
235235
#### INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter
236236
- `[Drive <String>]`: Name of the storage drive.
237+
- `[EdgeGateway <String>]`: Name of the edge gateway.
238+
- `[EdgeGatewayPool <String>]`: Name of the edge gateway pool.
239+
- `[FabricLocation <String>]`: Fabric location.
237240
- `[FileShare <String>]`: Fabric file share name.
241+
- `[IPPool <String>]`: IP pool name.
238242
- `[Id <String>]`: Resource identity path
243+
- `[InfraRole <String>]`: Infrastructure role name.
244+
- `[InfraRoleInstance <String>]`: Name of an infrastructure role instance.
239245
- `[Location <String>]`: Location of the resource.
246+
- `[LogicalNetwork <String>]`: Name of the logical network.
247+
- `[LogicalSubnet <String>]`: Name of the logical subnet.
248+
- `[MacAddressPool <String>]`: Name of the MAC address pool.
249+
- `[Operation <String>]`: Operation identifier.
240250
- `[ResourceGroupName <String>]`: Name of the resource group.
241251
- `[ScaleUnit <String>]`: Name of the scale units.
252+
- `[ScaleUnitNode <String>]`: Name of the scale unit node.
253+
- `[SlbMuxInstance <String>]`: Name of a SLB MUX instance.
242254
- `[StorageSubSystem <String>]`: Name of the storage system.
243255
- `[SubscriptionId <String>]`: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
244256
- `[Volume <String>]`: Name of the storage volume.

0 commit comments

Comments
 (0)