Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix for updating profile map cache automatically for new profiles #115

Merged
merged 2 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Az.BootStrapper/Az.BootStrapper.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<authors>Microsoft Corporation</authors>
<owners>Microsoft Corporation</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://aka.ms/azps-license</licenseUrl>
<licenseUrl>https://aka.ms/azsps-license</licenseUrl>
<projectUrl>https://github.com/Azure/azurestack-powershell</projectUrl>
<description>Microsoft Azure PowerShell: Az.BootStrapper cmdlets</description>
<releaseNotes></releaseNotes>
<releaseNotes>BugFix - Updating Profile Map cache automatically for new profiles</releaseNotes>
<copyright>Microsoft Corporation. All rights reserved.</copyright>
<tags>Az.BootStrapper PSModule AzureStack</tags>
</metadata>
<files>
<file src="Module\**\*" />
</files>
</package>
</package>
8 changes: 3 additions & 5 deletions src/Az.BootStrapper/Module/Az.BootStrapper.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 7/6/2017
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'Az.Bootstrapper.psm1'

# Version number of this module.
ModuleVersion = '1.0.0'
ModuleVersion = '1.0.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -107,7 +105,7 @@ PrivateData = @{
Tags = 'Azure','Az','AzureStack','PSModule','Profile','ResourceManager'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'
LicenseUri = 'https://aka.ms/azsps-license'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/Azure/azurestack-powershell'
Expand All @@ -116,7 +114,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* 0.1.0: Initial release Az.BootStrapper, Module to assist in installing the required Az modules for AzureStack Hub'
ReleaseNotes = 'BugFix - Updating Profile Map cache automatically for new profiles'

# External dependent modules of this module
# ExternalModuleDependencies = ''
Expand Down
7 changes: 4 additions & 3 deletions src/Az.BootStrapper/Module/Az.Bootstrapper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,8 @@ function Add-ScopeParam
function Add-ProfileParam
{
param([System.Management.Automation.RuntimeDefinedParameterDictionary]$params, [string]$set = "__AllParameterSets")
$ProfileMap = (Get-AzProfileMap)
# Update Profile Map cache from the blob endpoint
$ProfileMap = (Get-AzProfileMap -Update)
$AllProfiles = ($ProfileMap | Get-Member -MemberType NoteProperty).Name
$profileAttribute = New-Object -Type System.Management.Automation.ParameterAttribute
$profileAttribute.ParameterSetName = $set
Expand Down Expand Up @@ -1014,7 +1015,7 @@ function Use-AzProfile
PROCESS
{
$Force = $PSBoundParameters.Force
$ProfileMap = (Get-AzProfileMap -update)
$ProfileMap = Get-AzProfileMap
$Profile = $PSBoundParameters.Profile
$Scope = $PSBoundParameters.Scope
$Modules = $PSBoundParameters.Module
Expand Down Expand Up @@ -1111,7 +1112,7 @@ function Install-AzProfile
}

PROCESS {
$ProfileMap = (Get-AzProfileMap -update)
$ProfileMap = Get-AzProfileMap
$Profile = $PSBoundParameters.Profile
$Scope = $PSBoundParameters.Scope
$Modules = ($ProfileMap.$Profile | Get-Member -MemberType NoteProperty).Name
Expand Down