This commit is contained in:
Erich(Renyong) Wang 2020-01-10 12:56:02 +08:00
Родитель 62a10c7f10
Коммит 6642fa7788
13 изменённых файлов: 750 добавлений и 192 удалений

Просмотреть файл

@ -380,6 +380,8 @@ namespace Microsoft.Azure.Commands.Profile.Test
DataLakeAudience = "DataLakeAudience",
AzureOperationalInsightsEndpointResourceId = "AzureOperationalInsightsEndpointResourceId",
AzureOperationalInsightsEndpoint = "https://AzureOperationalInsights",
AzureAttestationServiceEndpointResourceId = "AzureAttestationServiceEndpointResourceId",
AzureAttestationServiceEndpointSuffix = "https://AzureAttestationService",
};
var dict = new Dictionary<string, object>();
@ -403,6 +405,8 @@ namespace Microsoft.Azure.Commands.Profile.Test
dict["DataLakeAudience"] = "DataLakeAudience";
dict["AzureOperationalInsightsEndpointResourceId"] = "AzureOperationalInsightsEndpointResourceId";
dict["AzureOperationalInsightsEndpoint"] = "https://AzureOperationalInsights";
dict["AzureAttestationServiceEndpointResourceId"] = "AzureAttestationServiceEndpointResourceId";
dict["AzureAttestationServiceEndpointSuffix"] = "https://AzureAttestationService";
cmdlet.SetBoundParameters(dict);
cmdlet.InvokeBeginProcessing();
@ -430,6 +434,8 @@ namespace Microsoft.Azure.Commands.Profile.Test
Assert.Equal(cmdlet.DataLakeAudience, actual.DataLakeEndpointResourceId);
Assert.Equal(cmdlet.AzureOperationalInsightsEndpointResourceId, actual.AzureOperationalInsightsEndpointResourceId);
Assert.Equal(cmdlet.AzureOperationalInsightsEndpoint, actual.AzureOperationalInsightsEndpoint);
Assert.Equal(cmdlet.AzureAttestationServiceEndpointResourceId, actual.AzureAttestationServiceEndpointResourceId);
Assert.Equal(cmdlet.AzureAttestationServiceEndpointSuffix, actual.AzureAttestationServiceEndpointSuffix);
commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny<PSAzureEnvironment>()), Times.Once());
IAzureEnvironment env = AzureRmProfileProvider.Instance.Profile.GetEnvironment("KaTaL");
Assert.Equal(env.Name, cmdlet.Name);

Просмотреть файл

