Skip to content

HPF PR: dev <- Azure:dev #558

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 36 commits into from
Jun 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
07c8a16
new helpfile
hchungmsft Mar 15, 2016
e53e3cd
initial implementation
hchungmsft Mar 16, 2016
c6bf469
Merge branch 'dev' of https://github.com/Azure/azure-powershell into …
hchungmsft Mar 16, 2016
fb1c57e
add test outlines
hchungmsft Mar 17, 2016
085bc06
renames
hchungmsft Mar 23, 2016
ed9161b
update names
hchungmsft Apr 12, 2016
d38cd0b
implement tests, rename to LTR
hchungmsft Apr 13, 2016
a8afbb5
add new nuget
hchungmsft May 25, 2016
78cb4ff
merge
hchungmsft May 25, 2016
14d1adc
merge
hchungmsft May 25, 2016
fd44bd3
add private flag
hchungmsft May 25, 2016
6143072
add session records
hchungmsft May 26, 2016
404c79e
add LTR restore test
hchungmsft Jun 3, 2016
8259950
resolve conflicts
hchungmsft Jun 3, 2016
7829ccb
undo downgrade
hchungmsft Jun 3, 2016
0398f0f
use string for state to match API
hchungmsft Jun 6, 2016
104c86f
add helpfile, bump sdk versions
hchungmsft Jun 13, 2016
dc1744e
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hchungmsft Jun 13, 2016
7559894
remove reference to unimplemented feature
hchungmsft Jun 13, 2016
fb384d3
Update ChangeLog.md
hchungmsft Jun 17, 2016
75a21be
Update ChangeLog.md
hchungmsft Jun 17, 2016
5c99d39
fixes of obvious code mistakes
DamirAinullin Jun 18, 2016
b3247c4
comments from @markcowl
hchungmsft Jun 20, 2016
5f561ec
Merge branch 'dev' of github.com:hchungmsft/azure-powershell into dev
hchungmsft Jun 20, 2016
f9019f6
remove localfeed from gitignore
hchungmsft Jun 20, 2016
99ff055
add more line breaks
hchungmsft Jun 20, 2016
3eb5890
add id alias
hchungmsft Jun 21, 2016
9374e9f
add shouldprocess to set cmdlets
hchungmsft Jun 21, 2016
b4427a0
Add missing test projects to checkin test library
markcowl Jun 22, 2016
de3555e
Fixing path type in test directory name
markcowl Jun 22, 2016
c72c83c
Remove test dlls with test failures
markcowl Jun 22, 2016
348fdaa
Remove AzureStack tests
markcowl Jun 22, 2016
5b5a9ac
Update AzurePowershell.Test.targets
markcowl Jun 22, 2016
1fcc992
Merge pull request #2403 from hchungmsft/dev
markcowl Jun 23, 2016
36190d4
Merge pull request #2475 from DamirAinullin/dev
markcowl Jun 23, 2016
69b4196
Merge pull request #2496 from Azure/checkin-test
markcowl Jun 23, 2016
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
13 changes: 13 additions & 0 deletions AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@
<XUnitTests Include=".\src\ResourceManager\NotificationHubs\Commands.NotificationHubs.Test\bin\Debug\Microsoft.Azure.Commands.NotificationHubs.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Cdn\Commands.Cdn.Test\bin\Debug\Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.dll"/>
<XUnitTests Include=".\src\ResourceManager\CognitiveServices\CognitiveServices.Test\bin\Debug\Microsoft.Azure.Commands.Management.CognitiveServices.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Automation\Commands.Automation.Test\bin\Debug\Microsoft.Azure.Commands.ResourceManager.Automation.Test.dll"/>
<!-- <XUnitTests Include=".\src\ResourceManager\AzureStackAdmin\Commands.AzureStackAdmin.Test\bin\Debug\Microsoft.AzureStack.Commands.Admin.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\AzureStackStorage\Commands.AzureStackStorage.Tests\bin\Debug\Microsoft.AzureStack.Commands.StorageAdmin.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\DataLakeAnalytics\Commands.DataLakeAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.DataLakeAnalytics.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\DataLakeStore\Commands.DataLakeStore.Test\bin\Debug\Microsoft.Azure.Commands.DataLake.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\DevTestLabs\Commands.DevTestLabs.Test\bin\Debug\Microsoft.Azure.Commands.DevTestLabs.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\HDInsight\Commands.HDInsight.Test\bin\Debug\Commands.HDInsight.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Insights\Commands.Insights.Test\bin\Debug\Microsoft.Azure.Commands.Insights.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServicesArm.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\RecoveryServices.Backup\Commands.RecoveryServices.Backup.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Backup.Test.dll"/> -->
<XUnitTests Include=".\src\ResourceManager\RedisCache\Commands.RedisCache.Test\bin\Debug\Microsoft.Azure.Commands.RedisCache.Test.dll"/>
<!--<XUnitTests Include=".\src\ResourceManager\ServerManagement\Commands.ServerManagement.Test\bin\Debug\Microsoft.Azure.Commands.ServerManagement.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Storage\Commands.Management.Storage.Test\bin\Debug\Microsoft.Azure.Commands.Management.Storage.Test.dll"/>-->
<XUnitTests Include=".\src\Common\Commands.Common.Authentication.Test\bin\Debug\Microsoft.Azure.Commands.Common.Authentication.Test.dll"/>
<XUnitTests Include="@(AsmXUnitTests)"/>
</ItemGroup>
Expand Down
12 changes: 11 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
##2016.07.04 version 1.6.0
* Azure SQL DB Backup/Restore
* Cmdlets for LTR (Long Term Retention) backup feature
* Get-AzureRmSqlServerBackupLongTermRetentionVault
* Get-AzureRmSqlDatabaseBackupLongTermRetentionPolicy
* Set-AzureRmSqlServerBackupLongTermRetentionVault
* Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy
* Restore-AzureRmSqlDatabase now supports point-in-time restore of a deleted database
* Restore-AzureRmSqlDatabase now supports restoring from a Long Term Retention backup

