Removed GetAzureStorageAccountKey.ps1 and added to RDFELibs function.
This commit is contained in:
Родитель
c490a7f379
Коммит
551796592d
|
@ -6235,7 +6235,32 @@ Function RetryOperation($operation, $description, $expectResult=$null, $maxRetry
|
|||
} while ($True)
|
||||
|
||||
return $null
|
||||
}#endregion
|
||||
}
|
||||
|
||||
Function GetStorageAccountKey ($xmlConfig)
|
||||
{
|
||||
if ( $UseAzureResourceManager )
|
||||
{
|
||||
$storageAccountName = $xmlConfig.config.Azure.General.ARMStorageAccount
|
||||
$StorageAccounts = Get-AzureStorageAccount
|
||||
foreach ($SA in $StorageAccounts)
|
||||
{
|
||||
if ( $SA.Name -eq $storageAccountName )
|
||||
{
|
||||
LogMsg "Getting $storageAccountName storage account key..."
|
||||
$storageAccountKey = (Get-AzureStorageAccountKey -ResourceGroupName $SA.ResourceGroupName -Name $SA.Name).Key1
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$storageAccountName = $xmlConfig.config.Azure.General.StorageAccount
|
||||
LogMsg "Getting $storageAccountName storage account key..."
|
||||
$storageAccountKey = (Get-AzureStorageKey -StorageAccountName $storageAccountName).Primary
|
||||
}
|
||||
return $storageAccountKey
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LinuxUtilities
|
||||
Function GetFilePathsFromLinuxFolder ([string]$folderToSearch, $IpAddress, $SSHPort, $username, $password, $maxRetryCount=20)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<Publisher>Microsoft.OSTCExtensions</Publisher>
|
||||
<PrivateConfiguration>
|
||||
<storageAccountName>EXECUTE-PS-if($UseAzureResourceManager){$xmlConfig.config.Azure.General.ARMStorageAccount}else{$xmlConfig.config.Azure.General.StorageAccount}</storageAccountName>
|
||||
<storageAccountKey>EXECUTE-PS-.\remote-scripts\GetStorageAccountKey.ps1 -xmlConfig $xmlConfig</storageAccountKey>
|
||||
<storageAccountKey>EXECUTE-PS-GetStorageAccountKey -xmlConfig $xmlConfig</storageAccountKey>
|
||||
</PrivateConfiguration>
|
||||
<Version>2.*</Version>
|
||||
<LatestVersion>2.0</LatestVersion>
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
param($xmlConfig)
|
||||
if ( $UseAzureResourceManager )
|
||||
{
|
||||
$storageAccountName = $xmlConfig.config.Azure.General.ARMStorageAccount
|
||||
$StorageAccounts = Get-AzureStorageAccount
|
||||
foreach ($SA in $StorageAccounts)
|
||||
{
|
||||
if ( $SA.Name -eq $storageAccountName )
|
||||
{
|
||||
LogMsg "Getting $storageAccountName storage account key..."
|
||||
$storageAccountKey = (Get-AzureStorageAccountKey -ResourceGroupName $SA.ResourceGroupName -Name $SA.Name).Key1
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$storageAccountName = $xmlConfig.config.Azure.General.StorageAccount
|
||||
LogMsg "Getting $storageAccountName storage account key..."
|
||||
$storageAccountKey = (Get-AzureStorageKey -StorageAccountName $storageAccountName).Primary
|
||||
}
|
||||
return $storageAccountKey
|
Загрузка…
Ссылка в новой задаче