Skip to content

Commit 41fe06f

Browse files
committed
Merge branch 'MoveRG' of https://github.com/vivsriaus/azure-powershell into MoveRG
Conflicts: src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommandTests.cs src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs
2 parents 3a634d6 + 7595081 commit 41fe06f

File tree

2,992 files changed

+267195
-93682
lines changed

Some content is hidden

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

2,992 files changed

+267195
-93682
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ Backup*/
181181
UpgradeLog*.XML
182182
UpgradeLog*.htm
183183

184+
# The Backup*/ rule will ignore the backup and restore cmdlets
185+
# for Azure web apps. Exclude that directory from being ignored here.
186+
!/src/ResourceManager/Websites/Commands.Websites/Cmdlets/BackupRestore
187+
184188
# SQL Server files
185189
*.mdf
186190
*.ldf

ChangeLog.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
##2016.05.03 version 1.4.0
1+
##2016.05.04 version 1.4.0
2+
* Azure Resource Manager
3+
- Get-AzureRmLocation cmdley: New cmdlet Lists all public Azure locatiosn with available provider namespaces
4+
- Get-AzureRMResourceGroupDeploymentOperations: Improved output format
5+
- Get-AzureRMDeployment: Responses contain all error details
6+
- Added cmdlet help anbd examples
7+
- Normalized cmdlet parameter defaults and position
28
* Azure Storage
3-
* Upgrade to Microsoft.Azure.Management.Storage nuget package v5.0 preview
49
* Add Encryption and Hot/Cool features support to resource mode storage account cmdlets
510
- New-AzureRmStorageAccount
611
- Set-AzureRmStorageAccount
@@ -14,6 +19,32 @@
1419
- New-AzureStorageShareSASToken
1520
- New-AzureStorageShareStoredAccessPolicy
1621
- Set-AzureStorageShareStoredAccessPolicy
22+
* Azure Compute
23+
* Added cmdlets for Contaner Service support
24+
* Bug and help fixes
25+
* Azure Profile
26+
* Added support for German national cloud (AzureGermanCloud)
27+
* Azure APIManagement
28+
* Added Tenant Git Configuration cmdlets
29+
- Get-AzureRmApiManagementTenantGitAccess
30+
- Set-AzureRmApiManagementTenantGitAccess
31+
- Get-AzureRmApiManagementTenantSyncState
32+
- Publish-AzureRmApiManagementTenantGitConfiguration
33+
- Save-AzureRmApiManagementTenantGitConfiguration
34+
* Added ApiManagement Properties cmdlets
35+
- Get-AzureRmApiManagementProperty
36+
- New-AzureRmApiManagementProperty
37+
- Remove-AzureRmApiManagementProperty
38+
- Set-AzureRmApiManagementProperty
39+
* Added Logger cmdlets
40+
- Get-AzureRmApiManagementLogger
41+
- Remove-AzureRmApiManagementLogger
42+
- Set-AzureRmApiManagementLogger
43+
- New-AzureRmApiManagementLogger
44+
* Fixed cmdlet bugs
45+
- NewAzureRMApiManagementAPI: changed Path to optional
46+
- NewAzureRMApiManagementProduct: fixed issue with creating products without Subscriptions
47+
* Azure Recovery Services Backup
1748
* Added Recovery Services Backup cmdlets
1849
- Set-AzureRmRecoveryServicesVaultContext
1950
- Set-AzureRmRecoveryServicesBackupProperties

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - April 2016" ?>
4+
<?define productName="Microsoft Azure PowerShell - May 2016" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="1.3.2" ?>
8+
<?define version="1.4.0" ?>
99

1010
<Product Id="*"
1111
Name="$(var.productName)"

setup/azurecmdfiles.wxi

Lines changed: 110 additions & 12 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common.Authentication.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828

2929
[assembly: ComVisible(false)]
3030
[assembly: CLSCompliant(false)]
31-
[assembly: AssemblyVersion("1.3.2")]
32-
[assembly: AssemblyFileVersion("1.3.2")]
31+
[assembly: AssemblyVersion("1.4.0")]
32+
[assembly: AssemblyFileVersion("1.4.0")]
3333
[assembly: CollectionBehavior(DisableTestParallelization = true)]

