Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #7820 from yaakoviyun/preview
Removed storage depedency when inferring storageBlobContainerName
  • Loading branch information
Maddie Clayton committed Nov 17, 2018
2 parents 07ea15e + 87ffded commit a9d0f28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/ResourceManager/Sql/Commands.Sql/ChangeLog.md
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Current Release
* Fixed issue with using Get-AzureRmSqlDatabaseVulnerabilityAssessment with DotNet core

## Version 4.12.0
* Added new cmdlets for CRUD operations on Azure Sql Database Managed Instance and Azure Sql Managed Database
Expand Down
Expand Up @@ -84,16 +84,14 @@ public BaseSqlVulnerabilityAssessmentAdapter(IAzureContext context)
string storageBlobContainerName = string.Empty;
if (!string.IsNullOrEmpty(settings.StorageContainerPath))
{
// StorageContainerPath is in the format of : "https://va1storage.blob.core.windows.net/vulnerability-assessment"
string storageAccountNamePart = settings.StorageContainerPath.Split(new string[] { "https://" }, StringSplitOptions.RemoveEmptyEntries)[0];
if (!string.IsNullOrEmpty(storageAccountNamePart))
{
storageAccountName = storageAccountNamePart.Split(new string[] { "." }, StringSplitOptions.RemoveEmptyEntries)[0];
}

#if!NETSTANDARD
CloudBlob cloudBlob = new CloudBlob(new Uri(settings.StorageContainerPath));
storageBlobContainerName = cloudBlob.Container.Name;
#endif
storageBlobContainerName = settings.StorageContainerPath.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault();
}

var databaseVulnerabilityAssessmentSettingsModel = new DatabaseVulnerabilityAssessmentSettingsModel
Expand Down

0 comments on commit a9d0f28

Please sign in to comment.