Skip to content

[Azure Stack][Admin] Fabric for Azure Stack 1.5.0 #7070

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

Merged
merged 6 commits into from
Sep 6, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Licensed under the MIT License. See License.txt in the project root for license
RootModule = 'Azs.Fabric.Admin.psm1'

# Version number of this module.
ModuleVersion = '0.1.2'
ModuleVersion = '0.2.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand All @@ -38,7 +38,7 @@ Licensed under the MIT License. See License.txt in the project root for license
Description = 'Fabric Admin Client'

# Minimum version of the Windows PowerShell engine required by this module
# PowerShellVersion = ''
PowerShellVersion = '5.0'

# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''
Expand All @@ -56,8 +56,8 @@ Licensed under the MIT License. See License.txt in the project root for license
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; RequiredVersion = '3.4.1'; },
@{ModuleName = 'AzureRM.Resources'; RequiredVersion = '4.4.1'; })
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '5.5.1'; },
@{ModuleName = 'AzureRM.Resources'; ModuleVersion = '6.0.2'; })

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()
Expand Down Expand Up @@ -114,19 +114,54 @@ Licensed under the MIT License. See License.txt in the project root for license
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
# Tags = @()
Tags = @('AzureStack', 'Fabric', 'Admin', 'Azure Stack Fabric', 'Infrastructure', 'Scale Unit', 'FRP')

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

# A URL to the main website for this project.
# ProjectUri = ''
ProjectUri = 'https://github.com/Azure/azure-powershell'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''
ReleaseNotes = '## 2018.8.12
* New Module dependencies
* AzureRM.Profile
* AzureRM.Resources
* New cmdlet
* Add-AzsScaleUnitNode
* New-AzsScaleUnitNodeObject
* Support handling names of nested resources
* Add-AzsScaleUnitNode
* Disable-AzsScaleUnitNode
* Enable-AzsScaleUnitNode
* Get-AzsEdgeGateway
* Get-AzsEdgeGatewayPool
* Get-AzsInfrastructureRole
* Get-AzsInfrastructureRoleInstance
* Get-AzsInfrastructureShare
* Get-AzsInfrastructureVolume
* Get-AzsIpPool
* Get-AzsLogicalNetwork
* Get-AzsLogicalSubnet
* Get-AzsMacAddressPool
* Get-AzsScaleUnit
* Get-AzsScaleUnitNode
* Get-AzsSlbMuxInstance
* Get-AzsStoragePool
* Get-AzsStorageSystem
* Repair-AzsScaleUnitNode
* Restart-AzsInfrastructureRole
* Restart-AzsInfrastructureRoleInstance
* Start-AzsInfrastructureRoleInstance
* Start-AzsScaleUnitNode
* Stop-AzsInfrastructureRoleInstance
* Stop-AzsScaleUnitNode
* Bug fixes
* Handle ErrrorAction correctly now
'

} # End of PSData hashtable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ if (Test-Path -Path $ClrPath -PathType Container) {
. (Join-Path -Path $PSScriptRoot -ChildPath 'Get-ApplicableFilters.ps1')
. (Join-Path -Path $PSScriptRoot -ChildPath 'Test-FilteredResult.ps1')
. (Join-Path -Path $PSScriptRoot -ChildPath 'Get-ArmResourceIdParameterValue.ps1')
. (Join-Path -Path $PSScriptRoot -ChildPath 'Get-ResourceNameSuffix.ps1')
$allPs1FilesPath = Join-Path -Path $PSScriptRoot -ChildPath 'Generated.PowerShell.Commands' | Join-Path -ChildPath '*.ps1'
Get-ChildItem -Path $allPs1FilesPath -Recurse -File | ForEach-Object { . $_.FullName}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function Add-AzsScaleUnitNode

