Skip to content

Commit 583015e

Browse files
committed
Taking pr comments, adding help content.
1 parent afc44c7 commit 583015e

File tree

4 files changed

+174
-21
lines changed

4 files changed

+174
-21
lines changed

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
<Compile Include="Service\GetAzureSiteRecoveryVaultSettings.cs" />
158158
<Compile Include="Service\GetAzureSiteRecoveryVM.cs" />
159159
<Compile Include="Service\ImportAzureSiteRecoveryVaultSettingsFile.cs" />
160-
<Compile Include="Service\UpdateSyncOwnerInformation.cs" />
160+
<Compile Include="Service\UpdateAzureSiteRecoveryProtectionEntity.cs" />
161161
</ItemGroup>
162162
<ItemGroup>
163163
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Microsoft.Azure.Commands.RecoveryServices.dll-help.xml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4703,4 +4703,166 @@
47034703
</maml:relatedLinks>
47044704
</command:command>
47054705

4706+
<!--Update-AzureSiteRecoveryProtectionEntity-->
4707+
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
4708+
<command:details>
4709+
<command:name>
4710+
Update-AzureSiteRecoveryProtectionEntity
4711+
</command:name>
4712+
<maml:description>
4713+
<maml:para>Updates the property of Azure Site Recovery Protection Entity like virtual machine owner information.</maml:para>
4714+
</maml:description>
4715+
<maml:copyright>
4716+
<maml:para></maml:para>
4717+
</maml:copyright>
4718+
<command:verb>Update</command:verb>
4719+
<command:noun>AzureSiteRecoveryProtectionEntity</command:noun>
4720+
<dev:version></dev:version>
4721+
</command:details>
4722+
<maml:description>
4723+
<maml:para>Updates the property of Azure Site Recovery Protection Entity. This command can be used to update the owner information on the replica virtual machine. Supported only for VMM to VMM protected protection entities.</maml:para>
4724+
</maml:description>
4725+
<!-- Cmdlet syntax section-->
4726+
<command:syntax>
4727+
<command:syntaxItem>
4728+
<maml:name>Update-AzureSiteRecoveryProtectionEntity</maml:name>
4729+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="named">
4730+
<maml:name>ProtectionEntity</maml:name>
4731+
<maml:description>
4732+
<maml:para>Protection Entity object</maml:para>
4733+
</maml:description>
4734+
<command:parameterValue required="true" variableLength="false">ASRProtectionEntity</command:parameterValue>
4735+
</command:parameter>
4736+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
4737+
<maml:name>WaitForCompletion</maml:name>
4738+
<maml:description>
4739+
<maml:para>Waits till the operation completes</maml:para>
4740+
</maml:description>
4741+
</command:parameter>
4742+
</command:syntaxItem>
4743+
</command:syntax>
4744+
<!-- Cmdlet parameter section -->
4745+
<command:parameters>
4746+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="named">
4747+
<maml:name>ProtectionEntity</maml:name>
4748+
<maml:description>
4749+
<maml:para>Protection Entity object</maml:para>
4750+
4751+
</maml:description>
4752+
<command:parameterValue required="true" variableLength="false">ASRProtectionEntity</command:parameterValue>
4753+
<dev:type>
4754+
<maml:name>ASRProtectionEntity</maml:name>
4755+
<maml:uri/>
4756+
</dev:type>
4757+
<dev:defaultValue></dev:defaultValue>
4758+
</command:parameter>
4759+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
4760+
<maml:name>WaitForCompletion</maml:name>
4761+
<maml:description>
4762+
<maml:para>Waits till the operation completes</maml:para>
4763+
4764+
</maml:description>
4765+
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
4766+
<dev:type>
4767+
<maml:name>SwitchParameter</maml:name>
4768+
<maml:uri/>
4769+
</dev:type>
4770+
<dev:defaultValue></dev:defaultValue>
4771+
</command:parameter>
4772+
</command:parameters>
4773+
<!-- Input - Output section-->
4774+
<command:inputTypes>
4775+
<command:inputType>
4776+
<dev:type>
4777+
<maml:name></maml:name>
4778+
<maml:uri/>
4779+
<maml:description />
4780+
</dev:type>
4781+
<maml:description>
4782+
<maml:para>
4783+
<!-- description -->
4784+
4785+
</maml:para>
4786+
</maml:description>
4787+
</command:inputType>
4788+
</command:inputTypes>
4789+
<command:returnValues>
4790+
<command:returnValue>
4791+
<dev:type>
4792+
<maml:name></maml:name>
4793+
<maml:uri />
4794+
<maml:description />
4795+
</dev:type>
4796+
<maml:description>
4797+
<maml:para>
4798+
<!-- description -->
4799+
4800+
</maml:para>
4801+
</maml:description>
4802+
</command:returnValue>
4803+
</command:returnValues>
4804+
<!-- Error section-->
4805+
<command:terminatingErrors />
4806+
<command:nonTerminatingErrors />
4807+
<!-- Notes section -->
4808+
<maml:alertSet>
4809+
<maml:title></maml:title>
4810+
<maml:alert>
4811+
<maml:para>
4812+
4813+
</maml:para>
4814+
</maml:alert>
4815+
<maml:alert>
4816+
<maml:para></maml:para>
4817+
</maml:alert>
4818+
</maml:alertSet>
4819+
<!-- Example section -->
4820+
<command:examples>
4821+
4822+
<command:example>
4823+
<maml:title>
4824+
-------------------------- EXAMPLE 1 --------------------------
4825+
</maml:title>
4826+
<maml:introduction>
4827+
<maml:para>C:\PS&gt;</maml:para>
4828+
</maml:introduction>
4829+
<dev:code>
4830+
Update-AzureSiteRecoveryProtectionEntity -ProtectionEntity $PE
4831+
4832+
Name :
4833+
ID : 680ffe0f-6236-465e-8c94-81242fa67e6d
4834+
ClientRequestId : 2c47e6ce-1460-4187-8a0f-b9073735fa38-2014-12-30 06:44:40Z-P
4835+
State : NotStarted
4836+
StateDescription : NotStarted
4837+
StartTime :
4838+
EndTime :
4839+
AllowedActions : {}
4840+
Tasks : {}
4841+
Errors : {}
4842+
</dev:code>
4843+
<dev:remarks>
4844+
<maml:para>Description</maml:para>
4845+
<maml:para>-----------</maml:para>
4846+
<maml:para></maml:para>
4847+
<maml:para></maml:para>
4848+
<maml:para></maml:para>
4849+
<maml:para></maml:para>
4850+
<maml:para></maml:para>
4851+
</dev:remarks>
4852+
<command:commandLines>
4853+
<command:commandLine>
4854+
<command:commandText></command:commandText>
4855+
</command:commandLine>
4856+
</command:commandLines>
4857+
</command:example>
4858+
</command:examples>
4859+
<!-- Link section -->
4860+
<maml:relatedLinks>
4861+
<maml:navigationLink>
4862+
<maml:linkText></maml:linkText>
4863+
<maml:uri/>
4864+
</maml:navigationLink>
4865+
</maml:relatedLinks>
4866+
</command:command>
4867+
47064868
</helpItems>

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesPEClient.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,13 @@ public JobResponse StartAzureSiteRecoveryReprotection(
194194
}
195195

