From 43d3d1b41c9c248670d140964ea592167f39bd91 Mon Sep 17 00:00:00 2001 From: ogail Date: Thu, 17 Oct 2013 12:08:29 -0700 Subject: [PATCH] Apply CR --- .../src/Commands.Test/Common/ProfileStorageTests.cs | 4 ++-- .../Common/Authentication/AdalConfiguration.cs | 4 ++-- .../src/Commands.Utilities/Common/ProfileData.cs | 8 ++++---- .../Common/WindowsAzureEnvironment.cs | 12 ++++++------ .../src/Commands/Environment/AddAzureEnvironment.cs | 4 ++-- .../src/Commands/Environment/SetAzureEnvironment.cs | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/WindowsAzurePowershell/src/Commands.Test/Common/ProfileStorageTests.cs b/WindowsAzurePowershell/src/Commands.Test/Common/ProfileStorageTests.cs index fdc0a3a5a..43b58514c 100644 --- a/WindowsAzurePowershell/src/Commands.Test/Common/ProfileStorageTests.cs +++ b/WindowsAzurePowershell/src/Commands.Test/Common/ProfileStorageTests.cs @@ -142,8 +142,8 @@ public void SavingWritesProfileDataToStore() Name = sourceEnv.Name, PublishSettingsFileUrl = sourceEnv.PublishSettingsFileUrl, ServiceEndpoint = sourceEnv.ServiceEndpoint, - AdTenantUrl = sourceEnv.AdTenantUrl, - CommonTenantId = sourceEnv.CommonTenantId, + ActiveDirectoryEndpoint = sourceEnv.AdTenantUrl, + ActiveDirectoryCommonTenantId = sourceEnv.CommonTenantId, StorageEndpointSuffix = sourceEnv.StorageEndpointSuffix }); diff --git a/WindowsAzurePowershell/src/Commands.Utilities/Common/Authentication/AdalConfiguration.cs b/WindowsAzurePowershell/src/Commands.Utilities/Common/Authentication/AdalConfiguration.cs index d8bce5e1b..b4ab08567 100644 --- a/WindowsAzurePowershell/src/Commands.Utilities/Common/Authentication/AdalConfiguration.cs +++ b/WindowsAzurePowershell/src/Commands.Utilities/Common/Authentication/AdalConfiguration.cs @@ -76,8 +76,8 @@ public AdalConfiguration() public AdalConfiguration(WindowsAzureEnvironment environment) : this() { - AdEndpoint = environment.AdTenantUrl; - AdDomain = environment.CommonTenantId; + AdEndpoint = environment.ActiveDirectoryEndpoint; + AdDomain = environment.ActiveDirectoryCommonTenantId; } public AdalConfiguration(WindowsAzureSubscription subscription) diff --git a/WindowsAzurePowershell/src/Commands.Utilities/Common/ProfileData.cs b/WindowsAzurePowershell/src/Commands.Utilities/Common/ProfileData.cs index a022146e2..07ef86638 100644 --- a/WindowsAzurePowershell/src/Commands.Utilities/Common/ProfileData.cs +++ b/WindowsAzurePowershell/src/Commands.Utilities/Common/ProfileData.cs @@ -66,8 +66,8 @@ public AzureEnvironmentData(WindowsAzureEnvironment inMemoryEnvironment) ServiceEndpoint = inMemoryEnvironment.ServiceEndpoint; ManagementPortalUrl = inMemoryEnvironment.ManagementPortalUrl; StorageEndpointSuffix = inMemoryEnvironment.StorageEndpointSuffix; - AdTenantUrl = inMemoryEnvironment.AdTenantUrl; - CommonTenantId = inMemoryEnvironment.CommonTenantId; + AdTenantUrl = inMemoryEnvironment.ActiveDirectoryEndpoint; + CommonTenantId = inMemoryEnvironment.ActiveDirectoryCommonTenantId; } /// @@ -82,8 +82,8 @@ public WindowsAzureEnvironment ToAzureEnvironment() ServiceEndpoint = this.ServiceEndpoint, ManagementPortalUrl = this.ManagementPortalUrl, StorageEndpointSuffix = this.StorageEndpointSuffix, - AdTenantUrl = this.AdTenantUrl, - CommonTenantId = this.CommonTenantId + ActiveDirectoryEndpoint = this.AdTenantUrl, + ActiveDirectoryCommonTenantId = this.CommonTenantId }; } diff --git a/WindowsAzurePowershell/src/Commands.Utilities/Common/WindowsAzureEnvironment.cs b/WindowsAzurePowershell/src/Commands.Utilities/Common/WindowsAzureEnvironment.cs index 509610624..0b978e211 100644 --- a/WindowsAzurePowershell/src/Commands.Utilities/Common/WindowsAzureEnvironment.cs +++ b/WindowsAzurePowershell/src/Commands.Utilities/Common/WindowsAzureEnvironment.cs @@ -47,14 +47,14 @@ public class WindowsAzureEnvironment /// Url for the Active Directory tenant for this environment /// /// If null, this environment does not support AD authentication - public string AdTenantUrl { get; set; } + public string ActiveDirectoryEndpoint { get; set; } /// /// Name for the common tenant used as the first step /// in the AD authentication process for this environment. /// /// If null, this environment does not support AD authentication - public string CommonTenantId { get; set; } + public string ActiveDirectoryCommonTenantId { get; set; } private string storageEndpointSuffix; @@ -169,7 +169,7 @@ private string AddRealm(string baseUrl, string realm) public IEnumerable AddAccount(ITokenProvider tokenProvider) { - if (AdTenantUrl == null) + if (ActiveDirectoryEndpoint == null) { throw new Exception(string.Format(Resources.EnvironmentDoesNotSupportActiveDirectory, Name)); } @@ -185,7 +185,7 @@ public IEnumerable AddAccount(ITokenProvider tokenProv { var azureSubscription = new WindowsAzureSubscription { - ActiveDirectoryEndpoint = AdTenantUrl, + ActiveDirectoryEndpoint = ActiveDirectoryEndpoint, ActiveDirectoryTenantId = subscription.ActiveDirectoryTenantId, ActiveDirectoryUserId = mainToken.UserId, SubscriptionId = subscription.SubscriptionId, @@ -227,8 +227,8 @@ public IEnumerable AddAccount(ITokenProvider tokenProv ServiceEndpoint = WindowsAzureEnvironmentConstants.AzureServiceEndpoint, ManagementPortalUrl = WindowsAzureEnvironmentConstants.AzureManagementPortalUrl, // TODO: Get real endpoint for prod - AdTenantUrl = "https://login.windows.net/", - CommonTenantId = "common", + ActiveDirectoryEndpoint = "https://login.windows.net/", + ActiveDirectoryCommonTenantId = "common", StorageEndpointSuffix = WindowsAzureEnvironmentConstants.AzureStorageEndpointSuffix } }, diff --git a/WindowsAzurePowershell/src/Commands/Environment/AddAzureEnvironment.cs b/WindowsAzurePowershell/src/Commands/Environment/AddAzureEnvironment.cs index ab190f82d..e6b43182f 100644 --- a/WindowsAzurePowershell/src/Commands/Environment/AddAzureEnvironment.cs +++ b/WindowsAzurePowershell/src/Commands/Environment/AddAzureEnvironment.cs @@ -53,8 +53,8 @@ public override void ExecuteCmdlet() ServiceEndpoint = ServiceEndpoint, ManagementPortalUrl = ManagementPortalUrl, StorageEndpointSuffix = StorageEndpoint, - AdTenantUrl = ActiveDirectoryEndpoint, - CommonTenantId = "Common" + ActiveDirectoryEndpoint = ActiveDirectoryEndpoint, + ActiveDirectoryCommonTenantId = "Common" }; WindowsAzureProfile.Instance.AddEnvironment(newEnvironment); diff --git a/WindowsAzurePowershell/src/Commands/Environment/SetAzureEnvironment.cs b/WindowsAzurePowershell/src/Commands/Environment/SetAzureEnvironment.cs index 6dbe369b3..b210aa2d8 100644 --- a/WindowsAzurePowershell/src/Commands/Environment/SetAzureEnvironment.cs +++ b/WindowsAzurePowershell/src/Commands/Environment/SetAzureEnvironment.cs @@ -53,7 +53,7 @@ public override void ExecuteCmdlet() env.ServiceEndpoint = Value(ServiceEndpoint, env.ServiceEndpoint); env.ManagementPortalUrl = Value(ManagementPortalUrl, env.ManagementPortalUrl); env.StorageEndpointSuffix = Value(StorageEndpoint, env.StorageEndpointSuffix); - env.AdTenantUrl = Value(AdEndpointUrl, env.AdTenantUrl); + env.ActiveDirectoryEndpoint = Value(AdEndpointUrl, env.ActiveDirectoryEndpoint); WindowsAzureProfile.Instance.UpdateEnvironment(env);