Skip to content

Commit 8c8431d

Browse files
committed
Update
1 parent 5383138 commit 8c8431d

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-FunctionCommand.ps1

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ param(
2323
[Parameter(Mandatory = $true)]
2424
[string]$ModelClassNameSpace,
2525

26-
# CLI commands or PS cmdlets
27-
[Parameter(Mandatory = $false)]
28-
[string]$ToolType = "CLI",
29-
3026
[Parameter(Mandatory = $false)]
3127
[string]$CmdletNounPrefix = "Azure",
3228

@@ -954,21 +950,14 @@ function Generate-CliFunctionCommandImpl
954950
return $code;
955951
}
956952

957-
if ($ToolType -eq 'CLI')
958-
{
959-
Write-Output (Generate-CliFunctionCommandImpl $OperationName $MethodInfo $ModelClassNameSpace $FileOutputFolder);
960-
}
961-
else
962-
{
963-
$componentName = Get-ComponentName $ModelClassNameSpace;
964-
$invoke_cmdlet_class_name = 'InvokeAzure' + $componentName + 'MethodCmdlet';
965-
$parameter_cmdlet_class_name = 'NewAzure' + $componentName + 'ArgumentListCmdlet';
966-
Generate-PsFunctionCommandImpl -fileOutputFolder $FileOutputFolder `
967-
-opShortName $OperationName `
968-
-operation_method_info $MethodInfo `
969-
-invoke_cmdlet_class_name $invoke_cmdlet_class_name `
970-
-parameter_cmdlet_class_name $parameter_cmdlet_class_name;
971-
972-
# CLI Function Command Code
973-
Write-Output (. $PSScriptRoot\Generate-FunctionCommand.ps1 $OperationName $MethodInfo $ModelClassNameSpace "CLI" "Azure" $FileOutputFolder);
974-
}
953+
$componentName = Get-ComponentName $ModelClassNameSpace;
954+
$invoke_cmdlet_class_name = 'InvokeAzure' + $componentName + 'MethodCmdlet';
955+
$parameter_cmdlet_class_name = 'NewAzure' + $componentName + 'ArgumentListCmdlet';
956+
Generate-PsFunctionCommandImpl -fileOutputFolder $FileOutputFolder `
957+
-opShortName $OperationName `
958+
-operation_method_info $MethodInfo `
959+
-invoke_cmdlet_class_name $invoke_cmdlet_class_name `
960+
-parameter_cmdlet_class_name $parameter_cmdlet_class_name;
961+
962+
# CLI Function Command Code
963+
Write-Output (Generate-CliFunctionCommandImpl $OperationName $MethodInfo $ModelClassNameSpace $FileOutputFolder);

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/RunCodeGeneration.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,6 @@ else
12211221
$outputs = (. $PSScriptRoot\Generate-FunctionCommand.ps1 -OperationName $opShortName `
12221222
-MethodInfo $methodInfo `
12231223
-ModelClassNameSpace $client_model_namespace `
1224-
-ToolType 'PS' `
12251224
-CmdletNounPrefix 'Azure' `
12261225
-FileOutputFolder $opOutFolder);
12271226

0 commit comments

Comments
 (0)