Skip to content

Commit 468d2e9

Browse files
author
Dragos Avadanei
committed
Merge remote-tracking branch 'refs/remotes/Azure/release-4.3.0' into feature/updates4aug
2 parents 0fdd3cc + 884a396 commit 468d2e9

File tree

548 files changed

+675255
-15549
lines changed

Some content is hidden

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

548 files changed

+675255
-15549
lines changed

NuGet.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
44
<add key="local-feed" value="tools/LocalFeed" />
5-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
66
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
77
<add key="powershell-core" value="https://powershell.myget.org/F/powershell-core/api/v3/index.json" />
88
</packageSources>

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" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
33

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

8-
<?define version="4.2.1" ?>
8+
<?define version="4.3.0" ?>
99

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

src/Common/Commands.Common.Authentication/Commands.Common.Authentication.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<Private>True</Private>
7777
</Reference>
7878
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
79+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.8\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
8080
<Private>True</Private>
8181
</Reference>
8282
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/Common/Commands.Common.Authentication/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
1010
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1111
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
12-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.7" targetFramework="net452" />
12+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.8" targetFramework="net452" />
1313
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.9-preview" targetFramework="net45" />
1414
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
1515
</packages>

src/Common/Commands.Common.Authorization/Commands.Common.Authorization.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
</PropertyGroup>
4747
<ItemGroup>
4848
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
49-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
49+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
5050
<Private>True</Private>
5151
</Reference>
5252
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
53-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
53+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.8\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net452" />
4-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net452" />
3+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
4+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.8" targetFramework="net452" />
55
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
66
</packages>

src/Common/Commands.Common.Graph.RBAC/Commands.Common.Graph.RBAC.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
</PropertyGroup>
4747
<ItemGroup>
4848
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
49-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
49+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
5050
<Private>True</Private>
5151
</Reference>
5252
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
53-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
53+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.8\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

src/Common/Commands.Common.Graph.RBAC/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net452" />
55
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net452" />
66
<package id="Microsoft.Net.Http" version="2.2.22" targetFramework="net452" />
7-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net452" />
8-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net452" />
7+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
8+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.8" targetFramework="net452" />
99
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
1010
</packages>

src/Common/Commands.Common.Network/Commands.Common.Network.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
</PropertyGroup>
4747
<ItemGroup>
4848
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
49-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
49+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
5050
<Private>True</Private>
5151
</Reference>
5252
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
53-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
53+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.8\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net452" />
4-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net452" />
3+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
4+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.8" targetFramework="net452" />
55
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" />
66
</packages>

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class AzurePowerShell
2626

2727
public const string AssemblyCopyright = "Copyright © Microsoft";
2828

29-
public const string AssemblyVersion = "4.2.1";
29+
public const string AssemblyVersion = "4.3.0";
3030

31-
public const string AssemblyFileVersion = "4.2.1";
31+
public const string AssemblyFileVersion = "4.3.0";
3232

3333
public const string ProfileFile = "AzureProfile.json";
3434

src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
6969
</Reference>
7070
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
71+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/Common/Commands.ScenarioTests.Common/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1212
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
1313
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
14-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net45" />
14+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
1515
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.9-preview" targetFramework="net45" />
1616
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
1717
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ResourceManager/AnalysisServices/AzureRM.AnalysisServices.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.4.2'
15+
ModuleVersion = '0.4.3'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.2.1'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.3.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- Enable to set/disable backup blob container for backup/restore Azure Analysis Services Server
2525
* Updated Sku lookup in New-AzureRmAnalysisServicesServer and Set-AzureRmAnalysisServicesServer
2626
- Changed hard coded Sku into dynamic lookup.
27+
* Add-AzureAnalysisServicesAccount to support login with Service Principal
2728

2829
## Version 0.4.2
2930

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Azure.AnalysisServices.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '0.4.2'
12+
ModuleVersion = '0.4.3'
1313

