Skip to content

Commit 44baf45

Browse files
committed
Recover Deployment Operations
1 parent 407d4d2 commit 44baf45

File tree

2 files changed

+62
-118
lines changed

2 files changed

+62
-118
lines changed

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

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,11 +2208,15 @@ else
22082208
$cliCommandCodeMainBody = "";
22092209

22102210
# Write Operation Cmdlet Files
2211+
$operation_type_count = 0;
2212+
$total_operation_type_count = $filtered_types.Count;
22112213
foreach ($ft in $filtered_types)
22122214
{
2215+
$operation_type_count++;
2216+
22132217
Write-Verbose '';
22142218
Write-Verbose $BAR_LINE;
2215-
Write-Verbose $ft.Name;
2219+
Write-Verbose ("${operation_type_count}/${total_operation_type_count} " + $ft.Name);
22162220
Write-Verbose $BAR_LINE;
22172221

22182222
$opShortName = Get-OperationShortName $ft.Name;
@@ -2224,6 +2228,8 @@ else
22242228
$st = mkdir -Force $opOutFolder;
22252229

22262230
$methods = $ft.GetMethods();
2231+
2232+
$total_method_count = 0;
22272233
foreach ($mtItem in $methods)
22282234
{
22292235
[System.Reflection.MethodInfo]$mt = $mtItem;
@@ -2233,10 +2239,25 @@ else
22332239
continue;
22342240
}
22352241

2242+
$total_method_count++;
2243+
}
2244+
2245+
$method_count = 0;
2246+
foreach ($mtItem in $methods)
2247+
{
2248+
[System.Reflection.MethodInfo]$mt = $mtItem;
2249+
if ($mt.Name.StartsWith('Begin') -and $mt.Name.Contains('ing'))
2250+
{
2251+
# Skip 'Begin*ing*' Calls for Now...
2252+
continue;
2253+
}
2254+
2255+
$method_count++;
2256+
22362257
# Output Info for Method Signature
22372258
Write-Verbose "";
22382259
Write-Verbose $SEC_LINE;
2239-
Write-Verbose $mt.Name.Replace('Async', '');
2260+
Write-Verbose ("[${operation_type_count}] ${method_count}/${total_method_count} " + $mt.Name.Replace('Async', ''));
22402261
foreach ($paramInfoItem in $mt.GetParameters())
22412262
{
22422263
[System.Reflection.ParameterInfo]$paramInfo = $paramInfoItem;
@@ -2254,12 +2275,19 @@ else
22542275
$invoke_cmdlet_method_code += $outputs[-3];
22552276
$parameter_cmdlet_method_code += $outputs[-2];
22562277

2257-
# TODO : Comment Out RDFE Deployment APIs
2278+
22582279
if ($opShortName -eq 'Deployment' -and $client_library_namespace -like '*.WindowsAzure.*')
22592280
{
2260-
$cliCommandCodeMainBody += "/*" + $NEW_LINE;
2261-
$cliCommandCodeMainBody += $outputs[-1].Replace("/*", "").Replace("*/", "");
2262-
$cliCommandCodeMainBody += $NEW_LINE + "*/" + $NEW_LINE;
2281+
$output_code = $outputs[-1];
2282+
2283+
<# TODO : Comment Out RDFE Deployment APIs
2284+
if ($method_count -gt 100)
2285+
{
2286+
$output_code = "/*" + $NEW_LINE + $output_code.Replace("/*", "").Replace("*/", "") + $NEW_LINE + "*/" + $NEW_LINE;
2287+
}
2288+
#>
2289+
2290+
$cliCommandCodeMainBody += $output_code;
22632291
}
22642292
else
22652293
{

0 commit comments

Comments
 (0)