Process {

$ScaleUnit = Get-ResourceName -ResourceName $ScaleUnit


$NewServiceClient_params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ function Suspend-AzsInfrastructureRoleInstance {
$ResourceGroupName = $ArmResourceIdParameterValues['resourceGroupName']
$Location = $ArmResourceIdParameterValues['location']
$Name = $ArmResourceIdParameterValues['infraRoleInstance']
} else {
$Name = Get-ResourceNameSuffix -ResourceName $Name
}

if ($PSCmdlet.ShouldProcess("$Name" , "Disable infrastructure role instance")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ function Disable-AzsScaleUnitNode {

Process {



if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
$GetArmResourceIdParameterValue_params = @{
IdTemplate = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnitNodes/{scaleUnitNode}'
Expand All @@ -93,6 +91,8 @@ function Disable-AzsScaleUnitNode {
$ResourceGroupName = $ArmResourceIdParameterValues['resourceGroupName']
$Location = $ArmResourceIdParameterValues['location']
$Name = $ArmResourceIdParameterValues['scaleUnitNode']
} else {
$Name = Get-ResourceNameSuffix -ResourceName $Name
}

if ($PSCmdlet.ShouldProcess("$Name" , "Disable scale unit node")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function Enable-AzsScaleUnitNode {

Process {


if ('ResourceId' -eq $PsCmdlet.ParameterSetName) {
$GetArmResourceIdParameterValue_params = @{
IdTemplate = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric.Admin/fabricLocations/{location}/scaleUnitNodes/{scaleUnitNode}'
Expand All @@ -92,6 +91,8 @@ function Enable-AzsScaleUnitNode {
$ResourceGroupName = $ArmResourceIdParameterValues['resourceGroupName']
$Location = $ArmResourceIdParameterValues['location']
$Name = $ArmResourceIdParameterValues['scaleUnitNode']
} else {
$Name = Get-ResourceNameSuffix -ResourceName $Name
}

if ($PSCmdlet.ShouldProcess("$Name" , "Enable scale unit node")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ function Get-AzsEdgeGateway {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -166,7 +164,9 @@ function Get-AzsEdgeGateway {
}
return
}

if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.EdgeGateways.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function Get-AzsEdgeGatewayPool {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.EdgeGatewayPools.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ function Get-AzsInfrastructureRole {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.InfraRoles.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ function Get-AzsInfrastructureRoleInstance {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -169,6 +167,7 @@ function Get-AzsInfrastructureRoleInstance {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.InfraRoleInstances.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ function Get-AzsInfrastructureShare {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -153,6 +151,7 @@ function Get-AzsInfrastructureShare {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.FileShares.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ function Get-AzsInfrastructureVolume {

Process {


$StoragePool = Get-ResourceNameSuffix -ResourceName $StoragePool
$StorageSystem = Get-ResourceNameSuffix -ResourceName $StorageSystem

$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
Expand All @@ -130,8 +131,6 @@ function Get-AzsInfrastructureVolume {

$FabricAdminClient = New-ServiceClient @NewServiceClient_params



$oDataQuery = ""
if ($Filter) {
$oDataQuery += "&`$Filter=$Filter"
Expand Down Expand Up @@ -190,6 +189,7 @@ function Get-AzsInfrastructureVolume {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.Volumes.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $StorageSystem, $StoragePool, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function Get-AzsIpPool {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.IpPools.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ function Get-AzsLogicalNetwork {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.LogicalNetworks.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ function Get-AzsLogicalSubnet {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -140,6 +138,9 @@ function Get-AzsLogicalSubnet {
$logicalNetwork = $ArmResourceIdParameterValues['logicalNetwork']
$Name = $ArmResourceIdParameterValues['logicalSubnet']
} else {

$LogicalNetwork = Get-ResourceNameSuffix -ResourceName $LogicalNetwork

if ([System.String]::IsNullOrEmpty($Location)) {
$Location = (Get-AzureRMLocation).Location
}
Expand Down Expand Up @@ -178,6 +179,7 @@ function Get-AzsLogicalSubnet {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.LogicalSubnets.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $LogicalNetwork, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ function Get-AzsMacAddressPool {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.MacAddressPools.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ function Get-AzsScaleUnit {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -168,6 +166,7 @@ function Get-AzsScaleUnit {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.ScaleUnits.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ function Get-AzsScaleUnitNode {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -169,6 +167,7 @@ function Get-AzsScaleUnitNode {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.ScaleUnitNodes.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function Get-AzsSlbMuxInstance {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.SlbMuxInstances.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ function Get-AzsStoragePool {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -141,6 +139,9 @@ function Get-AzsStoragePool {
$StorageSystem = $ArmResourceIdParameterValues['storageSubSystem']
$Name = $ArmResourceIdParameterValues['storagePool']
} else {

$StorageSystem = Get-ResourceNameSuffix -ResourceName $StorageSystem

if ([System.String]::IsNullOrEmpty($Location)) {
$Location = (Get-AzureRMLocation).Location
}
Expand Down Expand Up @@ -179,6 +180,7 @@ function Get-AzsStoragePool {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.StoragePools.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $StorageSystem, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ function Get-AzsStorageSystem {

Process {



$NewServiceClient_params = @{
FullClientTypeName = 'Microsoft.AzureStack.Management.Fabric.Admin.FabricAdminClient'
}
Expand Down Expand Up @@ -169,6 +167,7 @@ function Get-AzsStorageSystem {
return
}
if ('Get' -eq $PsCmdlet.ParameterSetName -or 'ResourceId' -eq $PsCmdlet.ParameterSetName) {
$Name = Get-ResourceNameSuffix -ResourceName $Name
Write-Verbose -Message 'Performing operation GetWithHttpMessagesAsync on $FabricAdminClient.'
$TaskResult = $FabricAdminClient.StorageSystems.GetWithHttpMessagesAsync($ResourceGroupName, $Location, $Name)
} elseif ('List' -eq $PsCmdlet.ParameterSetName) {
Expand Down
Loading