1414
# ID used to uniquely identify this module
1515
GUID = 'c717b5a4-1f1b-4a2f-8aa1-bfd09934626e'

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands.AnalysisServices.Dataplane.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
57-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
57+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.8\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
5858
<Private>True</Private>
5959
</Reference>
6060
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/AddAzureASAccount.cs

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,54 @@ namespace Microsoft.Azure.Commands.AnalysisServices.Dataplane
2828
/// <summary>
2929
/// Cmdlet to log into an Analysis Services environment
3030
/// </summary>
31-
[Cmdlet("Add", "AzureAnalysisServicesAccount", SupportsShouldProcess=true)]
31+
[Cmdlet("Add", "AzureAnalysisServicesAccount", DefaultParameterSetName = "UserParameterSetName", SupportsShouldProcess =true)]
3232
[Alias("Login-AzureAsAccount")]
3333
[OutputType(typeof(AsAzureProfile))]
3434
public class AddAzureASAccountCommand : AzurePSCmdlet, IModuleAssemblyInitializer
3535
{
36-
[Parameter(Position = 0, Mandatory = false, HelpMessage = "Name of the Azure Analysis Services environment to which to logon to")]
36+
private const string UserParameterSet = "UserParameterSetName";
37+
private const string ServicePrincipalWithPasswordParameterSet = "ServicePrincipalWithPasswordParameterSetName";
38+
private const string ServicePrincipalWithCertificateParameterSet = "ServicePrincipalWithCertificateParameterSetName";
39+
40+
[Parameter(ParameterSetName = UserParameterSet,
41+
Mandatory = false, HelpMessage = "Name of the Azure Analysis Services environment to which to logon to", Position = 0)]
42+
[Parameter(ParameterSetName = ServicePrincipalWithPasswordParameterSet,
43+
Mandatory = true, HelpMessage = "Name of the Azure Analysis Services environment to which to logon to")]
44+
[Parameter(ParameterSetName = ServicePrincipalWithCertificateParameterSet,
45+
Mandatory = true, HelpMessage = "Name of the Azure Analysis Services environment to which to logon to")]
3746
public string RolloutEnvironment { get; set; }
38-
39-
[Parameter(Position = 1, Mandatory = false, HelpMessage = "Login credentials to the Azure Analysis Services environment")]
47+
48+
[Parameter(ParameterSetName = UserParameterSet,
49+
Mandatory = false, HelpMessage = "Login credentials to the Azure Analysis Services environment", Position = 1)]
50+
[Parameter(ParameterSetName = ServicePrincipalWithPasswordParameterSet,
51+
Mandatory = true, HelpMessage = "Login credentials to the Azure Analysis Services environment")]
4052
public PSCredential Credential { get; set; }
4153

54+
[Parameter(ParameterSetName = ServicePrincipalWithPasswordParameterSet,
55+
Mandatory = true)]
56+
[Parameter(ParameterSetName = ServicePrincipalWithCertificateParameterSet,
57+
Mandatory = true)]
58+
public SwitchParameter ServicePrincipal { get; set; }
59+
60+
[Parameter(ParameterSetName = ServicePrincipalWithPasswordParameterSet,
61+
Mandatory = true, HelpMessage = "Tenant name or ID")]
62+
[Parameter(ParameterSetName = ServicePrincipalWithCertificateParameterSet,
63+
Mandatory = true, HelpMessage = "Tenant name or ID")]
64+
[ValidateNotNullOrEmpty]
65+
public string TenantId { get; set; }
66+
67+
[Parameter(ParameterSetName = ServicePrincipalWithCertificateParameterSet,
68+
Mandatory = true, HelpMessage = "The application ID.")]
69+
[ValidateNotNullOrEmpty]
70+
public string ApplicationId { get; set; }
71+
72+
[Parameter(ParameterSetName = ServicePrincipalWithCertificateParameterSet,
73+
Mandatory = true, HelpMessage = "Certificate Hash (Thumbprint)")]
74+
[ValidateNotNullOrEmpty]
75+
public string CertificateThumbprint { get; set; }
76+
4277
protected AsAzureEnvironment AsEnvironment;
43-
78+
4479
protected override IAzureContext DefaultContext
4580
{
4681
get
@@ -83,9 +118,30 @@ protected override void InitializeQosEvent()
83118
// nothing to do here.
84119
}
85120

121+
protected override void SetupDebuggingTraces()
122+
{
123+
// nothing to do here.
124+
}
125+
126+
protected override void TearDownDebuggingTraces()
127+
{
128+
// nothing to do here.
129+
}
130+
131+
protected override void SetupHttpClientPipeline()
132+
{
133+
// nothing to do here.
134+
}
135+
136+
protected override void TearDownHttpClientPipeline()
137+
{
138+
// nothing to do here.
139+
}
140+
86141
public override void ExecuteCmdlet()
87142
{
88143
AsAzureAccount azureAccount = new AsAzureAccount();
144+
azureAccount.Type = ServicePrincipal ? AsAzureAccount.AccountType.ServicePrincipal : AsAzureAccount.AccountType.User;
89145

90146
SecureString password = null;
91147
if (Credential != null)
@@ -94,6 +150,20 @@ public override void ExecuteCmdlet()
94150
password = Credential.Password;
95151
}
96152

153+
if (ServicePrincipal)
154+
{
155+
azureAccount.Tenant = TenantId;
156+
157+
if (!string.IsNullOrEmpty(ApplicationId))
158+
{
159+
azureAccount.Id = ApplicationId;
160+
}
161+
if (!string.IsNullOrEmpty(CertificateThumbprint))
162+
{
163+
azureAccount.CertificateThumbprint = CertificateThumbprint;
164+
}
165+
}
166+
97167
if (ShouldProcess(string.Format(Resources.LoginTarget, AsEnvironment.Name), "log in"))
98168
{
99169
var currentProfile = AsAzureClientSession.Instance.Profile;

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Models/AsAzureAccount.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,18 @@ public partial class AsAzureAccount
2424
public string UniqueId { get; set; }
2525

2626
public string Tenant { get; set; }
27+
28+
public string Type { get; set; }
29+
30+
public string CertificateThumbprint { get; set; }
31+
32+
/// <summary>
33+
/// string constants for known credential types
34+
/// </summary>
35+
public static class AccountType
36+
{
37+
public const string User = "User",
38+
ServicePrincipal = "ServicePrincipal";
39+
}
2740
}
2841
}

0 commit comments

Comments
 (0)