Skip to content

Commit bc093a1

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into de
2 parents ab23f61 + e1653a2 commit bc093a1

File tree

69 files changed

+15806
-7920
lines changed

Some content is hidden

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

69 files changed

+15806
-7920
lines changed

ChangeLog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 2015.10.09 version 1.0 preview
1+
* Azure Redis Cache
2+
* Set-AzureRedisCache - Premium and vNet support for redis cache
3+
* New-AzureRedisCache - Premium and vNet support for redis cache
4+
5+
## 2015.10.09 version 1.0 preview
26
* Azure Resource Manager Management Cmdlets
37
* New-AzureRmResourceGroup - Removed the template deployment parameters from this cmdlet. Template deployment will now be
48
handled only through the New-AzureRmResourceGroupDeployment

src/Common/Commands.Common/AzurePSCmdlet.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
using System.IO;
2626
using System.Management.Automation.Host;
2727
using System.Text;
28+
using System.Linq;
2829
using System.Threading;
2930

3031
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
@@ -160,7 +161,10 @@ public static bool IsDataCollectionAllowed()
160161
protected bool CheckIfInteractive()
161162
{
162163
bool interactive = true;
163-
if (this.Host == null || this.Host.UI == null || this.Host.UI.RawUI == null)
164+
if (this.Host == null ||
165+
this.Host.UI == null ||
166+
this.Host.UI.RawUI == null ||
167+
Environment.GetCommandLineArgs().Any(s => s.Equals("-NonInteractive", StringComparison.OrdinalIgnoreCase)))
164168
{
165169
interactive = false;
166170
}

src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureVMDiagnosticsExtension.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
using Microsoft.Azure.Management.Compute.Models;
2222
using Microsoft.WindowsAzure.Commands.Common.Storage;
2323
using Microsoft.WindowsAzure.Commands.Utilities.Common;
24-
using Microsoft.WindowsAzure.Management.Storage;
24+
using Microsoft.Azure.Commands.Management.Storage;
25+
using Microsoft.Azure.Management.Storage;
2526
using Newtonsoft.Json;
2627

2728
namespace Microsoft.Azure.Commands.Compute
@@ -37,7 +38,7 @@ public class SetAzureVMDiagnosticsExtensionCommand : VirtualMachineExtensionBase
3738
private const string VirtualMachineExtension = "Microsoft.Compute/virtualMachines/extensions";
3839
private const string IaaSDiagnosticsExtension = "IaaSDiagnostics";
3940
private const string ExtensionPublisher = "Microsoft.Azure.Diagnostics";
40-
private StorageManagementClient storageClient;
41+
private IStorageManagementClient storageClient;
4142

4243
[Parameter(
4344
Mandatory = true,
@@ -154,14 +155,14 @@ public string PrivateConfiguration
154155
}
155156
}
156157

157-
public StorageManagementClient StorageClient
158+
public IStorageManagementClient StorageClient
158159
{
159160
get
160161
{
161162
if (this.storageClient == null)
162163
{
163164
this.storageClient = AzureSession.ClientFactory.CreateClient<StorageManagementClient>(
164-
DefaultProfile.Context, AzureEnvironment.Endpoint.ServiceManagement);
165+
DefaultProfile.Context, AzureEnvironment.Endpoint.ResourceManager);
165166
}
166167

167168
return this.storageClient;
@@ -201,15 +202,8 @@ protected string GetStorageKey()
201202

202203
if (!string.IsNullOrEmpty(StorageAccountName))
203204
{
204-
var storageAccount = this.StorageClient.StorageAccounts.Get(StorageAccountName);
205-
if (storageAccount != null)
206-
{
207-
var keys = this.StorageClient.StorageAccounts.GetKeys(StorageAccountName);
208-
if (keys != null)
209-
{
210-
storageKey = !string.IsNullOrEmpty(keys.PrimaryKey) ? keys.PrimaryKey : keys.SecondaryKey;
211-
}
212-
}
205+
var storageCredentials = StorageUtilities.GenerateStorageCredentials(this.StorageClient, this.ResourceGroupName, this.StorageAccountName);
206+
storageKey = storageCredentials.ExportBase64EncodedKey();
213207
}
214208

215209
return storageKey;
Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
1-
#
2-
# Module manifest for module 'Microsoft.Azure.Commands.Network'
3-
#
4-
# Generated by: Microsoft Corporation
5-
#
1+
#
2+
# Module manifest for module 'Microsoft.Azure.Commands.Network'
3+
#
4+
# Generated by: Microsoft Corporation
5+
#
66
# Generated on: 9/19/2015
7-
#
8-
9-
@{
10-
11-
# Version number of this module.
12-
ModuleVersion = '0.10.0'
13-
14-
# ID used to uniquely identify this module
15-
GUID = 'eb75c732-e274-4a20-b502-e9958e63484a'
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 - Network service 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
7+
#
8+
9+
@{
10+
11+
# Version number of this module.
12+
ModuleVersion = '0.10.1'
13+
14+
# ID used to uniquely identify this module
15+
GUID = 'eb75c732-e274-4a20-b502-e9958e63484a'
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 - Network service 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
4848
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'})
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
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
5757
TypesToProcess = @()
58-
59-
# Format files (.ps1xml) to be loaded when importing this module
58+
59+
# Format files (.ps1xml) to be loaded when importing this module
6060
FormatsToProcess = @(
6161
'.\Microsoft.Azure.Commands.Network.format.ps1xml'
6262
)
63-
64-
# Modules to import as nested modules of the module specified in ModuleToProcess
65-
NestedModules = @(
63+
64+
# Modules to import as nested modules of the module specified in ModuleToProcess
65+
NestedModules = @(
6666
'.\Microsoft.Azure.Commands.Network.dll'
6767
)
68-
69-
# Functions to export from this module
70-
FunctionsToExport = '*'
71-
72-
# Cmdlets to export from this module
73-
CmdletsToExport = '*'
74-
75-
# Variables to export from this module
76-
VariablesToExport = '*'
77-
78-
# Aliases to export from this module
68+
69+
# Functions to export from this module
70+
FunctionsToExport = '*'
71+
72+
# Cmdlets to export from this module
73+
CmdletsToExport = '*'
74+
75+
# Variables to export from this module
76+
VariablesToExport = '*'
77+
78+
# Aliases to export from this module
7979
AliasesToExport = @()
80-
81-
# List of all modules packaged with this module
82-
ModuleList = @()
83-
84-
# List of all files packaged with this module
85-
FileList = @()
86-
87-
# Private data to pass to the module specified in ModuleToProcess
88-
PrivateData = ''
89-
90-
}
80+
81+
# List of all modules packaged with this module
82+
ModuleList = @()
83+
84+
# List of all files packaged with this module
85+
FileList = @()
86+
87+
# Private data to pass to the module specified in ModuleToProcess
88+
PrivateData = ''
89+
90+
}

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/AddAzureExpressRouteCircuitPeeringConfigCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ protected override void ProcessRecord()
5252
peering.PeeringType = this.PeeringType;
5353
peering.PrimaryPeerAddressPrefix = this.PrimaryPeerAddressPrefix;
5454
peering.SecondaryPeerAddressPrefix = this.SecondaryPeerAddressPrefix;
55-
peering.AzureASN = this.AzureASN;
5655
peering.PeerASN = this.PeerASN;
5756
peering.VlanId = this.VlanId;
5857

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/AzureExpressRouteCircuitPeeringConfigBase.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ public class AzureExpressRouteCircuitPeeringConfigBase : NetworkBaseCmdlet
4444
[ValidateNotNullOrEmpty]
4545
public int PeerASN { get; set; }
4646

47-
[Parameter(
48-
Mandatory = false,
49-
HelpMessage = "The AzureASN")]
50-
[ValidateNotNullOrEmpty]
51-
public int AzureASN { get; set; }
52-
5347
[Parameter(
5448
Mandatory = true,
5549
HelpMessage = "The PrimaryPeerAddressPrefix")]

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/NewAzureExpressRouteCircuitPeeringConfigCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ protected override void ProcessRecord()
3838
peering.PeeringType = this.PeeringType;
3939
peering.PrimaryPeerAddressPrefix = this.PrimaryPeerAddressPrefix;
4040
peering.SecondaryPeerAddressPrefix = this.SecondaryPeerAddressPrefix;
41-
peering.AzureASN = this.AzureASN;
4241
peering.PeerASN = this.PeerASN;
4342
peering.VlanId = this.VlanId;
4443

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/Peering/SetAzureExpressRouteCircuitPeeringConfigCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ protected override void ProcessRecord()
5050
peering.PeeringType = this.PeeringType;
5151
peering.PrimaryPeerAddressPrefix = this.PrimaryPeerAddressPrefix;
5252
peering.SecondaryPeerAddressPrefix = this.SecondaryPeerAddressPrefix;
53-
peering.AzureASN = this.AzureASN;
5453
peering.PeerASN = this.PeerASN;
5554
peering.VlanId = this.VlanId;
5655

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/SetAzureExpressRouteCircuitCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ protected override void ProcessRecord()
4141
}
4242

4343
// Map to the sdk object
44-
var erModel = Mapper.Map<MNM.ExpressRouteCircuit>(this.ExpressRouteCircuit);
45-
erModel.Type = Microsoft.Azure.Commands.Network.Properties.Resources.ExpressRouteCircuitType;
46-
erModel.Tags = TagsConversionHelper.CreateTagDictionary(this.ExpressRouteCircuit.Tag, validate: true);
44+
var circuitModel = Mapper.Map<MNM.ExpressRouteCircuit>(this.ExpressRouteCircuit);
45+
circuitModel.Type = Microsoft.Azure.Commands.Network.Properties.Resources.ExpressRouteCircuitType;
46+
circuitModel.Tags = TagsConversionHelper.CreateTagDictionary(this.ExpressRouteCircuit.Tag, validate: true);
4747

4848
// Execute the Create ExpressRouteCircuit call
49-
this.ExpressRouteCircuitClient.CreateOrUpdate(this.ExpressRouteCircuit.ResourceGroupName, this.ExpressRouteCircuit.Name, erModel);
49+
this.ExpressRouteCircuitClient.CreateOrUpdate(this.ExpressRouteCircuit.ResourceGroupName, this.ExpressRouteCircuit.Name, circuitModel);
5050

5151
var getExpressRouteCircuit = this.GetExpressRouteCircuit(this.ExpressRouteCircuit.ResourceGroupName, this.ExpressRouteCircuit.Name);
5252
WriteObject(getExpressRouteCircuit);

src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-Help.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '0.9.10'
12+
ModuleVersion = '0.10.1'
1313

1414
# ID used to uniquely identify this module
1515
GUID = 'B37DCEB6-F8A8-4C76-B1FC-9C35DFE08977'
@@ -21,7 +21,7 @@ Author = 'Microsoft Corporation'
2121
CompanyName = 'Microsoft Corporation'
2222

2323
# Copyright statement for this module
24-
Copyright = 'Microsoft Corporation. All rights reserved.'
24+
Copyright = 'Microsoft Corporation. All rights reserved.'
2525

2626
# Description of the functionality provided by this module
2727
Description = ''

src/ResourceManager/Network/Commands.Network/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
[assembly: ComVisible(false)]
2626
[assembly: CLSCompliant(false)]
2727
[assembly: Guid("be2ca022-590c-48ba-b465-9ab61d6e2ea0")]
28-
[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)]
29-
[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)]
28+
[assembly: AssemblyVersion("0.10.1")]
29+
[assembly: AssemblyFileVersion("0.10.1")]
3030
#if SIGN
3131
[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Network.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
3232
#else
3333
[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Network.Test")]
34-
#endif
34+
#endif

src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace Microsoft.Azure.Commands.Network
2626
{
27-
[Cmdlet(VerbsCommon.New, "AzureRmVirtualNetworkGatewayConnection"), OutputType(typeof(PSVirtualNetworkGatewayConnection))]
27+
[Cmdlet(VerbsCommon.New, "AzureRmVirtualNetworkGatewayConnection", DefaultParameterSetName = "SetByResource"), OutputType(typeof(PSVirtualNetworkGatewayConnection))]
2828
public class NewAzureVirtualNetworkGatewayConnectionCommand : VirtualNetworkGatewayConnectionBaseCmdlet
2929
{
3030
[Alias("ResourceName")]

src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
<Reference Include="Microsoft.Azure.Common.NetFramework">
5757
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5858
</Reference>
59-
<Reference Include="Microsoft.Azure.Management.Redis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
60-
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.1.0.1-preview\lib\net40\Microsoft.Azure.Management.Redis.dll</HintPath>
59+
<Reference Include="Microsoft.Azure.Management.Redis, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
60+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.1.1.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll</HintPath>
61+
<Private>True</Private>
6262
</Reference>
6363
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>
@@ -171,9 +171,18 @@
171171
<None Include="ScenarioTests\RedisCacheTests.ps1">
172172
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
173173
</None>
174+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestCreateExistingRedisCacheTest.json">
175+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
176+
</None>
174177
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCache.json">
175178
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
176179
</None>
180+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCacheClustering.json">
181+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
182+
</None>
183+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCacheParameterDeprecated.json">
184+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
185+
</None>
177186
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCachePipeline.json">
178187
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
179188
</None>

src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,12 @@ public void TestMaxMemoryPolicyErrorCheck()
5454
{
5555
RunPowerShellTest("Test-MaxMemoryPolicyErrorCheck");
5656
}
57+
58+
[Fact]
59+
[Trait(Category.AcceptanceType, Category.CheckIn)]
60+
public void TestRedisCacheClustering()
61+
{
62+
RunPowerShellTest("Test-RedisCacheClustering");
63+
}
5764
}
5865
}

0 commit comments

Comments
 (0)