Skip to content

Commit

Permalink
Removing GetViaIdentity1 in Get-AzVmRuncommand For Fixing generation …
Browse files Browse the repository at this point in the history
…branch (#16328)

* first check in

* adding tests

* examples and docs

* cleaning up utils.ps1

* adding Az.Compute.psd1

* Update README.md

* adding to tests

* Update src/Compute/Compute.Autorest/README.md

Co-authored-by: Yeming Liu <[email protected]>

* removing branch

* adding tests rerecording some

* removing getviaidentity1

Co-authored-by: Yeming Liu <[email protected]>
  • Loading branch information
haagha and isra-fel authored Nov 3, 2021
1 parent a8e1eaf commit f9b6dea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
6 changes: 5 additions & 1 deletion src/Compute/Compute.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ input-file:
# You need to specify your swagger files here.
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/stable/2021-07-01/runCommands.json
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
# For new RP, the version is 0.1.0
# For new RP, the version is 0.1.0
module-version: 0.1.0
# Normally, title is the service name
title: Compute
Expand Down Expand Up @@ -75,4 +75,8 @@ directive:
verb: Update
subject: VmssVMRunCommand|VMRunCommand
remove: true
- where:
subject: VmssVMRunCommand|VMRunCommand
variant: ^GetViaIdentity1
remove: true
```
14 changes: 4 additions & 10 deletions src/Compute/Compute.Autorest/docs/Get-AzVMRunCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ Get-AzVMRunCommand -ResourceGroupName <String> -RunCommandName <String> -VMName
Get-AzVMRunCommand -InputObject <IComputeIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
```

### GetViaIdentity1
```
Get-AzVMRunCommand -InputObject <IComputeIdentity> [-Expand <String>] [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

### List1
```
Get-AzVMRunCommand -ResourceGroupName <String> -VMName <String> [-SubscriptionId <String[]>]
Expand All @@ -54,7 +48,7 @@ Gets specific run command for a subscription in a location.

## EXAMPLES

### Example 1: Get Run Command by Name
### Example 1: Get RunCommand by Name
```powershell
PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand2"
Expand All @@ -65,7 +59,7 @@ eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands

Get Run Command by it's name.

### Example 2: Get Run Commands by VM
### Example 2: Get RunCommands by VM
```powershell
PS C:\> Get-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname
Expand Down Expand Up @@ -115,7 +109,7 @@ The expand expression to apply on the operation.
```yaml
Type: System.String
Parameter Sets: Get1, GetViaIdentity1, List1
Parameter Sets: Get1, List1
Aliases:

Required: False
Expand All @@ -131,7 +125,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity
Parameter Sets: GetViaIdentity, GetViaIdentity1
Parameter Sets: GetViaIdentity
Aliases:

Required: True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Describe 'Get-AzVMRunCommand' {
Write-Host $env.rgname
New-AzVM -ResourceGroupName $rgname -Location "eastus" -Name $vmname -Credential $cred
Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand1' -Location "eastus"

}

It 'List' {
Expand All @@ -46,10 +47,6 @@ Describe 'Get-AzVMRunCommand' {
Get-AzVMRunCommand -CommandId RunPowerShellScript -Location eastus
}

It 'GetViaIdentity1' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}

It 'GetViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
Expand Down

0 comments on commit f9b6dea

Please sign in to comment.