-
Notifications
You must be signed in to change notification settings - Fork 31
Add-AzsScaleUnitNode + CI bugfixing #38
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7a5b37e
Remove comments in custom files to fix missing synopsis
LingyunSu 1bec238
Parameter change in Add-AzsScaleUnitNode + CI bugfixing
LingyunSu 4e51c0d
Add-AzsScaleUnitNode Parameter set fix.
LingyunSu 95bd170
Add release note and version update for Fabric.Admin
LingyunSu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| <# | ||
| .Synopsis | ||
| Scales out a scale unit. | ||
| .Description | ||
| Scales out a scale unit. | ||
| .Example | ||
| To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/add-azsscaleunitnode | ||
| .Inputs | ||
| Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity | ||
| .Outputs | ||
| System.Boolean | ||
| .Notes | ||
| COMPLEX PARAMETER PROPERTIES | ||
| To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. | ||
|
|
||
| INPUTOBJECT <IFabricAdminIdentity>: Identity Parameter | ||
| [Drive <String>]: Name of the storage drive. | ||
| [EdgeGateway <String>]: Name of the edge gateway. | ||
| [EdgeGatewayPool <String>]: Name of the edge gateway pool. | ||
| [FabricLocation <String>]: Fabric location. | ||
| [FileShare <String>]: Fabric file share name. | ||
| [IPPool <String>]: IP pool name. | ||
| [Id <String>]: Resource identity path | ||
| [InfraRole <String>]: Infrastructure role name. | ||
| [InfraRoleInstance <String>]: Name of an infrastructure role instance. | ||
| [Location <String>]: Location of the resource. | ||
| [LogicalNetwork <String>]: Name of the logical network. | ||
| [LogicalSubnet <String>]: Name of the logical subnet. | ||
| [MacAddressPool <String>]: Name of the MAC address pool. | ||
| [Operation <String>]: Operation identifier. | ||
| [ResourceGroupName <String>]: Name of the resource group. | ||
| [ScaleUnit <String>]: Name of the scale units. | ||
| [ScaleUnitNode <String>]: Name of the scale unit node. | ||
| [SlbMuxInstance <String>]: Name of a SLB MUX instance. | ||
| [StorageSubSystem <String>]: Name of the storage system. | ||
| [SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. | ||
| [Volume <String>]: Name of the storage volume. | ||
| [BmciPv4Address <String>]: BMC address of the physical machine. | ||
| [ComputerName <String>]: Computer name of the physical machine. | ||
| .Link | ||
| https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/add-azsscaleunitnode | ||
| #> | ||
| function Add-AzsScaleUnitNode { | ||
| [OutputType([System.Boolean])] | ||
| [CmdletBinding(DefaultParameterSetName='ScaleExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] | ||
| param( | ||
| [Parameter(ParameterSetName='Scale')] | ||
| [Parameter(ParameterSetName='ScaleExpanded')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')] | ||
| [System.String] | ||
| # Location of the resource. | ||
| ${Location}, | ||
|
|
||
| [Parameter(ParameterSetName='Scale')] | ||
| [Parameter(ParameterSetName='ScaleExpanded')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')] | ||
| [System.String] | ||
| # Name of the resource group. | ||
| ${ResourceGroupName}, | ||
|
|
||
| [Parameter(ParameterSetName='Scale', Mandatory)] | ||
| [Parameter(ParameterSetName='ScaleExpanded', Mandatory)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [System.String] | ||
| # Name of the scale units. | ||
| ${ScaleUnit}, | ||
|
|
||
| [Parameter(ParameterSetName='Scale')] | ||
| [Parameter(ParameterSetName='ScaleExpanded')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] | ||
| [System.String] | ||
| # Subscription credentials that uniquely identify Microsoft Azure subscription. | ||
| # The subscription ID forms part of the URI for every service call. | ||
| ${SubscriptionId}, | ||
|
|
||
| [Parameter(ParameterSetName='ScaleViaIdentity', Mandatory, ValueFromPipeline)] | ||
| [Parameter(ParameterSetName='ScaleViaIdentityExpanded', Mandatory, ValueFromPipeline)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity] | ||
| # Identity Parameter | ||
| # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. | ||
| ${InputObject}, | ||
|
|
||
| [Parameter(ParameterSetName='ScaleExpanded')] | ||
| [Parameter(ParameterSetName='ScaleViaIdentityExpanded')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Body')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Flag indicates if the operation should wait for storage to converge before returning. | ||
| ${AwaitStorageConvergence}, | ||
|
|
||
| [Parameter(ParameterSetName='ScaleExpanded', Mandatory)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [System.String] | ||
| # BMC address of the physical machine. | ||
| ${BmciPv4Address}, | ||
|
|
||
| [Parameter(ParameterSetName='ScaleExpanded', Mandatory)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] | ||
| [System.String] | ||
| # Computer name of the physical machine. | ||
LingyunSu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ${ComputerName}, | ||
|
|
||
| [Parameter()] | ||
| [Alias('AzureRMContext', 'AzureCredential')] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Azure')] | ||
| [System.Management.Automation.PSObject] | ||
| # The credentials, account, tenant, and subscription used for communication with Azure. | ||
| ${DefaultProfile}, | ||
|
|
||
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Run the command as a job | ||
| ${AsJob}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Wait for .NET debugger to attach | ||
| ${Break}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.SendAsyncStep[]] | ||
| # SendAsync Pipeline Steps to be appended to the front of the pipeline | ||
| ${HttpPipelineAppend}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.SendAsyncStep[]] | ||
| # SendAsync Pipeline Steps to be prepended to the front of the pipeline | ||
| ${HttpPipelinePrepend}, | ||
|
|
||
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Run the command asynchronously | ||
| ${NoWait}, | ||
|
|
||
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Returns true when the command succeeds | ||
| ${PassThru}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Uri] | ||
| # The URI for the proxy server to use | ||
| ${Proxy}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Management.Automation.PSCredential] | ||
| # Credentials for a proxy server to use for the remote call | ||
| ${ProxyCredential}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Use the default credentials for the proxy | ||
| ${ProxyUseDefaultCredentials} | ||
| ) | ||
|
|
||
| process { | ||
|
|
||
| $NewNode = New-Object -TypeName Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.Api20160501.ScaleOutScaleUnitParameters | ||
| $NewNode.BmciPv4Address = ${BmciPv4Address} | ||
| $NewNode.ComputerName = ${ComputerName} | ||
| $PSBoundParameters['NodeList'] = $NewNode | ||
|
|
||
| if ($PSBoundParameters.ContainsKey(('BmciPv4Address'))){ | ||
| $null = $PSBoundParameters.Remove('BmciPv4Address') | ||
| } | ||
|
|
||
| if ($PSBoundParameters.ContainsKey(('ComputerName'))){ | ||
| $null = $PSBoundParameters.Remove('ComputerName') | ||
| } | ||
|
|
||
| Azs.Fabric.Admin.internal\Add-AzsScaleUnitNode @PSBoundParameters | ||
LingyunSu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
src/Azs.Fabric.Admin/custom/Get-AzsInfrastructureRoleInstance.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.