Skip to content

Commit 470dd16

Browse files
committed
Merge pull request #1354 from Azure/SiteRecovery
Merge Release->Master tor SiteRecovery release
2 parents 81b36fa + 432ba84 commit 470dd16

File tree

115 files changed

+13904
-2846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+13904
-2846
lines changed

setup/azurecmdfiles.wxi

Lines changed: 106 additions & 8 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="xunit.runner.console" version="2.0.0" />
4+
</packages>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#
2+
# Module manifest for module 'Microsoft.Azure.Commands.RecoveryServices'
3+
#
4+
# Generated by: Microsoft Corporation
5+
#
6+
# Generated on: 9/19/2015
7+
#
8+
9+
@{
10+
11+
# Version number of this module.
12+
ModuleVersion = '1.0.2'
13+
14+
# ID used to uniquely identify this module
15+
GUID = '4AA53B7E-FCFE-4E22-979C-9A4E6380DE58'
16+
17+
# Author of this module
18+
Author = 'Microsoft Corporation'
19+
20+
# Company or vendor of this module
21+
CompanyName = 'Microsoft Corporation'
22+
23+
# Copyright statement for this module
24+
Copyright = 'Microsoft Corporation. All rights reserved.'
25+
26+
# Description of the functionality provided by this module
27+
Description = 'Microsoft Azure PowerShell - RecoveryServices cmdlets for Azure Resource Manager'
28+
29+
# Minimum version of the Windows PowerShell engine required by this module
30+
PowerShellVersion = '3.0'
31+
32+
# Name of the Windows PowerShell host required by this module
33+
PowerShellHostName = ''
34+
35+
# Minimum version of the Windows PowerShell host required by this module
36+
PowerShellHostVersion = ''
37+
38+
# Minimum version of the .NET Framework required by this module
39+
DotNetFrameworkVersion = '4.0'
40+
41+
# Minimum version of the common language runtime (CLR) required by this module
42+
CLRVersion='4.0'
43+
44+
# Processor architecture (None, X86, Amd64, IA64) required by this module
45+
ProcessorArchitecture = 'None'
46+
47+
# Modules that must be imported into the global environment prior to importing this module
48+
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.1'})
49+
50+
# Assemblies that must be loaded prior to importing this module
51+
RequiredAssemblies = @()
52+
53+
# Script files (.ps1) that are run in the caller's environment prior to importing this module
54+
ScriptsToProcess = @()
55+
56+
# Type files (.ps1xml) to be loaded when importing this module
57+
TypesToProcess = @()
58+
59+
# Format files (.ps1xml) to be loaded when importing this module
60+
FormatsToProcess = @()
61+
62+
# Modules to import as nested modules of the module specified in ModuleToProcess
63+
NestedModules = @(
64+
'.\Microsoft.Azure.Commands.RecoveryServices.ARM.dll'
65+
)
66+
67+
# Functions to export from this module
68+
FunctionsToExport = '*'
69+
70+
# Cmdlets to export from this module
71+
CmdletsToExport = '*'
72+
73+
# Variables to export from this module
74+
VariablesToExport = '*'
75+
76+
# Aliases to export from this module
77+
AliasesToExport = @()
78+
79+
# List of all modules packaged with this module
80+
ModuleList = @()
81+
82+
# List of all files packaged with this module
83+
FileList = @()
84+
85+
# Private data to pass to the module specified in ModuleToProcess
86+
PrivateData = ''
87+
88+
}
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\..\packages\xunit.runner.visualstudio.2.1.0-beta4-build1109\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\..\packages\xunit.runner.visualstudio.2.1.0-beta4-build1109\build\net20\xunit.runner.visualstudio.props')" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{6C7D3D81-37AB-445E-8081-78A1FEC0A773}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>Microsoft.Azure.Commands.RecoveryServicesArm.Test</RootNamespace>
12+
<AssemblyName>Microsoft.Azure.Commands.RecoveryServicesArm.Test</AssemblyName>
13+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
16+
<RestorePackages>true</RestorePackages>
17+
<NuGetPackageImportStamp>0df6d68c</NuGetPackageImportStamp>
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
38+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.4.0-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
39+
<Private>True</Private>
40+
</Reference>
41+
<Reference Include="Hyak.Common">
42+
<HintPath>..\..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
43+
</Reference>
44+
<Reference Include="Microsoft.Azure.Common">
45+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
46+
</Reference>
47+
<Reference Include="Microsoft.Azure.Common.NetFramework">
48+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
49+
</Reference>
50+
<Reference Include="Microsoft.Azure.Management.RecoveryServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.1.0.1-preview\lib\net40\Microsoft.Azure.Management.RecoveryServices.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
54+
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55+
<SpecificVersion>False</SpecificVersion>
56+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.7-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
57+
</Reference>
58+
<Reference Include="Microsoft.Azure.Test.Framework, Version=1.0.5774.40163, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
59+
<SpecificVersion>False</SpecificVersion>
60+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.5774.40163-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
61+
<Private>True</Private>
62+
</Reference>
63+
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
64+
<SpecificVersion>False</SpecificVersion>
65+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5774.40163-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
66+
<Private>True</Private>
67+
</Reference>
68+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
69+
<SpecificVersion>False</SpecificVersion>
70+
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
71+
</Reference>
72+
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms">
73+
<SpecificVersion>False</SpecificVersion>
74+
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
75+
</Reference>
76+
<Reference Include="Microsoft.Rest.ClientRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77+
<SpecificVersion>False</SpecificVersion>
78+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.3.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
79+
<Private>True</Private>
80+
</Reference>
81+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
82+
<SpecificVersion>False</SpecificVersion>
83+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.9.3\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
84+
<Private>True</Private>
85+
</Reference>
86+
<Reference Include="Microsoft.Threading.Tasks">
87+
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
88+
</Reference>
89+
<Reference Include="Microsoft.Threading.Tasks.Extensions">
90+
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
91+
</Reference>
92+
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
93+
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
94+
</Reference>
95+
<Reference Include="Microsoft.WindowsAzure.Management">
96+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
97+
</Reference>
98+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
99+
<SpecificVersion>False</SpecificVersion>
100+
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
101+
<Private>True</Private>
102+
</Reference>
103+
<Reference Include="System" />
104+
<Reference Include="System.Core" />
105+
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
106+
<Reference Include="System.Net" />
107+
<Reference Include="System.Net.Http" />
108+
<Reference Include="System.Net.Http.Extensions">
109+
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll</HintPath>
110+
<Private>True</Private>
111+
</Reference>
112+
<Reference Include="System.Net.Http.Primitives">
113+
<HintPath>..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll</HintPath>
114+
<Private>True</Private>
115+
</Reference>
116+
<Reference Include="System.Net.Http.WebRequest" />
117+
<Reference Include="System.Runtime.Serialization" />
118+
<Reference Include="System.Xml.Linq" />
119+
<Reference Include="System.Data.DataSetExtensions" />
120+
<Reference Include="Microsoft.CSharp" />
121+
<Reference Include="System.Data" />
122+
<Reference Include="System.Xml" />
123+
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
124+
<HintPath>..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
125+
<Private>True</Private>
126+
</Reference>
127+
<Reference Include="xunit.extensions, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
128+
<HintPath>..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll</HintPath>
129+
<Private>True</Private>
130+
</Reference>
131+
</ItemGroup>
132+
<ItemGroup>
133+
<Compile Include="Properties\AssemblyInfo.cs" />
134+
<Compile Include="ScenarioTests\RecoveryServicesTests.cs" />
135+
<Compile Include="ScenarioTests\RecoveryServicesTestsBase.cs" />
136+
</ItemGroup>
137+
<ItemGroup>
138+
<None Include="packages.config" />
139+
<None Include="ScenarioTests\RecoveryServicesTests.ps1">
140+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
141+
</None>
142+
<None Include="SessionRecords\Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests\VaultCRUDTests.json">
143+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
144+
</None>
145+
</ItemGroup>
146+
<ItemGroup>
147+
<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
148+
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
149+
<Name>Commands.Common</Name>
150+
</ProjectReference>
151+
<ProjectReference Include="..\..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj">
152+
<Project>{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}</Project>
153+
<Name>Commands.ResourceManager.Common</Name>
154+
</ProjectReference>
155+
<ProjectReference Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\Commands.ScenarioTests.ResourceManager.Common.csproj">
156+
<Project>{3436a126-edc9-4060-8952-9a1be34cdd95}</Project>
157+
<Name>Commands.ScenarioTests.ResourceManager.Common</Name>
158+
</ProjectReference>
159+
<ProjectReference Include="..\Commands.RecoveryServices\Commands.RecoveryServices.csproj">
160+
<Project>{7c879645-31ee-4a78-ad81-5512300fa104}</Project>
161+
<Name>Commands.RecoveryServices</Name>
162+
</ProjectReference>
163+
</ItemGroup>
164+
<ItemGroup>
165+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
166+
</ItemGroup>
167+
<ItemGroup />
168+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
169+
<Import Project="..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
170+
</Project>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
using Xunit;
5+
6+
// General Information about an assembly is controlled through the following
7+
// set of attributes. Change these attribute values to modify the information
8+
// associated with an assembly.
9+
[assembly: AssemblyTitle("Microsoft.Azure.Commands.SiteRecovery.Test")]
10+
[assembly: AssemblyDescription("")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("Hewlett-Packard Company")]
13+
[assembly: AssemblyProduct("Commands.SiteRecovery.Test")]
14+
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard Company 2015")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
18+
// Setting ComVisible to false makes the types in this assembly not visible
19+
// to COM components. If you need to access a type in this assembly from
20+
// COM, set the ComVisible attribute to true on that type.
21+
[assembly: ComVisible(false)]
22+
23+
// The following GUID is for the ID of the typelib if this project is exposed to COM
24+
[assembly: Guid("53c5f637-216c-44d5-ab19-c133cf33bb8d")]
25+
26+
// Version information for an assembly consists of the following four values:
27+
//
28+
// Major Version
29+
// Minor Version
30+
// Build Number
31+
// Revision
32+
//
33+
// You can specify all the values or you can default the Build and Revision Numbers
34+
// by using the '*' as shown below:
35+
// [assembly: AssemblyVersion("1.0.*")]
36+
[assembly: AssemblyVersion("1.0.1.0")]
37+
[assembly: AssemblyFileVersion("1.0.1.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
16+
using Xunit;
17+
18+
namespace Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests
19+
{
20+
public class RecoveryServicesTests : RecoveryServicesTestsBase
21+
{
22+
[Fact]
23+
[Trait(Category.AcceptanceType, Category.CheckIn)]
24+
public void VaultCRUDTests()
25+
{
26+
this.RunPowerShellTest("Test-RecoveryServicesVaultCRUDTests");
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
########################## Recovery Services Tests #############################
16+
17+
<#
18+
.SYNOPSIS
19+
Recovery Services Vault CRUD Tests
20+
#>
21+
function Test-RecoveryServicesVaultCRUDTests
22+
{
23+
# Create vault
24+
$vaultCreationResponse = New-AzureRmRecoveryServicesVault -Name rsv1 -ResouceGroupName testsitegroup -Location westus
25+
Assert-NotNull($vaultCreationResponse.Name)
26+
Assert-NotNull($vaultCreationResponse.ID)
27+
Assert-NotNull($vaultCreationResponse.Type)
28+
29+
# Enumerate Vaults
30+
$vaults = Get-AzureRmRecoveryServicesVault
31+
Assert-True { $vaults.Count -gt 0 }
32+
Assert-NotNull($vaults)
33+
foreach($vault in $vaults)
34+
{
35+
Assert-NotNull($vault.Name)
36+
Assert-NotNull($vault.ID)
37+
Assert-NotNull($vault.Type)
38+
}
39+
40+
# Get the created vault
41+
$vaultToBeRemoved = Get-AzureRmRecoveryServicesVault -ResourceGroupName testsitegroup -Name rsv1
42+
Assert-NotNull($vaultToBeRemoved.Name)
43+
Assert-NotNull($vaultToBeRemoved.ID)
44+
Assert-NotNull($vaultToBeRemoved.Type)
45+
46+
# Download Vault settings file
47+
Get-AzureRmRecoveryServicesVaultSettingsFile -Vault $vaultToBeRemoved
48+
49+
# Remove Vault
50+
Remove-AzureRmRecoveryServicesVault -Vault $vaultToBeRemoved
51+
$vaults = Get-AzureRmRecoveryServicesVault -ResourceGroupName testsitegroup -Name rsv1
52+
Assert-True { $vaults.Count -eq 0 }
53+
}

0 commit comments

Comments
 (0)