src/Common/Commands.Common.Authentication/Authentication/AccessTokenCredential.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ public AccessTokenCredential(Guid subscriptionId, IAccessToken token)
3131
this.token = token;
3232
this.TenantID = token.TenantId;
3333
}
34-
34+
3535
public override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
3636
{
37-
token.AuthorizeRequest((tokenType, tokenValue) => {
37+
token.AuthorizeRequest((tokenType, tokenValue) =>
38+
{
3839
request.Headers.Authorization = new AuthenticationHeaderValue(tokenType, tokenValue);
3940
});
4041
return base.ProcessHttpRequestAsync(request, cancellationToken);

src/Common/Commands.Common.Authentication/Authentication/AdalConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class AdalConfiguration
2828
// These constants define the default values to use for AD authentication
2929
// against RDFE
3030
//
31-
public const string PowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2";
31+
public const string PowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2";
3232

3333
public static readonly Uri PowerShellRedirectUri = new Uri("urn:ietf:wg:oauth:2.0:oob");
3434

@@ -37,7 +37,7 @@ public class AdalConfiguration
3737
// login window. Also adding popup flag to handle overly large login windows.
3838
public const string EnableEbdMagicCookie = "site_id=501358&display=popup";
3939

40-
public string AdEndpoint { get;set; }
40+
public string AdEndpoint { get; set; }
4141

4242
public bool ValidateAuthority { get; set; }
4343

src/Common/Commands.Common.Authentication/Authentication/AdalTokenProvider.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ public AdalTokenProvider()
3737
public AdalTokenProvider(IWin32Window parentWindow)
3838
{
3939
this.userTokenProvider = new UserTokenProvider(parentWindow);
40-
servicePrincipalTokenProvider = new ServicePrincipalTokenProvider();
40+
this.servicePrincipalTokenProvider = new ServicePrincipalTokenProvider();
4141
}
4242

43-
public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
43+
public IAccessToken GetAccessToken(
44+
AdalConfiguration config,
45+
ShowDialog promptBehavior,
46+
string userId,
47+
SecureString password,
4448
AzureAccount.AccountType credentialType)
4549
{
4650
switch (credentialType)
@@ -54,7 +58,11 @@ public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBe
5458
}
5559
}
5660

57-
public IAccessToken GetAccessTokenWithCertificate(AdalConfiguration config, string clientId, string certificate, AzureAccount.AccountType credentialType)
61+
public IAccessToken GetAccessTokenWithCertificate(
62+
AdalConfiguration config,
63+
string clientId,
64+
string certificate,
65+
AzureAccount.AccountType credentialType)
5866
{
5967
switch (credentialType)
6068
{

src/Common/Commands.Common.Authentication/Authentication/CertificateApplicationCredentialProvider.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
using Microsoft.IdentityModel.Clients.ActiveDirectory;
1616
using Microsoft.Rest.Azure.Authentication;
17-
using System.Security;
1817
using System.Security.Cryptography.X509Certificates;
1918
using System.Threading.Tasks;
2019

@@ -35,7 +34,7 @@ public CertificateApplicationCredentialProvider(string certificateThumbprint)
3534
{
3635
this._certificateThumbprint = certificateThumbprint;
3736
}
38-
37+
3938
/// <summary>
4039
/// Authenticate using certificate thumbprint from the datastore
4140
/// </summary>
@@ -47,7 +46,7 @@ public async Task<AuthenticationResult> AuthenticateAsync(string clientId, strin
4746
{
4847
var task = new Task<X509Certificate2>(() =>
4948
{
50-
return AzureSession.DataStore.GetCertificate(this._certificateThumbprint);
49+
return AzureSession.DataStore.GetCertificate(this._certificateThumbprint);
5150
});
5251
task.Start();
5352
var certificate = await task.ConfigureAwait(false);

src/Common/Commands.Common.Authentication/Authentication/CredStore.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal static class CredStore
2626
internal enum CredentialType
2727
{
2828
Generic = 1,
29-
}
29+
}
3030

3131
internal static class NativeMethods
3232
{
@@ -69,7 +69,10 @@ internal extern static bool CredFree(
6969
IntPtr pCredential
7070
);
7171

72-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Justification = "Wrapper for native struct")]
72+
[System.Diagnostics.CodeAnalysis.SuppressMessage(
73+
"Microsoft.Design",
74+
"CA1049:TypesThatOwnNativeResourcesShouldBeDisposable",
75+
Justification = "Wrapper for native struct")]
7376
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
7477
internal struct Credential
7578
{
@@ -108,7 +111,7 @@ public Credential(string userName, string key, string value)
108111
internal IntPtr attributes;
109112
internal string targetAlias;
110113
internal string userName;
111-
}
114+
}
112115
}
113116
}
114117
}

