Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jan 24, 2015

In Set-AzureDeployment, if the given package Uri is to a file, then it will first upload that file to Azure storage. The storage account which receives this package is defined by the CurrentStorageAccountName property of the current subscription. In the case where this is null and a package upload is required, an exception is thrown. However, if the package is already uploaded, then the value of CurrentStorageAccountName is irrelevant.

New-AzureDeployment, however, always checks whether CurrentStorageAccountName is null before executing any code, and thus, even if the package is already uploaded to storage, it will throw an exception if this field is null.

This change makes the behavior of New-AzureDeployment consistent with that of Set-AzureDeployment - that is, it will only throw an exception when CurrentStorageAccountName is null if the package needs to be uploaded.

redmond\rylewell

…oyment

- SetAzureDeployment only checks if the CurrentStorageAccount is set if the package needs to be uploaded to storage
- NewAzureDeployment always throws if CurrentStorageAccount is set regardless of whether the package needs to be uploaded to storage
- This change makes NewAzureDeployment consistent with the behavior of SetAzureDeployment
@azuresdkci
Copy link

Can one of the admins verify this patch?

@azurecla
Copy link

Hi @rylewell-msft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@stankovski
Copy link
Member

@azuresdkci add to whitelist

ogail added a commit that referenced this pull request Feb 5, 2015
Make NewAzureDeployment param validation consistent with SetAzureDeploym...
@ogail ogail merged commit a5be6cc into Azure:dev Feb 5, 2015
ogail pushed a commit that referenced this pull request Aug 19, 2015
Fixing bugs of powershell tests and saving recordings except e2e.
AzureRT referenced this pull request in AzureRT/azure-powershell Sep 28, 2015
hovsepm pushed a commit that referenced this pull request Feb 4, 2016
ionuttulai pushed a commit to ionuttulai/azure-powershell that referenced this pull request Mar 4, 2020
Fixing the Psd1 files for Core Editions and supported Frameworks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants