Skip to content

Commit 3326582

Browse files
Replace use of AzureRM with Azure Blob Storage REST API to remove dependency of AzureRM (#139)
1 parent f701419 commit 3326582

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/Outsystems.SetupTools/Lib/PlatformSetup.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,14 +1002,13 @@ function GetPlatformVersion([string]$SCHost)
10021002

10031003
function GetAzStorageFileList()
10041004
{
1005-
$stoAccountName = (([System.Uri]$OSRepoURL).Host).Split('.')[0]
1006-
$stoContainer = ([System.Uri]$OSRepoURL).Segments[1]
1007-
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1 -Stream 2 -Message "Getting file list from storage account $stoAccountName container $stoContainer"
10081005

1009-
$stoCtx = New-AzureStorageContext -StorageAccountName $stoAccountName -Anonymous -ErrorAction Stop
1006+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1 -Stream 2 -Message "Getting file list from storage account $stoAccountName container $stoContainer"
10101007

10111008
$ProgressPreference = "SilentlyContinue"
1012-
$sources = $(Get-AzureStorageBlob -Container $stoContainer -Context $stoCtx -ErrorAction Stop).Name
1009+
[xml]$result = (Invoke-RestMethod -Uri $($OSRepoURL+"?restype=container&comp=list")).Substring(3)
1010+
1011+
$sources = $result.EnumerationResults.Blobs.Blob.Name
10131012

10141013
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1 -Stream 2 -Message "Returning $($sources.Count)"
10151014

src/Outsystems.SetupTools/OutSystems.SetupTools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Description = 'Tools for installing and manage the OutSystems platform installat
5151
ProcessorArchitecture = 'Amd64'
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @('AzureRM.Storage')
54+
#RequiredModules = @()
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = @(

0 commit comments

Comments
 (0)