@ -24,8 +24,8 @@
<PreLoadAssemblies Include="$(RepoSrc)lib\Microsoft.IdentityModel.Clients.ActiveDirectory\NetFx\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll" />
<NetCoreAssemblies Include="$(RepoSrc)lib\Microsoft.IdentityModel.Clients.ActiveDirectory\NetCore\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
<NetCoreAssemblies Include="$(RepoSrc)lib\Microsoft.IdentityModel.Clients.ActiveDirectory\NetCore\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll" />
<StorageDependencies Include="$(RepoSrc)lib\WindowsAzure.Storage\9.2.0\Microsoft.WindowsAzure.Storage.dll" />
<StorageDependencies Include="$(RepoSrc)lib\WindowsAzure.Storage\9.2.0\Microsoft.WindowsAzure.Storage.DataMovement.dll" />
<StorageDependencies Include="$(RepoSrc)lib\WindowsAzure.Storage\9.3.0\Microsoft.WindowsAzure.Storage.dll" />
<StorageDependencies Include="$(RepoSrc)lib\WindowsAzure.Storage\9.3.0\Microsoft.WindowsAzure.Storage.DataMovement.dll" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 10/29/2019
# Generated on: 1/2/2020
#
@{
@ -12,7 +12,7 @@
# RootModule = ''
# Version number of this module.
ModuleVersion = '1.6.4'
ModuleVersion = '1.7.0'
# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
@ -72,8 +72,7 @@ RequiredAssemblies = 'Microsoft.Azure.PowerShell.Authentication.Abstractions.dll
'Microsoft.Azure.PowerShell.Clients.KeyVault.dll',
'Microsoft.Azure.PowerShell.Clients.Websites.dll',
'Hyak.Common.dll', 'Microsoft.ApplicationInsights.dll',
'Microsoft.Azure.Common.dll',
'Microsoft.Rest.ClientRuntime.dll',
'Microsoft.Azure.Common.dll', 'Microsoft.Rest.ClientRuntime.dll',
'Microsoft.Rest.ClientRuntime.Azure.dll',
'Microsoft.WindowsAzure.Storage.dll',
'Microsoft.WindowsAzure.Storage.DataMovement.dll',
@ -143,7 +142,7 @@ PrivateData = @{
# IconUri = ''
# ReleaseNotes of this module
ReleaseNotes = '* Add a deprecation message for ''Resolve-Error'' alias.'
ReleaseNotes = '* Updated Add-AzEnvironment and Set-AzEnvironment to accept parameters AzureAttestationServiceEndpointResourceId and AzureAttestationServiceEndpointSuffix'
# Prerelease string of this module
# Prerelease = ''

Просмотреть файл

@ -18,9 +18,18 @@
- Additional information about change #1
-->
## Upcoming Release
## Version 1.7.0
* Updated Add-AzEnvironment and Set-AzEnvironment to accept parameters AzureAttestationServiceEndpointResourceId and AzureAttestationServiceEndpointSuffix
## Version 1.6.6
* Add client-side telemetry info for Az 4.0 preview
## Version 1.6.5
* Update references in .psd1 to use relative path
* Set correct UserAgent for client-side telemetry for Az 4.0 preview
* Display user friendly error message when context is null in Az 4.0
* Add endpoints for attestation service
## Version 1.6.4
* Add a deprecation message for `Resolve-Error` alias.

Просмотреть файл

@ -33,6 +33,8 @@ namespace Microsoft.Azure.Commands.Common
/// </summary>
public class TelemetryProvider : IDictionary<string, AzurePSQoSEvent>, IDisposable
{
const string SubscriptionIdString = "SubscriptionId";
AzurePSDataCollectionProfile _dataCollectionProfile;
MetricHelper _helper;
Action<string> _warningLogger, _debugLogger;
@ -144,6 +146,27 @@ namespace Microsoft.Azure.Commands.Common
data.CustomProperties.Add("PSPreviewVersion", "4.0.0");
data.CustomProperties.Add("UserAgent", "AzurePowershell/Az4.0.0-preview");
if(invocationInfo?.BoundParameters?.ContainsKey(SubscriptionIdString) == true)
{
object rawValue = invocationInfo.BoundParameters[SubscriptionIdString];
string subscriptionId = null;
if(rawValue is string)
{
subscriptionId = rawValue as string;
}
else if(rawValue is string[])
{
string[] rawValueArray = rawValue as string[] ;
if (rawValueArray.Length > 0)
{
subscriptionId = string.Join(";", rawValueArray);
}
}
if(!string.IsNullOrEmpty(subscriptionId))
{
data.CustomProperties.Add(SubscriptionIdString, subscriptionId);
}
}
if (invocationInfo != null)
{

Просмотреть файл

@ -167,6 +167,15 @@ namespace Microsoft.Azure.Commands.Profile
HelpMessage = "The resource identifier of the Azure Analysis Services resource.")]
public string AzureAnalysisServicesEndpointResourceId { get; set; }
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "Dns suffix of Azure Attestation service.")]
public string AzureAttestationServiceEndpointSuffix { get; set; }
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")]
public string AzureAttestationServiceEndpointResourceId { get; set; }
protected override void BeginProcessing()
{
// do not call begin processing there is no context needed for this cmdlet
@ -316,6 +325,10 @@ namespace Microsoft.Azure.Commands.Profile
nameof(AzureAnalysisServicesEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AnalysisServicesEndpointResourceId,
nameof(AzureAnalysisServicesEndpointResourceId));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix,
nameof(AzureAttestationServiceEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId,
nameof(AzureAttestationServiceEndpointResourceId));
WriteObject(new PSAzureEnvironment(profileClient.AddOrSetEnvironment(newEnvironment)));
}
});

Просмотреть файл

@ -168,6 +168,14 @@ namespace Microsoft.Azure.Commands.Profile
HelpMessage = "The resource identifier of the Azure Analysis Services resource.")]
public string AzureAnalysisServicesEndpointResourceId { get; set; }
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "Dns suffix of Azure Attestation service.")]
public string AzureAttestationServiceEndpointSuffix { get; set; }
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")]
public string AzureAttestationServiceEndpointResourceId { get; set; }
protected override void BeginProcessing()
{
// do not call begin processing there is no context needed for this cmdlet
@ -317,6 +325,10 @@ namespace Microsoft.Azure.Commands.Profile
nameof(AzureAnalysisServicesEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AnalysisServicesEndpointResourceId,
nameof(AzureAnalysisServicesEndpointResourceId));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix,
nameof(AzureAttestationServiceEndpointSuffix));
SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId,
nameof(AzureAttestationServiceEndpointResourceId));
WriteObject(new PSAzureEnvironment(profileClient.AddOrSetEnvironment(newEnvironment)));
}
});

