Skip to content

Commit 0ce925d

Browse files
committed
Additional usages of raw subscription
1 parent d7ae6f3 commit 0ce925d

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
<Compile Include="AzurePowerShell.cs" />
149149
<Compile Include="AzureRmProfileProvider.cs" />
150150
<Compile Include="AzureSMProfileProvder.cs" />
151+
<Compile Include="AzureSubscriptionExtensions.cs" />
151152
<Compile Include="Constants.cs" />
152153
<Compile Include="ContextExtensions.cs" />
153154
<Compile Include="IProfileProvider.cs" />

src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using System.Management.Automation;
1818
using System.Net;
1919
using Microsoft.Azure.Common.Authentication.Models;
20+
using Microsoft.WindowsAzure.Commands.Common;
2021
using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions;
2122
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
2223
using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties;
@@ -113,7 +114,7 @@ public virtual void NewPaaSDeploymentProcess()
113114
AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Production);
114115
AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Staging);
115116

116-
var storageName = Profile.Context.Subscription.GetProperty(AzureSubscription.Property.StorageAccount);
117+
var storageName = Profile.Context.Subscription.GetStorageAccountName();
117118

118119
Uri packageUrl;
119120
if (this.Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) ||

src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using Microsoft.WindowsAzure.Management.Compute.Models;
2424
using Microsoft.WindowsAzure.Management.Compute;
2525
using Hyak.Common;
26+
using Microsoft.WindowsAzure.Commands.Common;
2627

2728
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices
2829
{
@@ -198,7 +199,7 @@ public void ExecuteCommand()
198199
if (string.Compare(ParameterSetName, "Upgrade", StringComparison.OrdinalIgnoreCase) == 0)
199200
{
200201
bool removePackage = false;
201-
var storageName = Profile.Context.Subscription.GetProperty(AzureSubscription.Property.StorageAccount);
202+
var storageName = Profile.Context.Subscription.GetStorageAccountName();
202203

203204
Uri packageUrl = null;
204205
if (Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) ||

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ protected override void ValidateParameters()
210210

211211
protected string GetStorageName()
212212
{
213-
return Profile.Context.Subscription.GetProperty(AzureSubscription.Property.StorageAccount);
213+
return Profile.Context.Subscription.GetStorageAccountName();
214214
}
215215

216216
protected string GetStorageKey(string storageName)

0 commit comments

Comments
 (0)