196196
/// <summary>
197-
/// Syncs owner role information on Protection entity.
197+
/// Currently available only for E2E replication provider,
198+
/// syncs owner role information on Protection entity.
198199
/// </summary>
199200
/// <param name="protectionContainerId">Protection Container ID</param>
200-
/// <param name="virtualMachineId">Virtual Machine ID</param>
201+
/// <param name="protectionEntityId">Virtual Machine ID</param>
201202
/// <returns>Job response</returns>
202-
public JobResponse UpdateSyncOwnerInformationOnProtectionEntity(
203+
public JobResponse UpdateAzureSiteRecoveryProtectionEntity(
203204
string protectionContainerId,
204205
string protectionEntityId)
205206
{

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateSyncOwnerInformation.cs renamed to src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryProtectionEntity.cs

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Microsoft.Azure.Commands.RecoveryServices
2929
/// </summary>
3030
[Cmdlet(VerbsData.Update, "AzureSiteRecoveryProtectionEntity")]
3131
[OutputType(typeof(ASRJob))]
32-
public class UpdateSyncOwnerInformation : RecoveryServicesCmdletBase
32+
public class UpdateAzureSiteRecoveryProtectionEntity : RecoveryServicesCmdletBase
3333
{
3434
#region Parameters
3535

@@ -43,16 +43,6 @@ public class UpdateSyncOwnerInformation : RecoveryServicesCmdletBase
4343
/// </summary>
4444
private string protectionContainerId;
4545

46-
/// <summary>
47-
/// Recovery Plan object.
48-
/// </summary>
49-
private ASRProtectionEntity protectionEntity;
50-
51-
/// <summary>
52-
/// Wait / hold prompt till the Job completes.
53-
/// </summary>
54-
private bool waitForCompletion;
55-
5646
/// <summary>
5747
/// Job response.
5848
/// </summary>
@@ -65,8 +55,8 @@ public class UpdateSyncOwnerInformation : RecoveryServicesCmdletBase
6555
[ValidateNotNullOrEmpty]
6656
public ASRProtectionEntity ProtectionEntity
6757
{
68-
get { return this.protectionEntity; }
69-
set { this.protectionEntity = value; }
58+
get;
59+
set;
7060
}
7161

7262
/// <summary>
@@ -75,8 +65,8 @@ public ASRProtectionEntity ProtectionEntity
7565
[Parameter]
7666
public SwitchParameter WaitForCompletion
7767
{
78-
get { return this.waitForCompletion; }
79-
set { this.waitForCompletion = value; }
68+
get;
69+
set;
8070
}
8171

8272
#endregion Parameters
@@ -113,13 +103,13 @@ protected override void StopProcessing()
113103
/// </summary>
114104
private void SyncOwnerInformationOnPE()
115105
{
116-
this.jobResponse = RecoveryServicesClient.UpdateSyncOwnerInformationOnProtectionEntity(
106+
this.jobResponse = RecoveryServicesClient.UpdateAzureSiteRecoveryProtectionEntity(
117107
this.protectionContainerId,
118108
this.protectionEntityId);
119109

120110
this.WriteJob(this.jobResponse.Job);
121111

122-
if (this.waitForCompletion)
112+
if (this.WaitForCompletion)
123113
{
124114
this.WaitForJobCompletion(this.jobResponse.Job.ID);
125115
}

0 commit comments

Comments
 (0)