Просмотреть файл

@ -43,8 +43,8 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.6.4")]
[assembly: AssemblyFileVersion("1.6.4")]
[assembly: AssemblyVersion("1.7.0")]
[assembly: AssemblyFileVersion("1.7.0")]
#if !SIGN
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Accounts.Test")]
#endif

Просмотреть файл

@ -25,7 +25,8 @@ Add-AzEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String>] [[-Servi
[[-AdTenant] <String>] [[-GraphAudience] <String>] [[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>] [-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-AzureAttestationServiceEndpointSuffix <String>]
[-AzureAttestationServiceEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -36,6 +37,7 @@ Add-AzEnvironment [-Name] <String> [[-StorageEndpoint] <String>] [-ARMEndpoint]
[[-DataLakeAudience] <String>] [[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>] [-AzureAnalysisServicesEndpointResourceId <String>]
[-AzureAttestationServiceEndpointSuffix <String>] [-AzureAttestationServiceEndpointResourceId <String>]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
@ -87,6 +89,8 @@ AzureKeyVaultServiceEndpointResourceId :
AzureOperationalInsightsEndpointResourceId :
AzureOperationalInsightsEndpoint :
AzureAnalysisServicesEndpointSuffix :
AzureAttestationServiceEndpointSuffix :
AzureAttestationServiceEndpointResourceId :
VersionProfiles : {}
ExtendedProperties : {}
BatchEndpointResourceId :
@ -186,6 +190,36 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -AzureAttestationServiceEndpointResourceId
The The resource identifier of the Azure Attestation service that is the recipient of the requested token.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AzureAttestationServiceEndpointSuffix
Dns suffix of Azure Attestation service.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix
Dns Suffix of Azure Data Lake Analytics job and catalog services

Просмотреть файл

@ -25,7 +25,8 @@ Set-AzEnvironment [-Name] <String> [[-PublishSettingsFileUrl] <String>] [[-Servi
[[-AdTenant] <String>] [[-GraphAudience] <String>] [[-DataLakeAudience] <String>]
[[-BatchEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpoint] <String>] [-AzureAnalysisServicesEndpointSuffix <String>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-AzureAnalysisServicesEndpointResourceId <String>] [-AzureAttestationServiceEndpointSuffix <String>]
[-AzureAttestationServiceEndpointResourceId <String>] [-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
@ -36,6 +37,7 @@ Set-AzEnvironment [-Name] <String> [[-StorageEndpoint] <String>] [-ARMEndpoint]
[[-DataLakeAudience] <String>] [[-BatchEndpointResourceId] <String>]
[[-AzureOperationalInsightsEndpointResourceId] <String>] [[-AzureOperationalInsightsEndpoint] <String>]
[-AzureAnalysisServicesEndpointSuffix <String>] [-AzureAnalysisServicesEndpointResourceId <String>]
[-AzureAttestationServiceEndpointSuffix <String>] [-AzureAttestationServiceEndpointResourceId <String>]
[-Scope <ContextModificationScope>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```
@ -84,6 +86,8 @@ AzureKeyVaultServiceEndpointResourceId :
BatchEndpointResourceId :
AzureOperationalInsightsEndpoint :
AzureOperationalInsightsEndpointResourceId :
AzureAttestationServiceEndpointSuffix :
AzureAttestationServiceEndpointResourceId :
```
In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created environment using the cmdlet Set-AzEnvironment.
@ -173,6 +177,35 @@ Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AzureAttestationServiceEndpointResourceId
The The resource identifier of the Azure Attestation service that is the recipient of the requested token.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AzureAttestationServiceEndpointSuffix
Dns suffix of Azure Attestation service.
```yaml
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None

Просмотреть файл

@ -111,6 +111,9 @@ namespace Microsoft.Azure.Commands.Profile.Models
AzureOperationalInsightsEndpointResourceId =
other.GetProperty<string>(nameof(AzureOperationalInsightsEndpointResourceId));
AzureOperationalInsightsEndpoint = other.GetProperty<string>(nameof(AzureOperationalInsightsEndpoint));
AzureAttestationServiceEndpointResourceId =
other.GetProperty<string>(nameof(AzureAttestationServiceEndpointResourceId));
AzureAttestationServiceEndpointSuffix = other.GetProperty<string>(nameof(AzureAttestationServiceEndpointSuffix));
VersionProfiles.Populate(nameof(VersionProfiles), other);
this.PopulateExtensions(other);
}
@ -291,6 +294,36 @@ namespace Microsoft.Azure.Commands.Profile.Models
}
}
/// <summary>
/// The domain name suffix for Azure Attestation Services
/// </summary>
public string AzureAttestationServiceEndpointSuffix
{
get
{
return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix);
}
set
{
this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix, value);
}
}
/// <summary>
/// Gets or sets the resource Id to use for contacting the attestation services endpoint
/// </summary>
public string AzureAttestationServiceEndpointResourceId
{
get
{
return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId);
}
set
{
this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, value);
}
}
public IList<string> VersionProfiles { get; } = new List<string>();
public IDictionary<string, string> ExtendedProperties { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
@ -330,7 +363,9 @@ namespace Microsoft.Azure.Commands.Profile.Models
&& TrafficManagerDnsSuffix == other.TrafficManagerDnsSuffix
&& BatchEndpointResourceId == other.BatchEndpointResourceId
&& AzureOperationalInsightsEndpointResourceId == other.AzureOperationalInsightsEndpointResourceId
&& AzureOperationalInsightsEndpoint == other.AzureOperationalInsightsEndpoint;
&& AzureOperationalInsightsEndpoint == other.AzureOperationalInsightsEndpoint
&& AzureAttestationServiceEndpointResourceId == other.AzureAttestationServiceEndpointResourceId
&& AzureAttestationServiceEndpointSuffix == other.AzureAttestationServiceEndpointSuffix;
}
return false;

Просмотреть файл

@ -64,6 +64,8 @@ namespace Common.Authentication.Test
Assert.Null(environment.AzureOperationalInsightsEndpointResourceId);
Assert.Null(environment.AzureOperationalInsightsEndpoint);
Assert.Null(environment.AzureAnalysisServicesEndpointSuffix);
Assert.Null(environment.AzureAttestationServiceEndpointResourceId);
Assert.Null(environment.AzureAttestationServiceEndpointSuffix);
}
@ -75,21 +77,24 @@ namespace Common.Authentication.Test
"https://manage.windowsazure.com/publishsettings", "https://management.azure.com",
"https://management.core.windows.net", ".sql.azure.com", ".core.windows.net",
".trafficmanager.windows.net", "https://batch.core.windows.net", "https://datalake.azure.net",
"https://api.loganalytics.io", "https://api.loganalytics.io/v1", "analysisservices.azure.net")]
"https://api.loganalytics.io", "https://api.loganalytics.io/v1", "analysisservices.azure.net",
"https://attest.azure.net", "attest.azure.net")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void CanConvertValidEnvironments(string name, bool onPremise, string activeDirectory, string serviceResource,
string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix,
string kvResource, string gallery, string graph, string graphResource, string portal,
string publishSettings, string resourceManager, string serviceManagement,
string sqlSuffix, string storageSuffix, string trafficManagerSuffix, string batchResource, string dataLakeResource,
string azureOperationalInsightsEndpointResourceId, string azureOperationalInsightsEndpoint, string analysisServicesSuffix)
string azureOperationalInsightsEndpointResourceId, string azureOperationalInsightsEndpoint, string analysisServicesSuffix,
string azureAttestationServiceEndpointResourceId, string azureAttestationServiceEndpointSuffix)
{
AzureEnvironment azEnvironment = CreateEnvironment(name, onPremise, activeDirectory,
serviceResource, adTenant, dataLakeJobs, dataLakeFiles, kvDnsSuffix,
kvResource, gallery, graph, graphResource, portal, publishSettings,
resourceManager, serviceManagement, sqlSuffix, storageSuffix,
trafficManagerSuffix, batchResource, dataLakeResource,
azureOperationalInsightsEndpointResourceId, azureOperationalInsightsEndpoint, analysisServicesSuffix);
azureOperationalInsightsEndpointResourceId, azureOperationalInsightsEndpoint, analysisServicesSuffix,
azureAttestationServiceEndpointResourceId, azureAttestationServiceEndpointSuffix);
var environment = (PSAzureEnvironment)azEnvironment;
Assert.NotNull(environment);
CheckEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, azEnvironment,
@ -136,6 +141,10 @@ namespace Common.Authentication.Test
environment.AzureOperationalInsightsEndpoint);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AnalysisServicesEndpointSuffix, azEnvironment,
environment.AzureAnalysisServicesEndpointSuffix);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, azEnvironment,
environment.AzureAttestationServiceEndpointResourceId);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix, azEnvironment,
environment.AzureAttestationServiceEndpointSuffix);
Assert.Equal(azEnvironment.Name, environment.Name);
Assert.Equal(azEnvironment.OnPremise, environment.EnableAdfsAuthentication);
}
@ -172,6 +181,8 @@ namespace Common.Authentication.Test
Assert.False(environment.IsEndpointSet(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpointResourceId));
Assert.False(environment.IsEndpointSet(AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpoint));
Assert.False(environment.IsEndpointSet(AzureEnvironment.ExtendedEndpoint.AnalysisServicesEndpointSuffix));
Assert.False(environment.IsEndpointSet(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId));
Assert.False(environment.IsEndpointSet(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix));
}
[Theory]
@ -182,14 +193,16 @@ namespace Common.Authentication.Test
"https://manage.windowsazure.com/publishsettings", "https://management.azure.com",
"https://management.core.windows.net", ".sql.azure.com", ".core.windows.net",
".trafficmanager.windows.net", "https://batch.core.windows.net", "https://datalake.azure.net",
"https://api.loganalytics.io", "https://api.loganalytics.io/v1", "analysisservices.azure.net")]
"https://api.loganalytics.io", "https://api.loganalytics.io/v1", "analysisservices.azure.net",
"https://attest.azure.net", "attest.azure.net")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void CanConvertValidPSEnvironments(string name, bool onPremise, string activeDirectory, string serviceResource,
string adTenant, string dataLakeJobs, string dataLakeFiles, string kvDnsSuffix,
string kvResource, string gallery, string graph, string graphResource, string portal,
string publishSettings, string resourceManager, string serviceManagement,
string sqlSuffix, string storageSuffix, string trafficManagerSuffix, string batchResource, string dataLakeResource,
string azureOperationalInsightsEndpointResourceId, string azureOperationalInsightsEndpoint, string analysisServicesSuffix)
string azureOperationalInsightsEndpointResourceId, string azureOperationalInsightsEndpoint, string analysisServicesSuffix,
string azureAttestationServiceEndpointResourceId, string azureAttestationServiceEndpointSuffix)
{
PSAzureEnvironment environment = new PSAzureEnvironment
{
@ -216,7 +229,9 @@ namespace Common.Authentication.Test
BatchEndpointResourceId = batchResource,
AzureOperationalInsightsEndpointResourceId = azureOperationalInsightsEndpointResourceId,
AzureOperationalInsightsEndpoint = azureOperationalInsightsEndpoint,
AzureAnalysisServicesEndpointSuffix = analysisServicesSuffix
AzureAnalysisServicesEndpointSuffix = analysisServicesSuffix,
AzureAttestationServiceEndpointResourceId = azureAttestationServiceEndpointResourceId,
AzureAttestationServiceEndpointSuffix = azureAttestationServiceEndpointSuffix
};
var azEnvironment = (AzureEnvironment)environment;
Assert.NotNull(environment);
@ -264,6 +279,10 @@ namespace Common.Authentication.Test
environment.AzureOperationalInsightsEndpoint);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AnalysisServicesEndpointSuffix, azEnvironment,
environment.AzureAnalysisServicesEndpointSuffix);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, azEnvironment,
environment.AzureAttestationServiceEndpointResourceId);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix, azEnvironment,
environment.AzureAttestationServiceEndpointSuffix);
Assert.Equal(azEnvironment.Name, environment.Name);
Assert.Equal(azEnvironment.OnPremise, environment.EnableAdfsAuthentication);
}
@ -274,7 +293,8 @@ namespace Common.Authentication.Test
string kvResource, string gallery, string graph, string graphResource, string portal,
string publishSettings, string resourceManager, string serviceManagement,
string sqlSuffix, string storageSuffix, string trafficManagerSuffix, string batchResource, string dataLakeResource,
string azureOperationalInsightsEndpointResourceId, string azureOperationalInsightsEndpoint, string analysisServicesSuffix)
string azureOperationalInsightsEndpointResourceId, string azureOperationalInsightsEndpoint, string analysisServicesSuffix,
string azureAttestationServiceEndpointResourceId, string azureAttestationServiceEndpointSuffix)
{
var environment = new AzureEnvironment() { Name = name, OnPremise = onPremise };
SetEndpoint(AzureEnvironment.Endpoint.ActiveDirectory, environment, activeDirectory);
@ -321,6 +341,10 @@ namespace Common.Authentication.Test
azureOperationalInsightsEndpoint);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AnalysisServicesEndpointSuffix, environment,
analysisServicesSuffix);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, environment,
azureAttestationServiceEndpointResourceId);
CheckEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointSuffix, environment,
azureAttestationServiceEndpointSuffix);
return environment;
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу