Skip to content

Commit a488e9e

Browse files
committed
Fix Delete Method Name Problem
1 parent 1a36fc8 commit a488e9e

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/ResourceManager/Compute/Commands.Compute/Generated/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5667,7 +5667,7 @@ exports.init = function (cli) {
56675667
cli.output.info('vmScaleSetName = ' + options.vmScaleSetName);
56685668
var subscription = profile.current.getSubscription(options.subscription);
56695669
var computeManagementClient = utils.createComputeResourceProviderClient(subscription);
5670-
var result = computeManagementClient.virtualMachineScaleSets.delete(options.resourceGroupName, options.vmScaleSetName, _);
5670+
var result = computeManagementClient.virtualMachineScaleSets.deleteMethod(options.resourceGroupName, options.vmScaleSetName, _);
56715671
cli.output.json(result);
56725672
});
56735673
/*
@@ -6270,7 +6270,7 @@ exports.init = function (cli) {
62706270
cli.output.info('instanceId = ' + options.instanceId);
62716271
var subscription = profile.current.getSubscription(options.subscription);
62726272
var computeManagementClient = utils.createComputeResourceProviderClient(subscription);
6273-
var result = computeManagementClient.virtualMachineScaleSetVMs.delete(options.resourceGroupName, options.vmScaleSetName, options.instanceId, _);
6273+
var result = computeManagementClient.virtualMachineScaleSetVMs.deleteMethod(options.resourceGroupName, options.vmScaleSetName, options.instanceId, _);
62746274
cli.output.json(result);
62756275
});
62766276
/*

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,18 @@ function Generate-CliFunctionCommandImpl
218218
}
219219
$code += " var subscription = profile.current.getSubscription(options.subscription);" + $NEW_LINE;
220220
$code += " var computeManagementClient = utils.createComputeResourceProviderClient(subscription);" + $NEW_LINE;
221-
$code += " var result = computeManagementClient.${cliOperationName}s.${cliMethodName}(";
221+
222+
if ($cliMethodName -eq 'delete')
223+
{
224+
$cliMethodFuncName = $cliMethodName + 'Method';
225+
}
226+
else
227+
{
228+
$cliMethodFuncName = $cliMethodName;
229+
}
230+
231+
$code += " var result = computeManagementClient.${cliOperationName}s.${cliMethodFuncName}(";
232+
222233
for ($index = 0; $index -lt $methodParamNameList.Count; $index++)
223234
{
224235
# Function Call - For Each Method Parameter

0 commit comments

Comments
 (0)