Skip to content

Commit 5650367

Browse files
committed
misc fix
1 parent 7f97411 commit 5650367

13 files changed

+100
-125
lines changed

src/ResourceManager/RecoveryServices.SiteRecovery/AzureRM.RecoveryServices.SiteRecovery.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 9/21/2017
6+
# Generated on: 10/11/2017
77
#
88

99
@{
@@ -231,7 +231,7 @@ PrivateData = @{
231231
Tags = 'Azure','ResourceManager','ARM','SiteRecovery'
232232

233233
# A URL to the license for this module.
234-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
234+
LicenseUri = 'https://aka.ms/azps-license'
235235

236236
# A URL to the main website for this project.
237237
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.Test/ScenarioTests/Common/AsrTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ function Test-NotificationSettings
254254
# Import Azure RecoveryServices Vault Settings File
255255
Import-AzureRmRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
256256
# Enumerate specific Fabric
257-
$NotificationSettings = Set-AzureRmRecoveryServicesAsrNotificationSetting -EnableEmailSubscriptionOwners -CustomEmailAddress "[email protected]"
257+
$NotificationSettings = Set-AzureRmRecoveryServicesAsrNotificationSetting -EnableEmailSubscriptionOwner -CustomEmailAddress "[email protected]"
258258
Assert-NotNull($NotificationSettings)
259259

260-
$NotificationSettings = Set-AzureRmRecoveryServicesAsrNotificationSetting -DisableEmailToSubscriptionOwners -CustomEmailAddress "[email protected]"
260+
$NotificationSettings = Set-AzureRmRecoveryServicesAsrNotificationSetting -DisableEmailToSubscriptionOwner -CustomEmailAddress "[email protected]"
261261
Assert-NotNull($NotificationSettings)
262262

263263
$NotificationSettings = Get-AzureRmRecoveryServicesAsrNotificationSetting

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery.Test/ScenarioTests/V2A/AsrV2ATests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ function Test-RPJobReverse
355355

356356
#$job = Start-AzureRmRecoveryServicesAsrTestFailoverJob -RecoveryPlan $RP -Direction RecoveryToPrimary -AzureVMNetworkId $rpi[0].SelectedRecoveryAzureNetworkId
357357
#WaitForJobCompletion -JobId $Job.Name
358-
#$cleanupJob = Start-AzureRmRecoveryServicesAsrTestFailoverCleanupJob -RecoveryPlan $RP -Comments "testing done"
358+
#$cleanupJob = Start-AzureRmRecoveryServicesAsrTestFailoverCleanupJob -RecoveryPlan $RP -Comment "testing done"
359359
#WaitForJobCompletion -JobId $cleanupJob.Name
360360

361361
$foJob = Start-AzureRmRecoveryServicesAsrUnPlannedFailoverJob -RecoveryPlan $RP -Direction RecoveryToPrimary
@@ -459,7 +459,7 @@ function V2ATestFailoverJob
459459

460460
WaitForJobCompletion -JobId $tfoJob.Name
461461

462-
$cleanupJob = Start-AzureRmRecoveryServicesAsrTestFailoverCleanupJob -ReplicationProtectedItem $rpi -Comments "testing done"
462+
$cleanupJob = Start-AzureRmRecoveryServicesAsrTestFailoverCleanupJob -ReplicationProtectedItem $rpi -Comment "testing done"
463463
WaitForJobCompletion -JobId $cleanupJob.Name
464464
}
465465

@@ -557,7 +557,7 @@ function Test-SetRPI
557557
$pc = Get-ASRProtectionContainer -FriendlyName $pcName -Fabric $fabric
558558
$rpi = get-AzureRmRecoveryServicesAsrReplicationProtectedItem -ProtectionContainer $pc -Name "-RPI"
559559
Set-AzureRmRecoveryServicesAsrReplicationProtectedItem -InputObject $rpi -Name "VSPS212" -PrimaryNic $rpi.nicDetailsList[0].nicId -RecoveryNetworkId `
560-
$AzureVmNetworkId -RecoveryNicStaticIPAddress "10.151.128.205" -RecoveryNicSubnetName "Subnet-2" -UseManagedDisks $true
560+
$AzureVmNetworkId -RecoveryNicStaticIPAddress "10.151.128.205" -RecoveryNicSubnetName "Subnet-2" -UseManagedDisk "True"
561561

562562
}
563563

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/AlertSetting/SetAzureRmRecoveryServicesAsrAlertSetting.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public class SetAzureRmRecoveryServicesAsrAlertSetting : SiteRecoveryCmdletBase
3939
/// Gets or sets EmailSubscriptionOwner .Mail to subscription owner.
4040
/// </summary>
4141
[Parameter(ParameterSetName = ASRParameterSets.EmailToSubscriptionOwner, Mandatory = true)]
42-
public SwitchParameter EnableEmailSubscriptionOwners { get; set; }
42+
public SwitchParameter EnableEmailSubscriptionOwner { get; set; }
4343

4444
[Parameter(ParameterSetName = ASRParameterSets.DisableEmailToSubcriptionOwner, Mandatory = true)]
45-
public SwitchParameter DisableEmailToSubscriptionOwners { get; set; }
45+
public SwitchParameter DisableEmailToSubscriptionOwner { get; set; }
4646

4747
/// <summary>
4848
/// Gets or sets the custom email list.
@@ -121,12 +121,12 @@ private void ConfigureAlertSettings()
121121
}
122122

123123

124-
if (this.EnableEmailSubscriptionOwners.IsPresent)
124+
if (this.EnableEmailSubscriptionOwner.IsPresent)
125125
{
126126
alertProps.SendToOwners = SendToOwners.Send;
127127
}
128128

129-
if (this.DisableEmailToSubscriptionOwners.IsPresent)
129+
if (this.DisableEmailToSubscriptionOwner.IsPresent)
130130
{
131131
alertProps.SendToOwners = SendToOwners.DoNotSend;
132132
}

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/RecoveryPlan/UpdateAzureRmRecoveryServicesAsrRecoveryPlan.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ private void UpdateRecoveryPlan(
149149
.Properties.ProviderSpecificDetails).VmId;
150150
}
151151
else if (item.Properties.ProviderSpecificDetails
152-
.GetType() ==
152+
.GetType() ==
153153
typeof(InMageAzureV2ReplicationDetails))
154154
{
155155
VmId = ((InMageAzureV2ReplicationDetails)item
156156
.Properties.ProviderSpecificDetails).VmId;
157157
}
158158
else if (item.Properties.ProviderSpecificDetails
159-
.GetType() ==
159+
.GetType() ==
160160
typeof(InMageReplicationDetails))
161161
{
162162
VmId = ((InMageReplicationDetails)item

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/ReplicationProtectedItem/NewAzureRmRecoveryServicesAsrReplicationProtectedItem.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public class NewAzureRmRecoveryServicesAsrReplicationProtectedItem : SiteRecover
157157
[Parameter(ParameterSetName = ASRParameterSets.VMwareToAzure)]
158158
[Parameter(ParameterSetName = ASRParameterSets.HyperVSiteToAzure)]
159159
[ValidateNotNullOrEmpty]
160-
public string[] IncludeDiskIds { get; set; }
160+
public string[] IncludeDiskId { get; set; }
161161

162162
/// <summary>
163163
/// Gets or sets Process Server.
@@ -326,9 +326,9 @@ private void VMwareToAzureReplication(EnableProtectionInput input)
326326
? this.ProtectableItem.FriendlyName
327327
: this.RecoveryVmName,
328328
EnableRDPOnTargetOption = Constants.NeverEnableRDPOnTargetOption,
329-
DisksToInclude = this.IncludeDiskIds != null
330-
? this.IncludeDiskIds
331-
: null
329+
DisksToInclude = this.IncludeDiskId != null
330+
? this.IncludeDiskId
331+
: null
332332
};
333333

334334
var deploymentType = Utilities.GetValueFromArmId(
@@ -414,8 +414,8 @@ private void EnterpriseAndHyperVToAzure(EnableProtectionInput input)
414414
providerSettings.HvHostVmId = this.ProtectableItem.FabricObjectId;
415415
providerSettings.VmName = this.ProtectableItem.FriendlyName;
416416
providerSettings.TargetAzureVmName = string.IsNullOrEmpty(this.RecoveryVmName)
417-
? this.ProtectableItem.FriendlyName
418-
: this.RecoveryVmName;
417+
? this.ProtectableItem.FriendlyName
418+
: this.RecoveryVmName;
419419

420420
if (!string.IsNullOrEmpty(this.RecoveryAzureNetworkId))
421421
{

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/ReplicationProtectedItem/SetAzureRmRecoveryServicesAsrReplicationProtectedItem.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public class SetAzureRmRecoveryServicesAsrReplicationProtectedItem : SiteRecover
126126
[ValidateSet(
127127
Constants.True,
128128
Constants.False)]
129-
public string UseManagedDisks { get; set; }
129+
public string UseManagedDisk { get; set; }
130130

131131
/// <summary>
132132
/// ProcessRecord of the command.
@@ -165,7 +165,7 @@ public override void ExecuteSiteRecoveryCmdlet()
165165
string.IsNullOrEmpty(this.Size) &&
166166
string.IsNullOrEmpty(this.PrimaryNic) &&
167167
string.IsNullOrEmpty(this.RecoveryNetworkId) &&
168-
this.UseManagedDisks == null &&
168+
this.UseManagedDisk == null &&
169169
string.IsNullOrEmpty(this.RecoveryAvailabilitySet) &&
170170
string.IsNullOrEmpty(this.RecoveryResourceGroupId) &&
171171
string.IsNullOrEmpty(this.LicenseType))
@@ -187,7 +187,7 @@ public override void ExecuteSiteRecoveryCmdlet()
187187
var vmRecoveryNetworkId = this.RecoveryNetworkId;
188188
var licenseType = this.LicenseType;
189189
var recoveryResourceGroupId = this.RecoveryResourceGroupId;
190-
var useManagedDisk = this.UseManagedDisks;
190+
var useManagedDisk = this.UseManagedDisk;
191191
var availabilitySetId = this.RecoveryAvailabilitySet;
192192
var vMNicInputDetailsList = new List<VMNicInputDetails>();
193193
var providerSpecificInput = new UpdateReplicationProtectedItemProviderInput();
@@ -224,7 +224,7 @@ public override void ExecuteSiteRecoveryCmdlet()
224224
availabilitySetId = providerSpecificDetails.RecoveryAvailabilitySetId;
225225
}
226226

227-
if (string.IsNullOrEmpty(this.UseManagedDisks))
227+
if (string.IsNullOrEmpty(this.UseManagedDisk))
228228
{
229229
useManagedDisk = providerSpecificDetails.UseManagedDisks;
230230
}
@@ -293,7 +293,7 @@ public override void ExecuteSiteRecoveryCmdlet()
293293
availabilitySetId = providerSpecificDetails.RecoveryAvailabilitySetId;
294294
}
295295

296-
if (string.IsNullOrEmpty(this.UseManagedDisks))
296+
if (string.IsNullOrEmpty(this.UseManagedDisk))
297297
{
298298
useManagedDisk = providerSpecificDetails.UseManagedDisks;
299299
}

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrTestFailoverCleanupJob.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class StartAzureRmRecoveryServicesAsrTestFailoverCleanupJob : SiteRecover
6464
[Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = false)]
6565
[Parameter(ParameterSetName = ASRParameterSets.ByRPIObject, Mandatory = false)]
6666
[Parameter(ParameterSetName = ASRParameterSets.ByResourceId, Mandatory = false)]
67-
public string Comments { get; set; }
67+
public string Comment { get; set; }
6868

6969
/// <summary>
7070
/// ProcessRecord of the command.
@@ -115,7 +115,7 @@ private void StartRPITestFailoverCleanup()
115115

116116
var testFailoverCleanupInputProperties = new TestFailoverCleanupInputProperties
117117
{
118-
Comments = this.Comments == null ? "" : this.Comments
118+
Comments = this.Comment == null ? "" : this.Comment
119119
};
120120

121121
var input = new TestFailoverCleanupInput
@@ -145,7 +145,7 @@ private void StartRpTestFailoverCleanup()
145145
var recoveryPlanTestFailoverCleanupInputProperties =
146146
new RecoveryPlanTestFailoverCleanupInputProperties
147147
{
148-
Comments = this.Comments
148+
Comments = this.Comment
149149
};
150150

151151
var recoveryPlanTestFailoverCleanupInput = new RecoveryPlanTestFailoverCleanupInput

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/Utilities/Utilities.cs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -141,32 +141,7 @@ public static string GetProviderNameSpaceFromArmId(
141141
{
142142
return data.UnFormatArmId(ARMResourceIdPaths.SRSArmUrlPattern)[2];
143143
}
144-
145-
public static void GetResourceProviderNamespaceAndType(
146-
string resourceId,
147-
out string resourceProviderNamespace,
148-
out string resourceType)
149-
{
150-
var armFields = resourceId.Split('/');
151-
var dictionary = new Dictionary<string, string>();
152-
153-
if (armFields.Length % 2 == 0)
154-
{
155-
throw new Exception("Invalid ARM ID");
156-
}
157-
158-
for (var i = 0; i < armFields.Length; i = i + 2)
159-
{
160-
dictionary.Add(
161-
armFields[i],
162-
armFields[i + 1]);
163-
}
164-
165-
resourceProviderNamespace = dictionary[ARMResourceTypeConstants.Providers];
166-
resourceType = dictionary.ContainsKey("SiteRecoveryVault") ? "SiteRecoveryVault"
167-
: "RecoveryServicesVault";
168-
}
169-
144+
170145
/// <summary>
171146
/// Get Value from ARM ID
172147
/// </summary>

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/help/New-AzureRmRecoveryServicesAsrReplicationProtectedItem.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ New-AzureRmRecoveryServicesAsrReplicationProtectedItem [-VmmToVmm] -ProtectableI
2424
New-AzureRmRecoveryServicesAsrReplicationProtectedItem [-VMwareToAzure] -ProtectableItem <ASRProtectableItem>
2525
-Name <String> [-RecoveryVmName <String>] -ProtectionContainerMapping <ASRProtectionContainerMapping>
2626
-RecoveryAzureStorageAccountId <String> -Account <ASRRunAsAccount> [-LogStorageAccountId <String>]
27-
[-IncludeDiskIds <String[]>] -ProcessServer <ASRProcessServer> [-RecoveryAzureNetworkId <String>]
27+
[-IncludeDiskId <String[]>] -ProcessServer <ASRProcessServer> [-RecoveryAzureNetworkId <String>]
2828
[-RecoveryAzureSubnetName <String>] -RecoveryResourceGroupId <String> [-ReplicationGroupName <String>]
2929
[-WaitForCompletion] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3030
```
@@ -42,7 +42,7 @@ New-AzureRmRecoveryServicesAsrReplicationProtectedItem [-HyperVToAzure] -Protect
4242
New-AzureRmRecoveryServicesAsrReplicationProtectedItem [-HyperVToAzure] -ProtectableItem <ASRProtectableItem>
4343
-Name <String> [-RecoveryVmName <String>] -ProtectionContainerMapping <ASRProtectionContainerMapping>
4444
-RecoveryAzureStorageAccountId <String> -OSDiskName <String> -OS <String> [-LogStorageAccountId <String>]
45-
[-IncludeDiskIds <String[]>] [-RecoveryAzureNetworkId <String>] [-RecoveryAzureSubnetName <String>]
45+
[-IncludeDiskId <String[]>] [-RecoveryAzureNetworkId <String>] [-RecoveryAzureSubnetName <String>]
4646
-RecoveryResourceGroupId <String> [-WaitForCompletion] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
4747
[-Confirm] [<CommonParameters>]
4848
```
@@ -99,21 +99,6 @@ Accept pipeline input: False
9999
Accept wildcard characters: False
100100
```
101101
102-
### -IncludeDiskIds
103-
The list of disks to include for replication. By default all disks are included.
104-
105-
```yaml
106-
Type: String[]
107-
Parameter Sets: VMwareToAzure, HyperVSiteToAzure
108-
Aliases:
109-
110-
Required: False
111-
Position: Named
112-
Default value: None
113-
Accept pipeline input: False
114-
Accept wildcard characters: False
115-
```
116-
117102
### -LogStorageAccountId
118103
Vm log azure storage account Id.
119104
@@ -402,6 +387,21 @@ Accept pipeline input: False
402387
Accept wildcard characters: False
403388
```
404389
390+
### -IncludeDiskId
391+
The list of disks to include for replication. By default all disks are included.
392+
393+
```yaml
394+
Type: String[]
395+
Parameter Sets: VMwareToAzure, HyperVSiteToAzure
396+
Aliases:
397+
398+
Required: False
399+
Position: Named
400+
Default value: None
401+
Accept pipeline input: False
402+
Accept wildcard characters: False
403+
```
404+
405405
### CommonParameters
406406
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
407407

src/ResourceManager/RecoveryServices.SiteRecovery/Commands.RecoveryServices.SiteRecovery/help/Set-AzureRmRecoveryServicesAsrAlertSetting.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Set-AzureRmRecoveryServicesAsrAlertSetting [-CustomEmailAddress <String[]>] [-Lo
2020

2121
### EmailToSubscriptionOwner
2222
```
23-
Set-AzureRmRecoveryServicesAsrAlertSetting [-EnableEmailSubscriptionOwners] [-CustomEmailAddress <String[]>]
23+
Set-AzureRmRecoveryServicesAsrAlertSetting [-EnableEmailSubscriptionOwner] [-CustomEmailAddress <String[]>]
2424
[-LocaleID <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2525
```
2626

2727
### DisableEmailToSubcriptionOwner
2828
```
29-
Set-AzureRmRecoveryServicesAsrAlertSetting [-DisableEmailToSubscriptionOwners] [-CustomEmailAddress <String[]>]
29+
Set-AzureRmRecoveryServicesAsrAlertSetting [-DisableEmailToSubscriptionOwner] [-CustomEmailAddress <String[]>]
3030
[-LocaleID <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3131
```
3232

@@ -125,28 +125,28 @@ Accept pipeline input: False
125125
Accept wildcard characters: False
126126
```
127127
128-
### -DisableEmailToSubscriptionOwners
129-
Switch parameter specifies enable notification to subscription owner.
128+
### -Confirm
129+
Prompts you for confirmation before running the cmdlet.
130130
131131
```yaml
132132
Type: SwitchParameter
133-
Parameter Sets: DisableEmailToSubcriptionOwner
134-
Aliases:
133+
Parameter Sets: (All)
134+
Aliases: cf
135135

136-
Required: True
136+
Required: False
137137
Position: Named
138138
Default value: None
139139
Accept pipeline input: False
140140
Accept wildcard characters: False
141141
```
142142
143-
### -Confirm
144-
Prompts you for confirmation before running the cmdlet.
143+
### -WhatIf
144+
Shows what would happen if the cmdlet runs. The cmdlet is not run.
145145
146146
```yaml
147147
Type: SwitchParameter
148148
Parameter Sets: (All)
149-
Aliases: cf
149+
Aliases: wi
150150

151151
Required: False
152152
Position: Named
@@ -155,12 +155,12 @@ Accept pipeline input: False
155155
Accept wildcard characters: False
156156
```
157157
158-
### -EnableEmailSubscriptionOwners
159-
Switch paramter specifies enable notification to subscription owner.
158+
### -DisableEmailToSubscriptionOwner
159+
Switch parameter specifies enable notification to subscription owner.
160160
161161
```yaml
162162
Type: SwitchParameter
163-
Parameter Sets: EmailToSubscriptionOwner
163+
Parameter Sets: DisableEmailToSubcriptionOwner
164164
Aliases:
165165

166166
Required: True
@@ -170,15 +170,15 @@ Accept pipeline input: False
170170
Accept wildcard characters: False
171171
```
172172
173-
### -WhatIf
174-
Shows what would happen if the cmdlet runs. The cmdlet is not run.
173+
### -EnableEmailSubscriptionOwner
174+
Switch paramter specifies enable notification to subscription owner.
175175
176176
```yaml
177177
Type: SwitchParameter
178-
Parameter Sets: (All)
179-
Aliases: wi
178+
Parameter Sets: EmailToSubscriptionOwner
179+
Aliases:
180180

181-
Required: False
181+
Required: True
182182
Position: Named
183183
Default value: None
184184
Accept pipeline input: False

0 commit comments

Comments
 (0)