Skip to content

Aligning PowerShell to service object model #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.8-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.1.1-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.0.8-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.5799.28345-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5799.28345-prerelease" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.8-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.1.1-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.18.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.0.8-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.RecoveryServices" version="1.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.SiteRecovery, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.1.0.8-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.SiteRecovery">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.1.1.1-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.SiteRecovery" version="1.0.8-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.SiteRecovery" version="1.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.5799.28345-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5799.28345-prerelease" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Management.SiteRecovery, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.1.0.8-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.SiteRecovery.1.1.1-preview\lib\net40\Microsoft.Azure.Management.SiteRecovery.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.18.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
Expand Down Expand Up @@ -93,6 +93,7 @@
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
Expand All @@ -107,6 +108,7 @@
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand All @@ -131,21 +133,46 @@
<Compile Include="Common\PSSiteRecoveryVaultExtendedInfoClient.cs" />
<Compile Include="Common\PSSiteRecoveryVMClient.cs" />
<Compile Include="Common\SiteRecoveryCmdletBase.cs" />
<Compile Include="Fabrics\GetAzureRmSiteRecoveryFabric.cs" />
<Compile Include="Fabrics\NewAzureRmSiteRecoveryFabric.cs" />
<Compile Include="Fabrics\RemoveAzureRmSiteRecoveryFabric.cs" />
<Compile Include="Job\StopAzureSiteRecoveryJob.cs" />
<Compile Include="Models\PSConstants.cs" />
<Compile Include="Models\PSNetworkObjects.cs" />
<Compile Include="Models\PSRecoveryPlanObjects.cs" />
<Compile Include="Network\GetAzureRMSiteRecoveryNetwork.cs" />
<Compile Include="Network\GetAzureRMSiteRecoveryNetworkMapping.cs" />
<Compile Include="Network\GetAzureRMSiteRecoveryNetworkLegacy.cs" />
<Compile Include="Network\GetAzureRMSiteRecoveryNetworkMappingLegacy.cs" />
<Compile Include="Network\GetAzureRmSiteRecoveryNetworkMapping.cs" />
<Compile Include="Network\GetAzureRmSiteRecoveryNetwork.cs" />
<Compile Include="Policy\UpdateAzureRmSiteRecoveryPolicy.cs" />
<Compile Include="ProtectableItem\GetAzureRmSiteRecoveryProtectableItem.cs" />
<Compile Include="ProtectionContainerMapping\GetAzureRmSiteRecoveryProtectionContainerMapping.cs" />
<Compile Include="ProtectionContainerMapping\NewAzureRmSiteRecoveryProtectionContainerMapping.cs" />
<Compile Include="ProtectionContainerMapping\RemoveAzureRmSiteRecoveryProtectionContainerMapping.cs" />
<Compile Include="ProtectionContainer\GetAzureRmSiteRecoveryProtectionContainer.cs" />
<Compile Include="RecoveryPlan\EditAzureRmSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\NewAzureRmSiteRecoveryRecoveryPlan.cs" />
<Compile Include="ReplicationProtectedItem\GetAzureRmSiteRecoveryReplicationProtectedItem.cs" />
<Compile Include="ReplicationProtectedItem\NewAzureRmSiteRecoveryReplicationProtectedItem.cs" />
<Compile Include="ReplicationProtectedItem\RemoveAzureRmSiteRecoveryReplicationProtectedItem.cs" />
<Compile Include="ReplicationProtectedItem\SetAzureRmSiteRecoveryReplicationProtectedItem.cs" />
<Compile Include="ReplicationProtectedItem\StartAzureRmSiteRecoveryCommitFailoverJob.cs" />
<Compile Include="ReplicationProtectedItem\StartAzureRmSiteRecoveryPlannedFailoverJob.cs" />
<Compile Include="ReplicationProtectedItem\StartAzureRmSiteRecoveryTestFailoverJob.cs" />
<Compile Include="ReplicationProtectedItem\StartAzureRmSiteRecoveryUnPlannedFailoverJob.cs" />
<Compile Include="ReplicationProtectedItem\UpdateAzureRmSiteRecoveryProtectionDirection.cs" />
<Compile Include="Server\RefreshAzureSiteRecoveryServer.cs" />
<Compile Include="Network\NewAzureRMSiteRecoveryNetworkMapping.cs" />
<Compile Include="Network\RemoveAzureRMSiteRecoveryNetworkMapping.cs" />
<Compile Include="RecoveryPlan\GetAzureSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\NewAzureSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\RemoveAzureSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\EditAzureSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\UpdateAzureSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\GetAzureRmSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\NewAzureSiteRecoveryRecoveryPlanLegacy.cs" />
<Compile Include="RecoveryPlan\RemoveAzureRmSiteRecoveryRecoveryPlan.cs" />
<Compile Include="RecoveryPlan\EditAzureSiteRecoveryRecoveryPlanLegacy.cs" />
<Compile Include="RecoveryPlan\UpdateAzureRmSiteRecoveryRecoveryPlan.cs" />
<Compile Include="Server\RemoveAzureSiteRecoveryServer.cs" />
<Compile Include="RecoveryServicesProvider\GetAzureRmSiteRecoveryServicesProvider.cs" />
<Compile Include="RecoveryServicesProvider\RefreshAzureRmSiteRecoveryServicesProvider.cs" />
<Compile Include="RecoveryServicesProvider\RemoveAzureRmSiteRecoveryServicesProvider.cs" />
<Compile Include="Site\GetAzureSiteRecoverySite.cs" />
<Compile Include="Site\NewAzureSiteRecoverySite.cs" />
<Compile Include="Site\RemoveAzureSiteRecoverySite.cs" />
Expand All @@ -161,22 +188,23 @@
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="ProtectionContainer\GetAzureSiteRecoveryProtectionContainer.cs" />
<Compile Include="ProtectionContainer\GetAzureSiteRecoveryProtectionContainerLegacy.cs" />
<Compile Include="ProtectionEntity\GetAzureSiteRecoveryProtectionEntity.cs" />
<Compile Include="ProtectionEntity\SetAzureSiteRecoveryProtectionEntity.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryCommitFailoverJob.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryPlannedFailoverJob.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryTestFailoverJob.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryUnPlannedFailoverJob.cs" />
<Compile Include="ProtectionEntity\UpdateAzureSiteRecoveryProtectionDirection.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryCommitFailoverJobLegacy.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryPlannedFailoverJobLegacy.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryTestFailoverJobLegacy.cs" />
<Compile Include="ProtectionEntity\StartAzureSiteRecoveryUnPlannedFailoverJobLegacy.cs" />
<Compile Include="ProtectionEntity\UpdateAzureSiteRecoveryProtectionDirectionLegacy.cs" />
<Compile Include="Policy\RemoveAzureSiteRecoveryPolicy.cs" />
<Compile Include="Policy\NewAzureSiteRecoveryPolicy.cs" />
<Compile Include="Policy\GetAzureSiteRecoveryPolicy.cs" />
<Compile Include="Policy\StartAzureSiteRecoveryPolicyAssociationJob.cs" />
<Compile Include="Policy\StartAzureSiteRecoveryPolicyDissociationJob.cs" />
<Compile Include="Server\GetAzureSiteRecoveryServer.cs" />
<Compile Include="Storage\Classification\GetAzureSiteRecoveryStorageClassification.cs" />
<Compile Include="Storage\Classification\GetAzureSiteRecoveryStorageClassificationMapping.cs" />
<Compile Include="Storage\Classification\GetAzureRmSiteRecoveryStorageClassification.cs" />
<Compile Include="Storage\Classification\GetAzureRmSiteRecoveryStorageClassificationLegacy.cs" />
<Compile Include="Storage\Classification\GetAzureRmSiteRecoveryStorageClassificationMapping.cs" />
<Compile Include="Storage\Classification\NewAzureRmSiteRecoveryStorageClassificationMapping.cs" />
<Compile Include="Storage\Classification\RemoveAzureSiteRecoveryStorageClassificationMapping.cs" />
<Compile Include="Utilities\CertUtils.cs" />
Expand Down Expand Up @@ -225,5 +253,7 @@
<Name>Commands.RecoveryServices</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,22 @@ public LongRunningOperationResponse CreateAzureSiteRecoveryFabric(string fabricN
/// <summary>
/// Deletes Azure Site Recovery Fabric.
/// </summary>
/// <param name="createAndAssociatePolicyInput">Policy Input</param>
/// <param name="DeleteAzureSiteRecoveryFabric">Fabric Input</param>
/// <returns>Long operation response</returns>
public LongRunningOperationResponse DeleteAzureSiteRecoveryFabric(string fabricName)
{
return this.GetSiteRecoveryClient().Fabrics.BeginDeleting(fabricName,
this.GetRequestHeaders());
}

/// <summary>
/// Purge Azure Site Recovery Fabric.
/// </summary>
/// <param name="fabricName">Fabric name</param>
/// <returns>Long operation response</returns>
public LongRunningOperationResponse DeleteAzureSiteRecoveryFabric(string fabricName, FabricDeletionInput input)
public LongRunningOperationResponse PurgeAzureSiteRecoveryFabric(string fabricName)
{
return this.GetSiteRecoveryClient().Fabrics.BeginDeleting(fabricName, input,
return this.GetSiteRecoveryClient().Fabrics.BeginPurging(fabricName,
this.GetRequestHeaders());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public PolicyResponse GetAzureSiteRecoveryPolicy(
/// <summary>
/// Creates Azure Site Recovery Policy.
/// </summary>
/// <param name="createAndAssociatePolicyInput">Policy Input</param>
/// <param name="policyName">Policy name</param>
/// <param name="CreatePolicyInput">Policy Input</param>
/// <returns>Long operation response</returns>
public LongRunningOperationResponse CreatePolicy(string policyName,
CreatePolicyInput Policy)
Expand All @@ -58,6 +59,20 @@ public LongRunningOperationResponse CreatePolicy(string policyName,
this.GetRequestHeaders());
}

/// <summary>
/// Update Azure Site Recovery Policy.
/// </summary>
/// <param name="UpdatePolicyInput">Policy Input</param>
/// <param name="policyName">Policy Name</param>
/// <returns>Long operation response</returns>
public LongRunningOperationResponse UpdatePolicy(string policyName, UpdatePolicyInput input)
{
return this.GetSiteRecoveryClient().Policies.BeginUpdating(
input,
policyName,
this.GetRequestHeaders());
}

/// <summary>
/// Deletes Azure Site Recovery Policy.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,19 @@ public LongRunningOperationResponse UnConfigureProtection(string fabricName,
{
return this.GetSiteRecoveryClient().ProtectionContainerMapping.BeginUnconfigureProtection(fabricName, protectionContainerName, mappingName, input, this.GetRequestHeaders());
}

/// <summary>
/// Purge Cloud Mapping
/// </summary>
/// <param name="fabricName">Fabric Name</param>
/// <param name="protectionContainerName">Protection Container Input</param>
/// <param name="mappingName">Mapping Name</param>
/// <returns></returns>
public LongRunningOperationResponse PurgeCloudMapping(string fabricName,
string protectionContainerName, string mappingName)
{
return this.GetSiteRecoveryClient().ProtectionContainerMapping.BeginPurgeProtection(
fabricName, protectionContainerName, mappingName, this.GetRequestHeaders());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public RecoveryServicesProviderResponse GetAzureSiteRecoveryProvider(string fabr
/// <param name="fabricId">Fabric ID</param>
/// <param name="providerId">Provider ID</param>
/// <returns>Provider response</returns>
public LongRunningOperationResponse RemoveAzureSiteRecoveryProvider(string fabricId, string providerId, RecoveryServicesProviderDeletionInput input)
public LongRunningOperationResponse RemoveAzureSiteRecoveryProvider(string fabricId, string providerId)
{
return this.GetSiteRecoveryClient().RecoveryServicesProvider.BeginDeleting(fabricId, providerId, input, this.GetRequestHeaders());
return this.GetSiteRecoveryClient().RecoveryServicesProvider.BeginDeleting(fabricId, providerId, this.GetRequestHeaders());
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,23 @@ public LongRunningOperationResponse DisableProtection(string fabricName,
this.GetRequestHeaders());
}

/// <summary>
/// Purges Replicated Protected Item.
/// </summary>
/// <param name="protectionContainerName">Protection Container ID</param>
/// <param name="replicationProtectedItemName">Virtual Machine ID or Replication group Id</param>
/// <returns>Job response</returns>
public LongRunningOperationResponse PurgeProtection(string fabricName,
string protectionContainerName,
string replicationProtectedItemName)
{
return this.GetSiteRecoveryClient().ReplicationProtectedItem.BeginPurgeProtection(
fabricName,
protectionContainerName,
replicationProtectedItemName,
this.GetRequestHeaders());
}

/// <summary>
/// Starts Planned Failover
/// </summary>
Expand Down
Loading