##2016.06.01 version 1.5.0
* Azure Resource Manager
- (Get/Set/New/Remove)-AzureRmResourceGroup cmdlets will now use the new autorest generated ARM assembly
Expand Down Expand Up @@ -279,7 +289,7 @@
- New-AzureStorageShareSASToken
- New-AzureStorageQueueSASToken
- New-AzureStorageTableSASToken
* Azure SQL DB Backup/restore
* Azure SQL DB Backup/Restore
* Get-AzureRmSqlDatabaseGeoBackup
* Get-AzureRmSqlDeletedDatabaseBackup
* Restore-AzureRmSqlDatabase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ public CredentialInfo CreateCredential(string resourceGroupName, string automati

if (createdCredential == null || createdCredential.StatusCode != HttpStatusCode.Created)
{
new AzureAutomationOperationException(string.Format(Resources.AutomationOperationFailed, "Create",
throw new AzureAutomationOperationException(string.Format(Resources.AutomationOperationFailed, "Create",
"credential", name, automationAccountName));
}
return new CredentialInfo(resourceGroupName, automationAccountName, createdCredential.Credential);
Expand All @@ -891,7 +891,7 @@ public CredentialInfo UpdateCredential(string resourceGroupName, string automati

if (credential == null || credential.StatusCode != HttpStatusCode.OK)
{
new AzureAutomationOperationException(string.Format(Resources.AutomationOperationFailed, "Update",
throw new AzureAutomationOperationException(string.Format(Resources.AutomationOperationFailed, "Update",
"credential", name, automationAccountName));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public override void ExecuteCmdlet()
throw new Exception(Resources.AzureBackupJobArguementException);
}
WriteDebug(Resources.SettingStartTime);
From = new DateTime();
From = AzureBackupJobHelper.MinimumAllowedDate;
}

Expand All @@ -112,7 +111,6 @@ public override void ExecuteCmdlet()
else
{
WriteDebug(Resources.SettingEndTime);
To = new DateTime();
To = AzureBackupJobHelper.MinimumAllowedDate;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public override void ExecuteCmdlet()
{
if (!TimeOut.HasValue)
{
TimeOut = new long();
TimeOut = Int64.MaxValue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ public void ListBatchTasksODataTest()
};

RequestInterceptor requestInterceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(responseToUse: response, requestAction: extractTaskListAction);
cmdlet.AdditionalBehaviors = new List<BatchClientBehavior>() { requestInterceptor };

cmdlet.AdditionalBehaviors = new List<BatchClientBehavior>() { requestInterceptor };
cmdlet.AdditionalBehaviors = new List<BatchClientBehavior> { requestInterceptor };

cmdlet.ExecuteCmdlet();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static void Print(object obj, string name, string currentIndent, StringB

ICollection objAsCollection = obj as ICollection;

propName.Replace(':', ' ');
propName = propName.Replace(':', ' ');
if (!string.IsNullOrWhiteSpace(propName))
{
sb.AppendLine(propName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,61 +162,51 @@ private PSApplicationGateway CreateApplicationGateway()

if (this.GatewayIPConfigurations != null)
{
applicationGateway.GatewayIPConfigurations = new List<PSApplicationGatewayIPConfiguration>();
applicationGateway.GatewayIPConfigurations = this.GatewayIPConfigurations;
}

if (this.SslCertificates != null)
{
applicationGateway.SslCertificates = new List<PSApplicationGatewaySslCertificate>();
applicationGateway.SslCertificates = this.SslCertificates;
}

if (this.FrontendIPConfigurations != null)
{
applicationGateway.FrontendIPConfigurations = new List<PSApplicationGatewayFrontendIPConfiguration>();
applicationGateway.FrontendIPConfigurations = this.FrontendIPConfigurations;
}

if (this.FrontendPorts != null)
{
applicationGateway.FrontendPorts = new List<PSApplicationGatewayFrontendPort>();
applicationGateway.FrontendPorts = this.FrontendPorts;
}

if (this.Probes != null)
{
applicationGateway.Probes = new List<PSApplicationGatewayProbe>();
applicationGateway.Probes = this.Probes;
}

if (this.BackendAddressPools != null)
{
applicationGateway.BackendAddressPools = new List<PSApplicationGatewayBackendAddressPool>();
applicationGateway.BackendAddressPools = this.BackendAddressPools;
}

if (this.BackendHttpSettingsCollection != null)
{
applicationGateway.BackendHttpSettingsCollection = new List<PSApplicationGatewayBackendHttpSettings>();
applicationGateway.BackendHttpSettingsCollection = this.BackendHttpSettingsCollection;
}

if (this.HttpListeners != null)
{
applicationGateway.HttpListeners = new List<PSApplicationGatewayHttpListener>();
applicationGateway.HttpListeners = this.HttpListeners;
}

if (this.UrlPathMaps != null)
{
applicationGateway.UrlPathMaps = new List<PSApplicationGatewayUrlPathMap>();
applicationGateway.UrlPathMaps = this.UrlPathMaps;
}

if (this.RequestRoutingRules != null)
{
applicationGateway.RequestRoutingRules = new List<PSApplicationGatewayRequestRoutingRule>();
applicationGateway.RequestRoutingRules = this.RequestRoutingRules;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ private PSExpressRouteCircuit CreateExpressRouteCircuit()
circuit.ServiceProviderProperties.BandwidthInMbps = this.BandwidthInMbps;
}

circuit.Peerings = new List<PSPeering>();
circuit.Peerings = this.Peering;
circuit.Authorizations = new List<PSExpressRouteCircuitAuthorization>();
circuit.Authorizations = this.Authorization;
circuit.AllowClassicOperations = this.AllowClassicOperations;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,37 +130,31 @@ private PSLoadBalancer CreateLoadBalancer()

if (this.FrontendIpConfiguration != null)
{
loadBalancer.FrontendIpConfigurations = new List<PSFrontendIPConfiguration>();
loadBalancer.FrontendIpConfigurations = this.FrontendIpConfiguration;
}

if (this.BackendAddressPool != null)
{
loadBalancer.BackendAddressPools = new List<PSBackendAddressPool>();
loadBalancer.BackendAddressPools = this.BackendAddressPool;
}

if (this.Probe != null)
{
loadBalancer.Probes = new List<PSProbe>();
loadBalancer.Probes = this.Probe;
}

if (this.InboundNatRule != null)
{
loadBalancer.InboundNatRules = new List<PSInboundNatRule>();
loadBalancer.InboundNatRules = this.InboundNatRule;
}

if (this.LoadBalancingRule != null)
{
loadBalancer.LoadBalancingRules = new List<PSLoadBalancingRule>();
loadBalancer.LoadBalancingRules = this.LoadBalancingRule;
}

if (this.InboundNatPool != null)
{
loadBalancer.InboundNatPools = new List<PSInboundNatPool>();
loadBalancer.InboundNatPools = this.InboundNatPool;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ private PSVirtualNetwork CreateVirtualNetwork()
vnet.DhcpOptions.DnsServers = this.DnsServer;
}

vnet.Subnets = new List<PSSubnet>();
vnet.Subnets = this.Subnet;

// Map to the sdk object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ private PSVirtualNetworkGateway CreateVirtualNetworkGateway()

if (this.IpConfigurations != null)
{
vnetGateway.IpConfigurations = new List<PSVirtualNetworkGatewayIpConfiguration>();
vnetGateway.IpConfigurations = this.IpConfigurations;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ public PSSearchListSavedSearchResponse()

public PSSearchListSavedSearchResponse(SearchListSavedSearchResponse searchResponse)
{
if (searchResponse != null)
if (searchResponse == null)
{
if (searchResponse == null)
{
throw new ArgumentNullException("saved search response");
}
SearchMetadata m = searchResponse.Metadata;
this.Metadata = new PSSearchMetadata(searchResponse.Metadata);
this.Value = new List<PSSavedSearchValue>();
foreach (SavedSearchValue v in searchResponse.Value)
{
this.Value.Add(new PSSavedSearchValue(v));
}
throw new ArgumentNullException("saved search response");
}

SearchMetadata m = searchResponse.Metadata;
this.Metadata = new PSSearchMetadata(searchResponse.Metadata);
this.Value = new List<PSSavedSearchValue>();
foreach (SavedSearchValue v in searchResponse.Value)
{
this.Value.Add(new PSSavedSearchValue(v));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,11 @@ private List<DeploymentOperation> GetNewOperations(List<DeploymentOperation> old
Enum.TryParse<HttpStatusCode>(operation.Properties.StatusCode, out statusCode);
if (!statusCode.IsClientFailureRequest())
{
List<DeploymentOperation> newNestedOperations = new List<DeploymentOperation>();

var result = ResourceManagementClient.DeploymentOperations.List(
resourceGroupName: ResourceIdUtility.GetResourceGroupName(operation.Properties.TargetResource.Id),
deploymentName: operation.Properties.TargetResource.ResourceName);

newNestedOperations = GetNewOperations(operations, result);
List<DeploymentOperation> newNestedOperations = GetNewOperations(operations, result);

foreach (DeploymentOperation op in newNestedOperations)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static class TemplateUtility
/// <returns>The template parameters</returns>
public static RuntimeDefinedParameterDictionary GetTemplateParametersFromFile(string templateFilePath, Hashtable templateParameterObject, string templateParameterFilePath, string[] staticParameters)
{
RuntimeDefinedParameterDictionary dynamicParameters = new RuntimeDefinedParameterDictionary();
string templateContent = null;

if (templateFilePath != null)
Expand All @@ -54,7 +53,7 @@ public static RuntimeDefinedParameterDictionary GetTemplateParametersFromFile(st
}
}

dynamicParameters = ParseTemplateAndExtractParameters(templateContent, templateParameterObject, templateParameterFilePath, staticParameters);
RuntimeDefinedParameterDictionary dynamicParameters = ParseTemplateAndExtractParameters(templateContent, templateParameterObject, templateParameterFilePath, staticParameters);

return dynamicParameters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private void StartPETestFailover()
}
else
{
new ArgumentException(Properties.Resources.UnsupportedDirectionForTFO);// Throw Unsupported Direction Exception
throw new ArgumentException(Properties.Resources.UnsupportedDirectionForTFO);// Throw Unsupported Direction Exception
}
}

Expand Down Expand Up @@ -290,7 +290,7 @@ private void StartRpTestFailover()
}
else
{
new ArgumentException(Properties.Resources.UnsupportedDirectionForTFO);// Throw Unsupported Direction Exception
throw new ArgumentException(Properties.Resources.UnsupportedDirectionForTFO);// Throw Unsupported Direction Exception
}
}
}
Expand Down
19 changes: 14 additions & 5 deletions src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Management.Sql">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.0.46.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.0.47.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.4.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
Expand Down Expand Up @@ -231,7 +231,7 @@
<None Include="ScenarioTests\ElasticPoolCrudTests.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\ImportExportTests.ps1">
<None Include="ScenarioTests\ImportExportTests.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Compile Include="ScenarioTests\LocationCapabilitiesTests.cs" />
Expand All @@ -248,8 +248,8 @@
<Compile Include="ScenarioTests\SqlTestsBase.cs" />
<Compile Include="ScenarioTests\TransparentDataEncryptionCrudTests.cs" />
<Compile Include="ScenarioTests\IndexRecommendationTests.cs" />
<Compile Include="ScenarioTests\ImportExportTests.cs" />
<Compile Include="UnitTests\AzureSqlDatabaseImportExportTests.cs" />
<Compile Include="ScenarioTests\ImportExportTests.cs" />
<Compile Include="UnitTests\AzureSqlDatabaseImportExportTests.cs" />
<Compile Include="UnitTests\AzureSqlCmdletBaseAttributeTests.cs" />
<Compile Include="UnitTests\AzureSqlDatabaseActivationAttributeTest.cs" />
<Compile Include="UnitTests\AzureSqlDatabaseAttributeTests.cs" />
Expand Down Expand Up @@ -431,6 +431,15 @@
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseBackupTests\TestRestorePointInTimeBackup.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseBackupTests\TestRestoreLongTermRetentionBackup.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseBackupTests\TestServerBackupLongTermRetentionVault.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseBackupTests\TestDatabaseBackupLongTermRetentionPolicy.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DatabaseCrudTests\TestDatabaseCreate.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -608,7 +617,7 @@
<None Include="Templates\sql-ddm-test-env-setup.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ImportExportTests\TestExportDatabase.json">
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ImportExportTests\TestExportDatabase.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ImportExportTests\TestImportDatabase.json">
Expand Down
Loading