src/Common/Commands.Common.Authentication/Authentication/IAccessToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public interface IAccessToken
2525
string UserId { get; }
2626

2727
string TenantId { get; }
28-
28+
2929
LoginType LoginType { get; }
3030
}
3131
}

src/Common/Commands.Common.Authentication/Authentication/ITokenProvider.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ public interface ITokenProvider
3333
/// <param name="password">Secure strings with password/service principal key.</param>
3434
/// <param name="credentialType">Credential type.</param>
3535
/// <returns>An access token.</returns>
36-
IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId,
37-
SecureString password, AzureAccount.AccountType credentialType);
36+
IAccessToken GetAccessToken(
37+
AdalConfiguration config,
38+
ShowDialog promptBehavior,
39+
string userId,
40+
SecureString password,
41+
AzureAccount.AccountType credentialType);
3842

3943
/// <summary>
4044
/// Get a new authentication token for the given environment
@@ -44,7 +48,10 @@ IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior,
4448
/// <param name="certificateThumbprint">The certificate thumbprint for this user</param>
4549
/// <param name="credentialType">The account type</param>
4650
/// <returns>An access token, which can be renewed</returns>
47-
IAccessToken GetAccessTokenWithCertificate(AdalConfiguration config, string principalId, string certificateThumbprint,
51+
IAccessToken GetAccessTokenWithCertificate(
52+
AdalConfiguration config,
53+
string principalId,
54+
string certificateThumbprint,
4855
AzureAccount.AccountType credentialType);
4956
}
5057
}

src/Common/Commands.Common.Authentication/Authentication/KeyStoreApplicationCredentialProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public KeyStoreApplicationCredentialProvider(string tenant)
3434
{
3535
this._tenantId = tenant;
3636
}
37-
37+
3838
/// <summary>
3939
/// Authenticate using the secret for the specified client from the key store
4040
/// </summary>

src/Common/Commands.Common.Authentication/Authentication/LoginType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public enum LoginType
1919
/// <summary>
2020
/// User is logging in with orgid credentials
2121
/// </summary>
22-
OrgId,
22+
OrgId,
2323

2424
/// <summary>
2525
/// User is logging in with liveid credentials

src/Common/Commands.Common.Authentication/Authentication/ServicePrincipalKeyStore.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void SaveKey(string appId, string tenantId, SecureString serviceKe
3737
targetName = CreateKey(appId, tenantId),
3838
targetAlias = null,
3939
comment = null,
40-
lastWritten = new FILETIME {dwHighDateTime = 0, dwLowDateTime = 0},
40+
lastWritten = new FILETIME { dwHighDateTime = 0, dwLowDateTime = 0 },
4141
persist = 2, // persist on local machine
4242
attibuteCount = 0,
4343
attributes = IntPtr.Zero,
@@ -79,16 +79,16 @@ public static SecureString GetKey(string appId, string tenantId)
7979
out pCredential))
8080
{
8181
var credential = (CredStore.NativeMethods.Credential)
82-
Marshal.PtrToStructure(pCredential, typeof (CredStore.NativeMethods.Credential));
82+
Marshal.PtrToStructure(pCredential, typeof(CredStore.NativeMethods.Credential));
8383
unsafe
8484
{
85-
return new SecureString((char*) (credential.credentialBlob),
86-
(int)(credential.credentialBlobSize/Marshal.SystemDefaultCharSize));
85+
return new SecureString((char*)(credential.credentialBlob),
86+
(int)(credential.credentialBlobSize / Marshal.SystemDefaultCharSize));
8787
}
8888
}
8989
return null;
9090
}
91-
catch
91+
catch
9292
{
9393
// we could be running in an environment that does not have credentials store
9494
}
@@ -97,7 +97,7 @@ public static SecureString GetKey(string appId, string tenantId)
9797
if (pCredential != IntPtr.Zero)
9898
{
9999
CredStore.NativeMethods.CredFree(pCredential);
100-
}
100+
}
101101
}
102102

103103
return null;

0 commit comments

Comments
 (0)