diff --git a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs index c20368454452..80ff808d035d 100644 --- a/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs +++ b/src/ResourceManager/Compute/Commands.Compute/Extension/AEM/GetAzureRmVMAEMExtension.cs @@ -127,11 +127,6 @@ public override void ExecuteCmdlet() }); } - private void WriteInformation(string message, params string[] args) - { - base.WriteInformation(String.Format(message, args), new string[0]); - } - private void WriteVerbose(string message, params object[] args) { base.WriteVerbose(String.Format(message, args)); diff --git a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs index 50a9b946e131..dd3202eb7114 100644 --- a/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs +++ b/src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.Profile.Test { public class ProfileModuleTests { - [Fact(Skip="Removed flaky test from CI.")] + [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] public void WarningOnIncompatibleVersions() { diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterObject.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterObject.ps1 index 491cf2c3384e..94b944b51ff2 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterObject.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterObject.ps1 @@ -12,18 +12,27 @@ # limitations under the License. # ---------------------------------------------------------------------------------- -param( - [Parameter(Mandatory = $true)] - [System.Type]$typeInfo = $null +[CmdletBinding(DefaultParameterSetName = "ByTypeInfo")] +param +( + [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'ByTypeInfo')] + [System.Type]$TypeInfo = $null, + + [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'ByFullTypeNameAndDllPath')] + [string]$TypeFullName = $null, + + [Parameter(Mandatory = $true, Position = 1, ParameterSetName = 'ByFullTypeNameAndDllPath')] + [string]$DllFullPath = $null ) function Create-ParameterObjectImpl { - param( - [Parameter(Mandatory = $True)] + param + ( + [Parameter(Mandatory = $true)] [System.Type]$typeInfo, - [Parameter(Mandatory = $True)] + [Parameter(Mandatory = $true)] [System.Collections.Hashtable]$typeList ) @@ -34,32 +43,32 @@ function Create-ParameterObjectImpl if ($typeInfo.FullName -like "Microsoft.*Azure.Management.*.*" -and (-not ($typeInfo.FullName -like "Microsoft.*Azure.Management.*.SubResource"))) { - $typeList.Add($typeInfo.FullName, $typeInfo); + $st = $typeList.Add($typeInfo.FullName, $typeInfo); } if ($typeInfo.FullName -eq 'System.String' -or $typeInfo.FullName -eq 'string') { - return ''; + $obj = ''; } - if ($typeInfo.FullName -eq 'System.Uri') + elseif ($typeInfo.FullName -eq 'System.Uri') { - return '' -as 'System.Uri'; + $obj = '' -as 'System.Uri'; } elseif ($typeInfo.FullName -eq 'System.Boolean') { - return $false; + $obj = $false; } elseif ($typeInfo.FullName -eq 'System.Int32') { - return 0; + $obj = 0; } elseif ($typeInfo.FullName -eq 'System.UInt32') { - return 0; + $obj = 0; } elseif ($typeInfo.FullName -eq 'System.Byte[]') { - return New-Object -TypeName System.Byte[] -ArgumentList 0; + $obj = New-Object -TypeName System.Byte[] -ArgumentList 0; } elseif ($typeInfo.FullName -like 'System.Collections.Generic.IList*' -or $typeInfo.FullName -like 'System.Collections.Generic.List*') { @@ -70,16 +79,16 @@ function Create-ParameterObjectImpl $listObj = New-Object -TypeName $typeName; $listObj.Add($itemObj); - return $listObj; + $obj = $listObj; } elseif ($typeInfo.FullName -like 'System.Collections.Generic.IDictionary*') { # Dictionary in client library always consists of string key & values. - return New-Object 'System.Collections.Generic.Dictionary[string,string]'; + $obj = New-Object 'System.Collections.Generic.Dictionary[string,string]'; } elseif ($typeInfo.FullName -like 'System.Nullable*') { - return $null; + $obj = $null; } else { @@ -101,19 +110,28 @@ function Create-ParameterObjectImpl $listTypeName = "System.Collections.Generic.List[" + $itemType.FullName + "]"; $propObjList = New-Object -TypeName $listTypeName; - $propObjList.Add($itemObj); + $st = $propObjList.Add($itemObj); - $prop.SetValue($obj, $propObjList -as $listTypeName); + $st = $prop.SetValue($obj, $propObjList -as $listTypeName); } else { $propObj = Create-ParameterObjectImpl $prop.PropertyType $typeList; - $prop.SetValue($obj, $propObj); + $st = $prop.SetValue($obj, $propObj); } } } + $st = $typeList.Remove($typeInfo.FullName); + return $obj; } -Write-Output (Create-ParameterObjectImpl $typeInfo @{}); +if (($TypeFullName -ne $null) -and ($TypeFullName.Trim() -ne '')) +{ + . "$PSScriptRoot\Import-AssemblyFunction.ps1"; + $dll = Load-AssemblyFile $DllFullPath; + $TypeInfo = $dll.GetType($TypeFullName); +} + +Write-Output (Create-ParameterObjectImpl $TypeInfo @{}); \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterTree.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterTree.ps1 index 376d3d0e09c7..9968751c7ae8 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterTree.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Create-ParameterTree.ps1 @@ -12,14 +12,24 @@ # limitations under the License. # ---------------------------------------------------------------------------------- -param( - [Parameter(Mandatory = $true)] - [System.Type]$TypeInfo, - - [Parameter(Mandatory = $true)] +[CmdletBinding(DefaultParameterSetName = "ByTypeInfo")] +param +( + [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'ByTypeInfo')] + [System.Type]$TypeInfo = $null, + + [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'ByFullTypeNameAndDllPath')] + [string]$TypeFullName = $null, + + [Parameter(Mandatory = $true, Position = 1, ParameterSetName = 'ByFullTypeNameAndDllPath')] + [string]$DllFullPath = $null, + + [Parameter(Mandatory = $true, Position = 1, ParameterSetName = 'ByTypeInfo')] + [Parameter(Mandatory = $true, Position = 2, ParameterSetName = 'ByFullTypeNameAndDllPath')] [string]$NameSpace, - [Parameter(Mandatory = $false)] + [Parameter(Mandatory = $false, Position = 2, ParameterSetName = 'ByTypeInfo')] + [Parameter(Mandatory = $false, Position = 3, ParameterSetName = 'ByFullTypeNameAndDllPath')] [string]$ParameterName = $null ) @@ -174,4 +184,11 @@ function Create-ParameterTreeImpl } } +if (($TypeFullName -ne $null) -and ($TypeFullName.Trim() -ne '')) +{ + . "$PSScriptRoot\Import-AssemblyFunction.ps1"; + $dll = Load-AssemblyFile $DllFullPath; + $TypeInfo = $dll.GetType($TypeFullName); +} + Write-Output (Create-ParameterTreeImpl $ParameterName $TypeInfo @{}); diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-PowershellParameterCmdlet.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-PowershellParameterCmdlet.ps1 index b119fa8d0862..ffea727f9a5c 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-PowershellParameterCmdlet.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-PowershellParameterCmdlet.ps1 @@ -1099,7 +1099,7 @@ $cmdlet_remove_object_code $fileFullPath = $OutputFolder + $cmdlet_class_name + ".cs"; $full_code = $code_common_header + "`r`n`r`n" + $code_usings + "`r`n" + $cmdlet_class_code + "`r`n" + $cmdlet_code_body; - Set-Content -Path $fileFullPath -Value $full_code -Force; + Set-FileContent -Path $fileFullPath -Value $full_code; } # Decide the name of cmdlet verb diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-CommonVariables.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-CommonVariables.ps1 index 98d9fdd6b8f5..2d23bb567593 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-CommonVariables.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-CommonVariables.ps1 @@ -73,9 +73,9 @@ $code_common_header = // code is regenerated. "@; -$client_model_namespace = $client_library_namespace + '.Models'; -$is_hyak_mode = $client_library_namespace -like "Microsoft.WindowsAzure.*.*"; -$component_name = $client_library_namespace.Substring($client_library_namespace.LastIndexOf('.') + 1); +$clientModelNameSpace = $clientNameSpace + '.Models'; +$is_hyak_mode = $clientNameSpace -like "Microsoft.WindowsAzure.*.*"; +$component_name = $clientNameSpace.Substring($clientNameSpace.LastIndexOf('.') + 1); $all_return_type_names = @(); @@ -85,25 +85,49 @@ Write-Verbose $BAR_LINE; Write-Verbose "Input Parameters:"; Write-Verbose "DLL Folder = $dllFolder"; Write-Verbose "Out Folder = $outFolder"; -Write-Verbose "Client NameSpace = $client_library_namespace"; -Write-Verbose "Model NameSpace = $client_model_namespace"; +Write-Verbose "Client NameSpace = $clientNameSpace"; +Write-Verbose "Model NameSpace = $clientModelNameSpace"; Write-Verbose "Component Name = $component_name"; Write-Verbose "Base Cmdlet Full Name = $baseCmdletFullName"; -Write-Verbose "Base Client Name = $base_class_client_field"; +Write-Verbose "Base Client Full Name = $baseClientFullName"; Write-Verbose "Cmdlet Flavor = $cmdletFlavor"; Write-Verbose "Operation Name Filter = $operationNameFilter"; Write-Verbose $BAR_LINE; Write-Verbose "${new_line_str}"; -$code_common_namespace = ($client_library_namespace.Replace('.Management.', '.Commands.')) + '.Automation'; -$code_model_namespace = ($client_library_namespace.Replace('.Management.', '.Commands.')) + '.Automation.Models'; +$code_common_namespace = ($clientNameSpace.Replace('.Management.', '.Commands.')) + '.Automation'; +$code_model_namespace = ($clientNameSpace.Replace('.Management.', '.Commands.')) + '.Automation.Models'; function Get-SortedUsingsCode { - $list_of_usings = @() + $code_common_usings + $client_library_namespace + $client_model_namespace + $code_model_namespace; + $list_of_usings = @() + $code_common_usings + $clientNameSpace + $clientModelNameSpace + $code_model_namespace; $sorted_usings = $list_of_usings | Sort-Object -Unique | foreach { "using ${_};" }; $text = [string]::Join($NEW_LINE, $sorted_usings); return $text; } -$code_using_strs = Get-SortedUsingsCode; \ No newline at end of file +$code_using_strs = Get-SortedUsingsCode; + +function Get-RomanNumeral +{ + param + ( + [Parameter(Mandatory = $true)] + $number + ) + + if ($number -ge 1000) { return "M" + (Get-RomanNumeral ($number - 1000)); } + if ($number -ge 900) { return "CM" + (Get-RomanNumeral ($number - 900)); } + if ($number -ge 500) { return "D" + (Get-RomanNumeral ($number - 500)); } + if ($number -ge 400) { return "CD" + (Get-RomanNumeral ($number - 400)); } + if ($number -ge 100) { return "C" + (Get-RomanNumeral ($number - 100)); } + if ($number -ge 90) { return "XC" + (Get-RomanNumeral ($number - 90)); } + if ($number -ge 50) { return "L" + (Get-RomanNumeral ($number - 50)); } + if ($number -ge 40) { return "XL" + (Get-RomanNumeral ($number - 40)); } + if ($number -ge 10) { return "X" + (Get-RomanNumeral ($number - 10)); } + if ($number -ge 9) { return "IX" + (Get-RomanNumeral ($number - 9)); } + if ($number -ge 5) { return "V" + (Get-RomanNumeral ($number - 5)); } + if ($number -ge 4) { return "IV" + (Get-RomanNumeral ($number - 4)); } + if ($number -ge 1) { return "I" + (Get-RomanNumeral ($number - 1)); } + return ""; +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-TypeFunction.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-TypeFunction.ps1 index b598af110064..29a5c1f61dd5 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-TypeFunction.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-TypeFunction.ps1 @@ -202,7 +202,7 @@ function Get-NormalizedTypeName } $outputName = $inputName; - $client_model_namespace_prefix = $client_model_namespace + '.'; + $clientModelNameSpacePrefix = $clientModelNameSpace + '.'; if ($inputName -eq 'System.String') { @@ -228,9 +228,9 @@ function Get-NormalizedTypeName { return 'char'; } - elseif ($inputName.StartsWith($client_model_namespace_prefix)) + elseif ($inputName.StartsWith($clientModelNameSpacePrefix)) { - $outputName = $inputName.Substring($client_model_namespace_prefix.Length); + $outputName = $inputName.Substring($clientModelNameSpacePrefix.Length); } $outputName = $outputName.Replace('+', '.'); @@ -327,9 +327,9 @@ function Get-ConstructorCode } else { - if ($InputName.StartsWith($client_model_namespace + ".")) + if ($InputName.StartsWith($clientModelNameSpace + ".")) { - $InputName = $InputName.Replace($client_model_namespace + ".", ''); + $InputName = $InputName.Replace($clientModelNameSpace + ".", ''); } elseif ($InputName.StartsWith('System.Collections.Generic.')) { diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-WriterFunction.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-WriterFunction.ps1 index 47e9a3966fae..668d4b9771d7 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-WriterFunction.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Import-WriterFunction.ps1 @@ -40,5 +40,1052 @@ function Write-CmdletCodeFile # Write Ending Bracket $code += "}"; - $st = Set-Content -Path $FilePath -Value $code -Force; + $st = Set-FileContent -Path $FilePath -Value $code; +} + +function Set-FileContent +{ + param + ( + [Parameter(Mandatory = $true)] + [string]$Path, + + [Parameter(Mandatory = $true)] + $Value + ) + + $t = 0; + $maxIteration = 10; + while ($t -lt $maxIteration) + { + $t++; + try + { + $st = Set-Content -Path $Path -Value $Value -Force; + } + catch + { + if (($_.Exception.Message -like "*Stream was not readable.") ` + -or ($_.Exception.Message -like "The process cannot access the file*")) + { + $fileName = Split-Path $Path -Leaf; + [string]$message = $_.Exception.Message; + [string]$shortMsg = $message.SubString(0, [System.Math]::Min(30, $message.Length)); + Write-Warning "#${t}:File=${fileName};Error=${shortMsg}..."; + sleep -Milliseconds 10; + } + else + { + Write-Error $_.Exception.Message; + return; + } + } + + break; + } + + if ($_ -ne $null -and $_.Exception -ne $null) + { + Write-Error $_.Exception.Message; + } +} + + +function Write-PSArgumentFile +{ + param( + [Parameter(Mandatory = $True)] + [string]$file_full_path + ) + + $model_source_code_text = +@" +${code_common_header} + +$code_using_strs + +namespace ${code_model_namespace} +{ + public class PSArgument + { + public string Name { get; set; } + + public Type Type { get; set; } + + public object Value { get; set; } + } +} +"@; + + $st = Set-FileContent -Path $file_full_path -Value $model_source_code_text; +} + +function Write-BaseCmdletFile +{ + # e.g. + # public abstract class ComputeAutomationBaseCmdlet : Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet + param( + [Parameter(Mandatory = $True)] + [string]$file_full_path, + + [Parameter(Mandatory = $True)] + $operation_name_list, + + [Parameter(Mandatory = $True)] + $client_class_info + ) + + [System.Reflection.PropertyInfo[]]$propItems = $client_class_info.GetProperties(); + + $operation_get_code = ""; + foreach ($operation_name in $operation_name_list) + { + # Write-Verbose ('Operation Name = ' + $operation_name); + $opShortName = Get-OperationShortName $operation_name; + $opPropName = $opShortName; + foreach ($propItem in $propItems) + { + if ($propItem.PropertyType.Name -eq ('I' + $opShortName + 'Operations')) + { + $opPropName = $propItem.Name; + break; + } + } + + $operation_get_template = +@" + public I${opShortName}Operations ${opShortName}Client + { + get + { + return ${baseClientFullName}.${opPropName}; + } + } +"@; + + if (-not ($operation_get_code -eq "")) + { + $operation_get_code += ($NEW_LINE * 2); + } + + $operation_get_code += $operation_get_template; + } + + $cmdlet_source_code_text = +@" +${code_common_header} + +$code_using_strs + +namespace ${code_common_namespace} +{ + public abstract class ${component_name}AutomationBaseCmdlet : $baseCmdletFullName + { + protected static PSArgument[] ConvertFromObjectsToArguments(string[] names, object[] objects) + { + var arguments = new PSArgument[objects.Length]; + + for (int index = 0; index < objects.Length; index++) + { + arguments[index] = new PSArgument + { + Name = names[index], + Type = objects[index].GetType(), + Value = objects[index] + }; + } + + return arguments; + } + + protected static object[] ConvertFromArgumentsToObjects(object[] arguments) + { + if (arguments == null) + { + return null; + } + + var objects = new object[arguments.Length]; + + for (int index = 0; index < arguments.Length; index++) + { + if (arguments[index] is PSArgument) + { + objects[index] = ((PSArgument)arguments[index]).Value; + } + else + { + objects[index] = arguments[index]; + } + } + + return objects; + } + +${operation_get_code} + } +} +"@; + + $st = Set-FileContent -Path $file_full_path -Value $cmdlet_source_code_text; +} + +# Write Invoke Compute Client Cmdlet +function Write-InvokeCmdletFile +{ + # e.g. + # public partial class InvokeAzureComputeMethodCmdlet : ComputeAutomationBaseCmdlet, IDynamicParameters + + param( + [Parameter(Mandatory = $True)] + [string]$file_full_path, + + [Parameter(Mandatory = $True)] + [string]$invoke_cmdlet_name, + + [Parameter(Mandatory = $True)] + [string]$base_cmdlet_name, + + [Parameter(Mandatory = $True)] + $client_class_info, + + [Parameter(Mandatory = $True)] + $operation_type_list, + + [Parameter(Mandatory = $True)] + $invoke_cmdlet_method_code, + + [Parameter(Mandatory = $True)] + $dynamic_param_method_code + ) + + $indents = " " * 8; + $get_set_block = '{ get; set; }'; + + $cmdlet_verb = "Invoke"; + $cmdlet_verb_code = $verbs_lifecycle_invoke; + + $cmdlet_file_name_suffix = 'Cmdlet' + $cmdlet_class_name = $cmdlet_verb + $invoke_cmdlet_name.Replace($cmdlet_verb, ''); + $cmdlet_noun = $invoke_cmdlet_name.Replace($cmdlet_verb, '').Replace($cmdlet_file_name_suffix, ''); + + $normalized_output_type_name = 'object'; + $all_method_names = @(); + + foreach ($operation_type in $operation_type_list) + { + $op_short_name = Get-OperationShortName $operation_type.Name; + $op_short_name = $op_short_name.Replace('ScaleSets', 'ScaleSet').Replace('ScaleSetVMs', 'ScaleSetVM'); + $operation_method_info_list = Get-OperationMethods $operation_type; + + foreach ($method in $operation_method_info_list) + { + if ($method.Name -like 'Begin*') + { + continue; + } + elseif ($method.Name -like '*Async') + { + continue; + } + + $invoke_param_set_name = $op_short_name + $method.Name.Replace('Async', ''); + $all_method_names += $invoke_param_set_name; + } + } + + $all_method_names_with_quotes = $all_method_names | foreach { "`"" + $_ + "`"" }; + $all_method_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_method_names_with_quotes); + $validate_all_method_names_code = +@" + [ValidateSet( + $all_method_names_str + )] +"@; + + $dynamic_param_set_name = "InvokeByDynamicParameters"; + $static_param_set_name = "InvokeByStaticParameters"; + $param_set_code += +@" + [Parameter(Mandatory = true, ParameterSetName = `"$dynamic_param_set_name`", Position = 0)] + [Parameter(Mandatory = true, ParameterSetName = `"$static_param_set_name`", Position = 0)] +$validate_all_method_names_code + public virtual string MethodName $get_set_block + +"@; + + $dynamic_parameters_code = ""; + $operations_code = ""; + foreach ($method_name in $all_method_names) + { + if ($method_name.Contains("ScaleSets")) + { + $method_name = $method_name.Replace("ScaleSets", "ScaleSet"); + } + elseif ($method_name.Contains("ScaleSetVMs")) + { + $method_name = $method_name.Replace("ScaleSetVMs", "ScaleSetVM"); + } + + $operation_code_template = +@" + case `"${method_name}`" : + Execute${method_name}Method(argumentList); + break; +"@; + $operations_code += $operation_code_template + $NEW_LINE; + + + $dynamic_param_code_template = +@" + case `"${method_name}`" : return Create${method_name}DynamicParameters(); +"@; + $dynamic_parameters_code += $dynamic_param_code_template + $NEW_LINE; + } + + $execute_client_action_code = +@" + protected object ParseParameter(object input) + { + if (input is PSObject) + { + return (input as PSObject).BaseObject; + } + else + { + return input; + } + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteClientAction(() => + { + if (ParameterSetName.StartsWith(`"$dynamic_param_set_name`")) + { + argumentList = ConvertDynamicParameters(dynamicParameters); + } + else + { + argumentList = ConvertFromArgumentsToObjects((object[])dynamicParameters[`"ArgumentList`"].Value); + } + + switch (MethodName) + { +${operations_code} default : WriteWarning(`"Cannot find the method by name = `'`" + MethodName + `"`'.`"); break; + } + }); + } +"@; + + # $invoke_cmdlet_method_code_content = ([string]::Join($NEW_LINE, $invoke_cmdlet_method_code)); + # $dynamic_param_method_code_content = ([string]::Join($NEW_LINE, $dynamic_param_method_code)); + + $cmdlet_source_code_text = +@" +${code_common_header} + +$code_using_strs + +namespace ${code_common_namespace} +{ + [Cmdlet(${cmdlet_verb_code}, `"${cmdlet_noun}`", DefaultParameterSetName = `"$dynamic_param_set_name`")] + [OutputType(typeof(${normalized_output_type_name}))] + public partial class $cmdlet_class_name : $base_cmdlet_name, IDynamicParameters + { + protected RuntimeDefinedParameterDictionary dynamicParameters; + protected object[] argumentList; + + protected static object[] ConvertDynamicParameters(RuntimeDefinedParameterDictionary parameters) + { + List paramList = new List(); + + foreach (var param in parameters) + { + paramList.Add(param.Value.Value); + } + + return paramList.ToArray(); + } + +${param_set_code} +${execute_client_action_code} +$invoke_cmdlet_method_code_content + + public virtual object GetDynamicParameters() + { + switch (MethodName) + { +${dynamic_parameters_code} default : break; + } + + return null; + } +$dynamic_param_method_code_content + } +} +"@; + + $st = Set-FileContent -Path $file_full_path -Value $cmdlet_source_code_text; +} + +# Write New Invoke Parameters Cmdlet +function Write-InvokeParameterCmdletFile +{ + param( + [Parameter(Mandatory = $True)] + [string]$file_full_path, + + [Parameter(Mandatory = $True)] + [string]$parameter_cmdlet_name, + + [Parameter(Mandatory = $True)] + [string]$base_cmdlet_name, + + [Parameter(Mandatory = $True)] + $client_class_info, + + [Parameter(Mandatory = $True)] + $operation_type_list, + + [Parameter(Mandatory = $True)] + $parameter_cmdlet_method_code + ) + + $indents = " " * 8; + $get_set_block = '{ get; set; }'; + + $cmdlet_verb = "New"; + $cmdlet_verb_code = $verbs_common_new; + + $cmdlet_file_name_suffix = 'Cmdlet' + $cmdlet_class_name = $cmdlet_verb + $parameter_cmdlet_name.Replace($cmdlet_verb, ''); + $cmdlet_noun = $parameter_cmdlet_name.Replace($cmdlet_verb, '').Replace($cmdlet_file_name_suffix, ''); + + $normalized_output_type_name = 'object'; + $all_method_names = @(); + $all_param_type_names = @(); + $constructor_code_hashmap = @{}; + + foreach ($operation_type in $operation_type_list) + { + $op_short_name = Get-OperationShortName $operation_type.Name; + $operation_method_info_list = Get-OperationMethods $operation_type; + $parameter_type_info_list = @(); + + foreach ($method in $operation_method_info_list) + { + if ($method.Name -like 'Begin*') + { + continue; + } + elseif ($method.Name -like '*Async') + { + continue; + } + + $invoke_param_set_name = $op_short_name + $method.Name.Replace('Async', ''); + $all_method_names += $invoke_param_set_name; + + [System.Reflection.ParameterInfo]$parameter_type_info = (Get-MethodComplexParameter $method $clientNameSpace); + + if (($parameter_type_info -ne $null) -and (($parameter_type_info_list | where { $_.ParameterType.FullName -eq $parameter_type_info.FullName }).Count -eq 0)) + { + $parameter_type_info_list += $parameter_type_info; + + $parameter_type_short_name = Get-ParameterTypeShortName $parameter_type_info.ParameterType; + if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) + { + # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' + $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); + } + $parameter_type_short_name = $op_short_name + $parameter_type_short_name; + + $parameter_type_full_name = Get-ParameterTypeFullName $parameter_type_info.ParameterType; + if (-not($all_param_type_names -contains $parameter_type_short_name)) + { + $all_param_type_names += $parameter_type_short_name; + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); + } + } + } + } + } + + $all_method_names_with_quotes = $all_method_names | foreach { "`"" + $_ + "`"" }; + $all_method_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_method_names_with_quotes); + $validate_all_method_names_code = +@" + [ValidateSet( + $all_method_names_str + )] +"@; + + $param_set_of_create_by_method_name = "CreateParameterListByMethodName"; + + $param_set_code += +@" + [Parameter(ParameterSetName = `"$param_set_of_create_by_method_name`", Mandatory = true, Position = 0)] +$validate_all_method_names_code + public virtual string MethodName $get_set_block + +"@; + + + $operations_code = ""; + foreach ($method_name in $all_method_names) + { + if ($method_name.Contains("ScaleSets")) + { + $singular_method_name = $method_name.Replace("ScaleSets", "ScaleSet"); + } + elseif ($method_name.Contains("ScaleSetVMs")) + { + $singular_method_name = $method_name.Replace("ScaleSetVMs", "ScaleSetVM"); + } + else + { + $singular_method_name = $method_name; + } + + $operation_code_template = +@" + case `"${method_name}`" : WriteObject(Create${singular_method_name}Parameters(), true); break; +"@; + $operations_code += $operation_code_template + $NEW_LINE; + } + + $execute_client_action_code = +@" + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteClientAction(() => + { + if (ParameterSetName == `"CreateParameterListByMethodName`") + { + switch (MethodName) + { +${operations_code} default : WriteWarning(`"Cannot find the method by name = `'`" + MethodName + `"`'.`"); break; + } + } + }); + } +"@; + + # $parameter_cmdlet_method_code_content = ([string]::Join($NEW_LINE, $parameter_cmdlet_method_code)); + + $cmdlet_source_code_text = +@" +${code_common_header} + +$code_using_strs + +namespace ${code_common_namespace} +{ + [Cmdlet(${cmdlet_verb_code}, `"${cmdlet_noun}`", DefaultParameterSetName = `"$param_set_of_create_by_method_name`")] + [OutputType(typeof(${normalized_output_type_name}))] + public partial class $cmdlet_class_name : $base_cmdlet_name + { +${param_set_code} +${execute_client_action_code} +$parameter_cmdlet_method_code_content + } +} +"@; + + $st = Set-FileContent -Path $file_full_path -Value $cmdlet_source_code_text; +} + + +# Write New Parameter Object Cmdlet +function Write-NewParameterObjectCmdletFile +{ + param( + [Parameter(Mandatory = $True)] + [string]$file_full_path, + + [Parameter(Mandatory = $True)] + [string]$new_object_cmdlet_class_name, + + [Parameter(Mandatory = $True)] + [string]$base_cmdlet_name, + + [Parameter(Mandatory = $True)] + $client_class_info, + + [Parameter(Mandatory = $True)] + $operation_type_list, + + [Parameter(Mandatory = $True)] + $parameter_cmdlet_method_code + ) + + $indents = " " * 8; + $get_set_block = '{ get; set; }'; + + $cmdlet_verb = "New"; + $cmdlet_verb_code = $verbs_common_new; + + $cmdlet_file_name_suffix = 'Cmdlet' + $cmdlet_class_name = $cmdlet_verb + $new_object_cmdlet_class_name.Replace($cmdlet_verb, ''); + $cmdlet_noun = $new_object_cmdlet_class_name.Replace($cmdlet_verb, '').Replace($cmdlet_file_name_suffix, ''); + + $normalized_output_type_name = 'object'; + $all_method_names = @(); + $all_param_type_names = @(); + $constructor_code_hashmap = @{}; + $all_param_full_type_names = @(); + + foreach ($operation_type in $operation_type_list) + { + $op_short_name = Get-OperationShortName $operation_type.Name; + $operation_method_info_list = Get-OperationMethods $operation_type; + $parameter_type_info_list = @(); + + foreach ($method in $operation_method_info_list) + { + if ($method.Name -like 'Begin*') + { + continue; + } + elseif ($method.Name -like '*Async') + { + continue; + } + + $invoke_param_set_name = $op_short_name + $method.Name.Replace('Async', ''); + $all_method_names += $invoke_param_set_name; + + [System.Reflection.ParameterInfo]$parameter_type_info = (Get-MethodComplexParameter $method $clientNameSpace); + + if (($parameter_type_info -ne $null) -and (($parameter_type_info_list | where { $_.ParameterType.FullName -eq $parameter_type_info.FullName }).Count -eq 0)) + { + $parameter_type_info_list += $parameter_type_info; + + $parameter_type_short_name = Get-ParameterTypeShortName $parameter_type_info.ParameterType; + if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) + { + # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' + $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); + } + $parameter_type_short_name = $op_short_name + $parameter_type_short_name; + + $parameter_type_full_name = Get-ParameterTypeFullName $parameter_type_info.ParameterType; + if (-not($all_param_type_names -contains $parameter_type_short_name)) + { + $all_param_type_names += $parameter_type_short_name; + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); + } + } + + if (-not($all_param_full_type_names -contains $parameter_type_full_name)) + { + $all_param_full_type_names += $parameter_type_full_name; + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_full_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_full_name, (Get-ConstructorCode $parameter_type_full_name)); + } + } + + # Run Through the Sub Parameter List + $subParamTypeList = Get-SubComplexParameterList $parameter_type_info $clientNameSpace; + + if ($subParamTypeList.Count -gt 0) + { + foreach ($sp in $subParamTypeList) + { + if (-not $sp.IsGenericType) + { + $parameter_type_short_name = Get-ParameterTypeShortName $sp; + if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) + { + # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' + $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); + } + $parameter_type_short_name = $op_short_name + $parameter_type_short_name; + + $parameter_type_full_name = Get-ParameterTypeFullName $sp; + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); + } + + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_full_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_full_name, (Get-ConstructorCode $parameter_type_full_name)); + } + } + else + { + $parameter_type_short_name = Get-ParameterTypeShortName $sp $true; + if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) + { + # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' + $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); + } + $parameter_type_short_name = $op_short_name + $parameter_type_short_name; + + $parameter_type_full_name = Get-ParameterTypeFullName $sp $true; + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); + } + + if (-not $constructor_code_hashmap.ContainsKey($parameter_type_full_name)) + { + $st = $constructor_code_hashmap.Add($parameter_type_full_name, (Get-ConstructorCode $parameter_type_full_name)); + } + } + + if (-not($all_param_type_names -contains $parameter_type_short_name)) + { + $all_param_type_names += $parameter_type_short_name; + } + + if (-not($all_param_full_type_names -contains $parameter_type_full_name)) + { + $all_param_full_type_names += $parameter_type_full_name; + } + } + } + } + } + } + + $all_param_type_names = $all_param_type_names | Sort; + $all_param_type_names_with_quotes = $all_param_type_names | foreach { "`"" + $_ + "`"" }; + $all_param_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_param_type_names_with_quotes); + $validate_all_param_names_code = +@" + [ValidateSet( + $all_param_names_str + )] +"@; + + $all_param_full_type_names = $all_param_full_type_names | Sort; + $all_param_full_type_names_with_quotes = $all_param_full_type_names | foreach { "`"" + $_ + "`"" }; + $all_param_full_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_param_full_type_names_with_quotes); + $validate_all_param_full_names_code = +@" + [ValidateSet( + $all_param_full_names_str + )] +"@; + + $param_set_of_create_by_type_name = "CreateParameterObjectByFriendlyName"; + $param_set_of_create_by_full_type_name = "CreateParameterObjectByFullName"; + + $param_set_code += +@" + [Parameter(ParameterSetName = `"$param_set_of_create_by_type_name`", Mandatory = true, Position = 0)] +$validate_all_param_names_code + public string FriendlyName $get_set_block + + [Parameter(ParameterSetName = `"$param_set_of_create_by_full_type_name`", Mandatory = true, Position = 0)] +$validate_all_param_full_names_code + public string FullName $get_set_block + +"@; + + + $operations_code = ""; + foreach ($method_name in $all_method_names) + { + + $operation_code_template = +@" + case `"${method_name}`" : WriteObject(Create${method_name}Parameters()); break; +"@; + $operations_code += $operation_code_template + $NEW_LINE; + } + + $type_operations_code = ""; + foreach ($type_name in $all_param_type_names) + { + $constructor_code = $constructor_code_hashmap.Get_Item($type_name); + $type_code_template = +@" + case `"${type_name}`" : WriteObject(${constructor_code}); break; +"@; + $type_operations_code += $type_code_template + $NEW_LINE; + } + + $full_type_operations_code = ""; + foreach ($type_name in $all_param_full_type_names) + { + $constructor_code = $constructor_code_hashmap.Get_Item($type_name); + $full_type_code_template = +@" + case `"${type_name}`" : WriteObject(${constructor_code}); break; +"@; + $full_type_operations_code += $full_type_code_template + $NEW_LINE; + } + + $execute_client_action_code = +@" + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteClientAction(() => + { + if (ParameterSetName == `"$param_set_of_create_by_type_name`") + { + switch (FriendlyName) + { +${type_operations_code} default : WriteWarning(`"Cannot find the type by FriendlyName = `'`" + FriendlyName + `"`'.`"); break; + } + } + else if (ParameterSetName == `"$param_set_of_create_by_full_type_name`") + { + switch (FullName) + { +${full_type_operations_code} default : WriteWarning(`"Cannot find the type by FullName = `'`" + FullName + `"`'.`"); break; + } + } + }); + } +"@; + + # $parameter_cmdlet_method_code_content = ([string]::Join($NEW_LINE, $parameter_cmdlet_method_code)); + + $cmdlet_source_code_text = +@" +${code_common_header} + +$code_using_strs + +namespace ${code_common_namespace} +{ + [Cmdlet(${cmdlet_verb_code}, `"${cmdlet_noun}`", DefaultParameterSetName = `"$param_set_of_create_by_full_type_name`")] + [OutputType(typeof(${normalized_output_type_name}))] + public partial class $new_object_cmdlet_class_name : $base_cmdlet_name + { +${param_set_code} +${execute_client_action_code} +$parameter_cmdlet_method_code_content + } +} +"@; + + $st = Set-FileContent -Path $file_full_path -Value $cmdlet_source_code_text; +} + +# Process the list return type +function Process-ListType +{ + param([Type] $rt, [System.String] $name) + + $result = $null; + + if ($rt -eq $null) + { + return $result; + } + + $xml = '' + $rt.FullName + ''; + $xml += '' + $rt.FullName + '' + [System.Environment]::NewLine; + $xml += '' + [System.Environment]::NewLine; + + $itemLabel = $itemName = $rt.Name; + $xml += "[Newtonsoft.Json.JsonConvert]::SerializeObject(" + "$" + "_, [Newtonsoft.Json.Formatting]::Indented)" + [System.Environment]::NewLine; + $xml += '' + [System.Environment]::NewLine; + $xml = '' + [System.Environment]::NewLine + $xml + '' + [System.Environment]::NewLine; + + # Write-Verbose ("Xml: " + $xml); + + return $xml; +} + +# Process the return type +function Process-ReturnType +{ + param([Type] $rt, [System.Array] $allrt) + + $result = ""; + + if ($rt -eq $null) + { + return @($result, $allrt); + } + + if ($allrt.Contains($rt.Name)) + { + return @($result, $allrt); + } + + $allrt += $rt.Name; + + if ($rt.Name -like '*LongRunning*' -or $rt.Name -like ('*' + $component_name + 'OperationResponse*') -or $rt.Name -like '*AzureOperationResponse*') + { + return @($result, $allrt); + } + + $xml = '' + $rt.FullName + ''; + $xml += '' + $rt.FullName + '' + [System.Environment]::NewLine; + $xml += '' + [System.Environment]::NewLine; + + $props = $rt.GetProperties([System.Reflection.BindingFlags]::Public -bor [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::Static); + + foreach ($pr1 in $props) + { + $typeStr = Get-ProperTypeName $pr1.PropertyType; + $itemLabel = $itemName = $pr1.Name; + + if ($typeStr -eq 'string' ` + -or $typeStr -eq 'string[]' ` + -or $typeStr -eq 'uint' ` + -or $typeStr -eq 'uint?' ` + -or $typeStr -eq 'int' ` + -or $typeStr -eq 'int?' ` + -or $typeStr -eq 'bool' ` + -or $typeStr -eq 'bool?' ` + -or $typeStr -eq 'DateTime' ` + -or $typeStr -eq 'DateTime?' ` + -or $typeStr -eq 'DateTimeOffset' ` + -or $typeStr -eq 'DateTimeOffset?' ` + -or $typeStr -eq 'HttpStatusCode' ) + { + $xml += "${itemName}" + [System.Environment]::NewLine; + } + elseif ($typeStr.StartsWith('IList') ` + -or $typeStr.StartsWith('IDictionary')) + { + $elementType = $pr1.PropertyType.GenericTypeArguments[0]; + + if (-not $elementType.FullName.Contains("String")) + { + if (-not $allrt.Contains($elementType.Name)) + { + $allrt += $elementType.Name; + $addxml = Process-ListType -rt $pr1.PropertyType.GenericTypeArguments[0] -name ${itemName}; + } + } + + $xml += " if (" + "$" + "_.${itemName} -eq $" + "null) { 0 } else { $" + "_.${itemName}.Count }" + [System.Environment]::NewLine; + $xml += " foreach ($" + "item in $" + "_.${itemName}) { [Newtonsoft.Json.JsonConvert]::SerializeObject(" + "$" + "item, [Newtonsoft.Json.Formatting]::Indented) } " + [System.Environment]::NewLine; + } + else + { + $xml += "[Newtonsoft.Json.JsonConvert]::SerializeObject(" + "$" + "_." + ${itemName} + ", [Newtonsoft.Json.Formatting]::Indented)" + [System.Environment]::NewLine; + } + } + + $xml += '' + [System.Environment]::NewLine; + $xml = '' + [System.Environment]::NewLine + $xml + '' + [System.Environment]::NewLine; + + if (-not [System.String]::IsNullOrEmpty($addxml)) + { + $xml += $addxml; + } + + # Write-Verbose ("Xml: " + $xml); + + return @($xml, $allrt) +} + +# Get proper type name +function Format-XML ([xml]$xml, $indent = 2) +{ + $StringWriter = New-Object System.IO.StringWriter; + $XmlWriter = New-Object System.XMl.XmlTextWriter $StringWriter; + $xmlWriter.Formatting = "indented"; + $xmlWriter.Indentation = $Indent; + $st = $xml.WriteContentTo($XmlWriter); + $st = $XmlWriter.Flush(); + $st = $StringWriter.Flush(); + Write-Output $StringWriter.ToString(); +} + +function Write-XmlFormatFile +{ + param( + [Parameter(Mandatory = $True)] + $xmlFilePath + ) + + $xmlCommentHeader = '' + [System.Environment]::NewLine; + + $xmlContent = [xml]($xmlCommentHeader + '' + [System.Environment]::NewLine + $formatXml + '' + [System.Environment]::NewLine); + $node = $xmlContent.CreateXmlDeclaration('1.0', 'UTF-8', $null); + $st = $xmlContent.InsertBefore($node, $xmlContent.ChildNodes[0]); + + $formattedXmlContent = Format-XML $xmlContent.OuterXml; + $st = Set-FileContent -Path $xmlFilePath -Value $formattedXmlContent; + # Write-Verbose($formattedXmlContent); +} + +# Sample: NewAzureVirtualMachineCreateParameters.cs +function Write-CLICommandFile +{ + param( + [Parameter(Mandatory = $True)] + [string]$fileOutputFolder, + + [Parameter(Mandatory = $True)] + $commandCodeLines + ) + + $fileFullPath = $fileOutputFolder + '/' + 'cli.js'; + + Write-Verbose "============================================="; + Write-Verbose "Writing CLI Command File: "; + Write-Verbose $fileFullPath; + Write-Verbose "============================================="; + + $codeContent = +@" +/** + * Copyright (c) Microsoft. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +'use strict'; + +var fs = require('fs'); +var jsonpatch = require('fast-json-patch'); + +var profile = require('../../../util/profile'); +var utils = require('../../../util/utils'); + +var $ = utils.getLocaleString; + +function beautify(jsonText) { + var obj = JSON.parse(jsonText); + return JSON.stringify(obj, null, 2); +} + +exports.init = function (cli) { + +$commandCodeLines + +}; +"@; + + $st = Set-FileContent -Path $fileFullPath -Value $codeContent; } diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Invoke-CodeGeneration.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Invoke-CodeGeneration.ps1 index e46205330345..af4c1cc4c417 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Invoke-CodeGeneration.ps1 +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Invoke-CodeGeneration.ps1 @@ -35,15 +35,15 @@ param( # The namespace of the Compute client library [Parameter(Mandatory = $true)] - [string]$client_library_namespace = 'Microsoft.WindowsAzure.Management.Compute', + [string]$clientNameSpace = 'Microsoft.WindowsAzure.Management.Compute', # The base cmdlet from which all automation cmdlets derive - [Parameter(Mandatory = $true)] + [Parameter(Mandatory = $false)] [string]$baseCmdletFullName = 'Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet', # The property field to access the client wrapper class from the base cmdlet - [Parameter(Mandatory = $true)] - [string]$base_class_client_field = 'ComputeClient', + [Parameter(Mandatory = $false)] + [string]$baseClientFullName = 'ComputeClient', # Cmdlet Code Generation Flavor # 1. Invoke (default) that uses Invoke as the verb, and Operation + Method (e.g. VirtualMachine + Get) @@ -66,1017 +66,18 @@ param( . "$PSScriptRoot\Import-StringFunction.ps1"; . "$PSScriptRoot\Import-TypeFunction.ps1"; . "$PSScriptRoot\Import-OperationFunction.ps1"; - -function Write-PSArgumentFile -{ - param( - [Parameter(Mandatory = $True)] - [string]$file_full_path - ) - - $model_source_code_text = -@" -${code_common_header} - -$code_using_strs - -namespace ${code_model_namespace} -{ - public class PSArgument - { - public string Name { get; set; } - - public Type Type { get; set; } - - public object Value { get; set; } - } -} -"@; - - $st = Set-Content -Path $file_full_path -Value $model_source_code_text -Force; -} - -function Write-BaseCmdletFile -{ - # e.g. - # public abstract class ComputeAutomationBaseCmdlet : Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet - param( - [Parameter(Mandatory = $True)] - [string]$file_full_path, - - [Parameter(Mandatory = $True)] - $operation_name_list, - - [Parameter(Mandatory = $True)] - $client_class_info - ) - - [System.Reflection.PropertyInfo[]]$propItems = $client_class_info.GetProperties(); - - $operation_get_code = ""; - foreach ($operation_name in $operation_name_list) - { - # Write-Verbose ('Operation Name = ' + $operation_name); - $opShortName = Get-OperationShortName $operation_name; - $opPropName = $opShortName; - foreach ($propItem in $propItems) - { - if ($propItem.PropertyType.Name -eq ('I' + $opShortName + 'Operations')) - { - $opPropName = $propItem.Name; - break; - } - } - - $operation_get_template = -@" - public I${opShortName}Operations ${opShortName}Client - { - get - { - return ${base_class_client_field}.${opPropName}; - } - } -"@; - - if (-not ($operation_get_code -eq "")) - { - $operation_get_code += ($NEW_LINE * 2); - } - - $operation_get_code += $operation_get_template; - } - - $cmdlet_source_code_text = -@" -${code_common_header} - -$code_using_strs - -namespace ${code_common_namespace} -{ - public abstract class ${component_name}AutomationBaseCmdlet : $baseCmdletFullName - { - protected static PSArgument[] ConvertFromObjectsToArguments(string[] names, object[] objects) - { - var arguments = new PSArgument[objects.Length]; - - for (int index = 0; index < objects.Length; index++) - { - arguments[index] = new PSArgument - { - Name = names[index], - Type = objects[index].GetType(), - Value = objects[index] - }; - } - - return arguments; - } - - protected static object[] ConvertFromArgumentsToObjects(object[] arguments) - { - if (arguments == null) - { - return null; - } - - var objects = new object[arguments.Length]; - - for (int index = 0; index < arguments.Length; index++) - { - if (arguments[index] is PSArgument) - { - objects[index] = ((PSArgument)arguments[index]).Value; - } - else - { - objects[index] = arguments[index]; - } - } - - return objects; - } - -${operation_get_code} - } -} -"@; - - $st = Set-Content -Path $file_full_path -Value $cmdlet_source_code_text -Force; -} - -# Write Invoke Compute Client Cmdlet -function Write-InvokeCmdletFile -{ - # e.g. - # public partial class InvokeAzureComputeMethodCmdlet : ComputeAutomationBaseCmdlet, IDynamicParameters - - param( - [Parameter(Mandatory = $True)] - [string]$file_full_path, - - [Parameter(Mandatory = $True)] - [string]$invoke_cmdlet_name, - - [Parameter(Mandatory = $True)] - [string]$base_cmdlet_name, - - [Parameter(Mandatory = $True)] - $client_class_info, - - [Parameter(Mandatory = $True)] - $operation_type_list, - - [Parameter(Mandatory = $True)] - $invoke_cmdlet_method_code, - - [Parameter(Mandatory = $True)] - $dynamic_param_method_code - ) - - $indents = " " * 8; - $get_set_block = '{ get; set; }'; - - $cmdlet_verb = "Invoke"; - $cmdlet_verb_code = $verbs_lifecycle_invoke; - - $cmdlet_file_name_suffix = 'Cmdlet' - $cmdlet_class_name = $cmdlet_verb + $invoke_cmdlet_name.Replace($cmdlet_verb, ''); - $cmdlet_noun = $invoke_cmdlet_name.Replace($cmdlet_verb, '').Replace($cmdlet_file_name_suffix, ''); - - $normalized_output_type_name = 'object'; - $all_method_names = @(); - - foreach ($operation_type in $operation_type_list) - { - $op_short_name = Get-OperationShortName $operation_type.Name; - $op_short_name = $op_short_name.Replace('ScaleSets', 'ScaleSet').Replace('ScaleSetVMs', 'ScaleSetVM'); - $operation_method_info_list = Get-OperationMethods $operation_type; - - foreach ($method in $operation_method_info_list) - { - if ($method.Name -like 'Begin*') - { - continue; - } - elseif ($method.Name -like '*Async') - { - continue; - } - - $invoke_param_set_name = $op_short_name + $method.Name.Replace('Async', ''); - $all_method_names += $invoke_param_set_name; - } - } - - $all_method_names_with_quotes = $all_method_names | foreach { "`"" + $_ + "`"" }; - $all_method_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_method_names_with_quotes); - $validate_all_method_names_code = -@" - [ValidateSet( - $all_method_names_str - )] -"@; - - $dynamic_param_set_name = "InvokeByDynamicParameters"; - $static_param_set_name = "InvokeByStaticParameters"; - $param_set_code += -@" - [Parameter(Mandatory = true, ParameterSetName = `"$dynamic_param_set_name`", Position = 0)] - [Parameter(Mandatory = true, ParameterSetName = `"$static_param_set_name`", Position = 0)] -$validate_all_method_names_code - public virtual string MethodName $get_set_block - -"@; - - $dynamic_parameters_code = ""; - $operations_code = ""; - foreach ($method_name in $all_method_names) - { - if ($method_name.Contains("ScaleSets")) - { - $method_name = $method_name.Replace("ScaleSets", "ScaleSet"); - } - elseif ($method_name.Contains("ScaleSetVMs")) - { - $method_name = $method_name.Replace("ScaleSetVMs", "ScaleSetVM"); - } - - $operation_code_template = -@" - case `"${method_name}`" : - Execute${method_name}Method(argumentList); - break; -"@; - $operations_code += $operation_code_template + $NEW_LINE; - - - $dynamic_param_code_template = -@" - case `"${method_name}`" : return Create${method_name}DynamicParameters(); -"@; - $dynamic_parameters_code += $dynamic_param_code_template + $NEW_LINE; - } - - $execute_client_action_code = -@" - protected object ParseParameter(object input) - { - if (input is PSObject) - { - return (input as PSObject).BaseObject; - } - else - { - return input; - } - } - - protected override void ProcessRecord() - { - base.ProcessRecord(); - ExecuteClientAction(() => - { - if (ParameterSetName.StartsWith(`"$dynamic_param_set_name`")) - { - argumentList = ConvertDynamicParameters(dynamicParameters); - } - else - { - argumentList = ConvertFromArgumentsToObjects((object[])dynamicParameters[`"ArgumentList`"].Value); - } - - switch (MethodName) - { -${operations_code} default : WriteWarning(`"Cannot find the method by name = `'`" + MethodName + `"`'.`"); break; - } - }); - } -"@; - - # $invoke_cmdlet_method_code_content = ([string]::Join($NEW_LINE, $invoke_cmdlet_method_code)); - # $dynamic_param_method_code_content = ([string]::Join($NEW_LINE, $dynamic_param_method_code)); - - $cmdlet_source_code_text = -@" -${code_common_header} - -$code_using_strs - -namespace ${code_common_namespace} -{ - [Cmdlet(${cmdlet_verb_code}, `"${cmdlet_noun}`", DefaultParameterSetName = `"$dynamic_param_set_name`")] - [OutputType(typeof(${normalized_output_type_name}))] - public partial class $cmdlet_class_name : $base_cmdlet_name, IDynamicParameters - { - protected RuntimeDefinedParameterDictionary dynamicParameters; - protected object[] argumentList; - - protected static object[] ConvertDynamicParameters(RuntimeDefinedParameterDictionary parameters) - { - List paramList = new List(); - - foreach (var param in parameters) - { - paramList.Add(param.Value.Value); - } - - return paramList.ToArray(); - } - -${param_set_code} -${execute_client_action_code} -$invoke_cmdlet_method_code_content - - public virtual object GetDynamicParameters() - { - switch (MethodName) - { -${dynamic_parameters_code} default : break; - } - - return null; - } -$dynamic_param_method_code_content - } -} -"@; - - $st = Set-Content -Path $file_full_path -Value $cmdlet_source_code_text -Force; -} - -# Write New Invoke Parameters Cmdlet -function Write-InvokeParameterCmdletFile -{ - param( - [Parameter(Mandatory = $True)] - [string]$file_full_path, - - [Parameter(Mandatory = $True)] - [string]$parameter_cmdlet_name, - - [Parameter(Mandatory = $True)] - [string]$base_cmdlet_name, - - [Parameter(Mandatory = $True)] - $client_class_info, - - [Parameter(Mandatory = $True)] - $operation_type_list, - - [Parameter(Mandatory = $True)] - $parameter_cmdlet_method_code - ) - - $indents = " " * 8; - $get_set_block = '{ get; set; }'; - - $cmdlet_verb = "New"; - $cmdlet_verb_code = $verbs_common_new; - - $cmdlet_file_name_suffix = 'Cmdlet' - $cmdlet_class_name = $cmdlet_verb + $parameter_cmdlet_name.Replace($cmdlet_verb, ''); - $cmdlet_noun = $parameter_cmdlet_name.Replace($cmdlet_verb, '').Replace($cmdlet_file_name_suffix, ''); - - $normalized_output_type_name = 'object'; - $all_method_names = @(); - $all_param_type_names = @(); - $constructor_code_hashmap = @{}; - - foreach ($operation_type in $operation_type_list) - { - $op_short_name = Get-OperationShortName $operation_type.Name; - $operation_method_info_list = Get-OperationMethods $operation_type; - $parameter_type_info_list = @(); - - foreach ($method in $operation_method_info_list) - { - if ($method.Name -like 'Begin*') - { - continue; - } - elseif ($method.Name -like '*Async') - { - continue; - } - - $invoke_param_set_name = $op_short_name + $method.Name.Replace('Async', ''); - $all_method_names += $invoke_param_set_name; - - [System.Reflection.ParameterInfo]$parameter_type_info = (Get-MethodComplexParameter $method $client_library_namespace); - - if (($parameter_type_info -ne $null) -and (($parameter_type_info_list | where { $_.ParameterType.FullName -eq $parameter_type_info.FullName }).Count -eq 0)) - { - $parameter_type_info_list += $parameter_type_info; - - $parameter_type_short_name = Get-ParameterTypeShortName $parameter_type_info.ParameterType; - if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) - { - # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' - $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); - } - $parameter_type_short_name = $op_short_name + $parameter_type_short_name; - - $parameter_type_full_name = Get-ParameterTypeFullName $parameter_type_info.ParameterType; - if (-not($all_param_type_names -contains $parameter_type_short_name)) - { - $all_param_type_names += $parameter_type_short_name; - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); - } - } - } - } - } - - $all_method_names_with_quotes = $all_method_names | foreach { "`"" + $_ + "`"" }; - $all_method_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_method_names_with_quotes); - $validate_all_method_names_code = -@" - [ValidateSet( - $all_method_names_str - )] -"@; - - $param_set_of_create_by_method_name = "CreateParameterListByMethodName"; - - $param_set_code += -@" - [Parameter(ParameterSetName = `"$param_set_of_create_by_method_name`", Mandatory = true, Position = 0)] -$validate_all_method_names_code - public virtual string MethodName $get_set_block - -"@; - - - $operations_code = ""; - foreach ($method_name in $all_method_names) - { - if ($method_name.Contains("ScaleSets")) - { - $singular_method_name = $method_name.Replace("ScaleSets", "ScaleSet"); - } - elseif ($method_name.Contains("ScaleSetVMs")) - { - $singular_method_name = $method_name.Replace("ScaleSetVMs", "ScaleSetVM"); - } - else - { - $singular_method_name = $method_name; - } - - $operation_code_template = -@" - case `"${method_name}`" : WriteObject(Create${singular_method_name}Parameters(), true); break; -"@; - $operations_code += $operation_code_template + $NEW_LINE; - } - - $execute_client_action_code = -@" - protected override void ProcessRecord() - { - base.ProcessRecord(); - ExecuteClientAction(() => - { - if (ParameterSetName == `"CreateParameterListByMethodName`") - { - switch (MethodName) - { -${operations_code} default : WriteWarning(`"Cannot find the method by name = `'`" + MethodName + `"`'.`"); break; - } - } - }); - } -"@; - - # $parameter_cmdlet_method_code_content = ([string]::Join($NEW_LINE, $parameter_cmdlet_method_code)); - - $cmdlet_source_code_text = -@" -${code_common_header} - -$code_using_strs - -namespace ${code_common_namespace} -{ - [Cmdlet(${cmdlet_verb_code}, `"${cmdlet_noun}`", DefaultParameterSetName = `"$param_set_of_create_by_method_name`")] - [OutputType(typeof(${normalized_output_type_name}))] - public partial class $cmdlet_class_name : $base_cmdlet_name - { -${param_set_code} -${execute_client_action_code} -$parameter_cmdlet_method_code_content - } -} -"@; - - $st = Set-Content -Path $file_full_path -Value $cmdlet_source_code_text -Force; -} - - -# Write New Parameter Object Cmdlet -function Write-NewParameterObjectCmdletFile -{ - param( - [Parameter(Mandatory = $True)] - [string]$file_full_path, - - [Parameter(Mandatory = $True)] - [string]$new_object_cmdlet_class_name, - - [Parameter(Mandatory = $True)] - [string]$base_cmdlet_name, - - [Parameter(Mandatory = $True)] - $client_class_info, - - [Parameter(Mandatory = $True)] - $operation_type_list, - - [Parameter(Mandatory = $True)] - $parameter_cmdlet_method_code - ) - - $indents = " " * 8; - $get_set_block = '{ get; set; }'; - - $cmdlet_verb = "New"; - $cmdlet_verb_code = $verbs_common_new; - - $cmdlet_file_name_suffix = 'Cmdlet' - $cmdlet_class_name = $cmdlet_verb + $new_object_cmdlet_class_name.Replace($cmdlet_verb, ''); - $cmdlet_noun = $new_object_cmdlet_class_name.Replace($cmdlet_verb, '').Replace($cmdlet_file_name_suffix, ''); - - $normalized_output_type_name = 'object'; - $all_method_names = @(); - $all_param_type_names = @(); - $constructor_code_hashmap = @{}; - $all_param_full_type_names = @(); - - foreach ($operation_type in $operation_type_list) - { - $op_short_name = Get-OperationShortName $operation_type.Name; - $operation_method_info_list = Get-OperationMethods $operation_type; - $parameter_type_info_list = @(); - - foreach ($method in $operation_method_info_list) - { - if ($method.Name -like 'Begin*') - { - continue; - } - elseif ($method.Name -like '*Async') - { - continue; - } - - $invoke_param_set_name = $op_short_name + $method.Name.Replace('Async', ''); - $all_method_names += $invoke_param_set_name; - - [System.Reflection.ParameterInfo]$parameter_type_info = (Get-MethodComplexParameter $method $client_library_namespace); - - if (($parameter_type_info -ne $null) -and (($parameter_type_info_list | where { $_.ParameterType.FullName -eq $parameter_type_info.FullName }).Count -eq 0)) - { - $parameter_type_info_list += $parameter_type_info; - - $parameter_type_short_name = Get-ParameterTypeShortName $parameter_type_info.ParameterType; - if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) - { - # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' - $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); - } - $parameter_type_short_name = $op_short_name + $parameter_type_short_name; - - $parameter_type_full_name = Get-ParameterTypeFullName $parameter_type_info.ParameterType; - if (-not($all_param_type_names -contains $parameter_type_short_name)) - { - $all_param_type_names += $parameter_type_short_name; - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); - } - } - - if (-not($all_param_full_type_names -contains $parameter_type_full_name)) - { - $all_param_full_type_names += $parameter_type_full_name; - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_full_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_full_name, (Get-ConstructorCode $parameter_type_full_name)); - } - } - - # Run Through the Sub Parameter List - $subParamTypeList = Get-SubComplexParameterList $parameter_type_info $client_library_namespace; - - if ($subParamTypeList.Count -gt 0) - { - foreach ($sp in $subParamTypeList) - { - if (-not $sp.IsGenericType) - { - $parameter_type_short_name = Get-ParameterTypeShortName $sp; - if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) - { - # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' - $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); - } - $parameter_type_short_name = $op_short_name + $parameter_type_short_name; - - $parameter_type_full_name = Get-ParameterTypeFullName $sp; - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); - } - - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_full_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_full_name, (Get-ConstructorCode $parameter_type_full_name)); - } - } - else - { - $parameter_type_short_name = Get-ParameterTypeShortName $sp $true; - if (($parameter_type_short_name -like "${op_short_name}*") -and ($parameter_type_short_name.Length -gt $op_short_name.Length)) - { - # Remove the common part between the parameter type name and operation short name, e.g. 'VirtualMachineDisk' - $parameter_type_short_name = $parameter_type_short_name.Substring($op_short_name.Length); - } - $parameter_type_short_name = $op_short_name + $parameter_type_short_name; - - $parameter_type_full_name = Get-ParameterTypeFullName $sp $true; - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_short_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_short_name, (Get-ConstructorCode $parameter_type_full_name)); - } - - if (-not $constructor_code_hashmap.ContainsKey($parameter_type_full_name)) - { - $st = $constructor_code_hashmap.Add($parameter_type_full_name, (Get-ConstructorCode $parameter_type_full_name)); - } - } - - if (-not($all_param_type_names -contains $parameter_type_short_name)) - { - $all_param_type_names += $parameter_type_short_name; - } - - if (-not($all_param_full_type_names -contains $parameter_type_full_name)) - { - $all_param_full_type_names += $parameter_type_full_name; - } - } - } - } - } - } - - $all_param_type_names = $all_param_type_names | Sort; - $all_param_type_names_with_quotes = $all_param_type_names | foreach { "`"" + $_ + "`"" }; - $all_param_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_param_type_names_with_quotes); - $validate_all_param_names_code = -@" - [ValidateSet( - $all_param_names_str - )] -"@; - - $all_param_full_type_names = $all_param_full_type_names | Sort; - $all_param_full_type_names_with_quotes = $all_param_full_type_names | foreach { "`"" + $_ + "`"" }; - $all_param_full_names_str = [string]::Join(',' + $NEW_LINE + (' ' * 12), $all_param_full_type_names_with_quotes); - $validate_all_param_full_names_code = -@" - [ValidateSet( - $all_param_full_names_str - )] -"@; - - $param_set_of_create_by_type_name = "CreateParameterObjectByFriendlyName"; - $param_set_of_create_by_full_type_name = "CreateParameterObjectByFullName"; - - $param_set_code += -@" - [Parameter(ParameterSetName = `"$param_set_of_create_by_type_name`", Mandatory = true, Position = 0)] -$validate_all_param_names_code - public string FriendlyName $get_set_block - - [Parameter(ParameterSetName = `"$param_set_of_create_by_full_type_name`", Mandatory = true, Position = 0)] -$validate_all_param_full_names_code - public string FullName $get_set_block - -"@; - - - $operations_code = ""; - foreach ($method_name in $all_method_names) - { - - $operation_code_template = -@" - case `"${method_name}`" : WriteObject(Create${method_name}Parameters()); break; -"@; - $operations_code += $operation_code_template + $NEW_LINE; - } - - $type_operations_code = ""; - foreach ($type_name in $all_param_type_names) - { - $constructor_code = $constructor_code_hashmap.Get_Item($type_name); - $type_code_template = -@" - case `"${type_name}`" : WriteObject(${constructor_code}); break; -"@; - $type_operations_code += $type_code_template + $NEW_LINE; - } - - $full_type_operations_code = ""; - foreach ($type_name in $all_param_full_type_names) - { - $constructor_code = $constructor_code_hashmap.Get_Item($type_name); - $full_type_code_template = -@" - case `"${type_name}`" : WriteObject(${constructor_code}); break; -"@; - $full_type_operations_code += $full_type_code_template + $NEW_LINE; - } - - $execute_client_action_code = -@" - protected override void ProcessRecord() - { - base.ProcessRecord(); - ExecuteClientAction(() => - { - if (ParameterSetName == `"$param_set_of_create_by_type_name`") - { - switch (FriendlyName) - { -${type_operations_code} default : WriteWarning(`"Cannot find the type by FriendlyName = `'`" + FriendlyName + `"`'.`"); break; - } - } - else if (ParameterSetName == `"$param_set_of_create_by_full_type_name`") - { - switch (FullName) - { -${full_type_operations_code} default : WriteWarning(`"Cannot find the type by FullName = `'`" + FullName + `"`'.`"); break; - } - } - }); - } -"@; - - # $parameter_cmdlet_method_code_content = ([string]::Join($NEW_LINE, $parameter_cmdlet_method_code)); - - $cmdlet_source_code_text = -@" -${code_common_header} - -$code_using_strs - -namespace ${code_common_namespace} -{ - [Cmdlet(${cmdlet_verb_code}, `"${cmdlet_noun}`", DefaultParameterSetName = `"$param_set_of_create_by_full_type_name`")] - [OutputType(typeof(${normalized_output_type_name}))] - public partial class $new_object_cmdlet_class_name : $base_cmdlet_name - { -${param_set_code} -${execute_client_action_code} -$parameter_cmdlet_method_code_content - } -} -"@; - - $st = Set-Content -Path $file_full_path -Value $cmdlet_source_code_text -Force; -} - -# Process the list return type -function Process-ListType -{ - param([Type] $rt, [System.String] $name) - - $result = $null; - - if ($rt -eq $null) - { - return $result; - } - - $xml = '' + $rt.FullName + ''; - $xml += '' + $rt.FullName + '' + [System.Environment]::NewLine; - $xml += '' + [System.Environment]::NewLine; - - $itemLabel = $itemName = $rt.Name; - $xml += "[Newtonsoft.Json.JsonConvert]::SerializeObject(" + "$" + "_, [Newtonsoft.Json.Formatting]::Indented)" + [System.Environment]::NewLine; - $xml += '' + [System.Environment]::NewLine; - $xml = '' + [System.Environment]::NewLine + $xml + '' + [System.Environment]::NewLine; - - # Write-Verbose ("Xml: " + $xml); - - return $xml; -} - -# Process the return type -function Process-ReturnType -{ - param([Type] $rt, [System.Array] $allrt) - - $result = ""; - - if ($rt -eq $null) - { - return @($result, $allrt); - } - - if ($allrt.Contains($rt.Name)) - { - return @($result, $allrt); - } - - $allrt += $rt.Name; - - if ($rt.Name -like '*LongRunning*' -or $rt.Name -like ('*' + $component_name + 'OperationResponse*') -or $rt.Name -like '*AzureOperationResponse*') - { - return @($result, $allrt); - } - - $xml = '' + $rt.FullName + ''; - $xml += '' + $rt.FullName + '' + [System.Environment]::NewLine; - $xml += '' + [System.Environment]::NewLine; - - $props = $rt.GetProperties([System.Reflection.BindingFlags]::Public -bor [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::Static); - - foreach ($pr1 in $props) - { - $typeStr = Get-ProperTypeName $pr1.PropertyType; - $itemLabel = $itemName = $pr1.Name; - - if ($typeStr -eq 'string' ` - -or $typeStr -eq 'string[]' ` - -or $typeStr -eq 'uint' ` - -or $typeStr -eq 'uint?' ` - -or $typeStr -eq 'int' ` - -or $typeStr -eq 'int?' ` - -or $typeStr -eq 'bool' ` - -or $typeStr -eq 'bool?' ` - -or $typeStr -eq 'DateTime' ` - -or $typeStr -eq 'DateTime?' ` - -or $typeStr -eq 'DateTimeOffset' ` - -or $typeStr -eq 'DateTimeOffset?' ` - -or $typeStr -eq 'HttpStatusCode' ) - { - $xml += "${itemName}" + [System.Environment]::NewLine; - } - elseif ($typeStr.StartsWith('IList') ` - -or $typeStr.StartsWith('IDictionary')) - { - $elementType = $pr1.PropertyType.GenericTypeArguments[0]; - - if (-not $elementType.FullName.Contains("String")) - { - if (-not $allrt.Contains($elementType.Name)) - { - $allrt += $elementType.Name; - $addxml = Process-ListType -rt $pr1.PropertyType.GenericTypeArguments[0] -name ${itemName}; - } - } - - $xml += " if (" + "$" + "_.${itemName} -eq $" + "null) { 0 } else { $" + "_.${itemName}.Count }" + [System.Environment]::NewLine; - $xml += " foreach ($" + "item in $" + "_.${itemName}) { [Newtonsoft.Json.JsonConvert]::SerializeObject(" + "$" + "item, [Newtonsoft.Json.Formatting]::Indented) } " + [System.Environment]::NewLine; - } - else - { - $xml += "[Newtonsoft.Json.JsonConvert]::SerializeObject(" + "$" + "_." + ${itemName} + ", [Newtonsoft.Json.Formatting]::Indented)" + [System.Environment]::NewLine; - } - } - - $xml += '' + [System.Environment]::NewLine; - $xml = '' + [System.Environment]::NewLine + $xml + '' + [System.Environment]::NewLine; - - if (-not [System.String]::IsNullOrEmpty($addxml)) - { - $xml += $addxml; - } - - # Write-Verbose ("Xml: " + $xml); - - return @($xml, $allrt) -} - -# Get proper type name -function Format-XML ([xml]$xml, $indent = 2) -{ - $StringWriter = New-Object System.IO.StringWriter; - $XmlWriter = New-Object System.XMl.XmlTextWriter $StringWriter; - $xmlWriter.Formatting = "indented"; - $xmlWriter.Indentation = $Indent; - $st = $xml.WriteContentTo($XmlWriter); - $st = $XmlWriter.Flush(); - $st = $StringWriter.Flush(); - Write-Output $StringWriter.ToString(); -} - -function Write-XmlFormatFile -{ - param( - [Parameter(Mandatory = $True)] - $xmlFilePath - ) - - $xmlCommentHeader = '' + [System.Environment]::NewLine; - - $xmlContent = [xml]($xmlCommentHeader + '' + [System.Environment]::NewLine + $formatXml + '' + [System.Environment]::NewLine); - $node = $xmlContent.CreateXmlDeclaration('1.0', 'UTF-8', $null); - $st = $xmlContent.InsertBefore($node, $xmlContent.ChildNodes[0]); - - $formattedXmlContent = Format-XML $xmlContent.OuterXml; - $st = Set-Content -Force -Path $xmlFilePath -Value $formattedXmlContent; - # Write-Verbose($formattedXmlContent); -} - -# Sample: NewAzureVirtualMachineCreateParameters.cs -function Write-CLICommandFile -{ - param( - [Parameter(Mandatory = $True)] - [string]$fileOutputFolder, - - [Parameter(Mandatory = $True)] - $commandCodeLines - ) - - $fileFullPath = $fileOutputFolder + '/' + 'cli.js'; - - Write-Verbose "============================================="; - Write-Verbose "Writing CLI Command File: "; - Write-Verbose $fileFullPath; - Write-Verbose "============================================="; - - $codeContent = -@" -/** - * Copyright (c) Microsoft. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Warning: This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if the -// code is regenerated. - -'use strict'; - -var fs = require('fs'); -var jsonpatch = require('fast-json-patch'); - -var profile = require('../../../util/profile'); -var utils = require('../../../util/utils'); - -var $ = utils.getLocaleString; - -function beautify(jsonText) { - var obj = JSON.parse(jsonText); - return JSON.stringify(obj, null, 2); -} - -exports.init = function (cli) { - -$commandCodeLines - -}; -"@; - - $st = Set-Content -Path $fileFullPath -Value $codeContent -Force; -} +. "$PSScriptRoot\Import-WriterFunction.ps1"; # Code Generation Main Run $outFolder += '/Generated'; $output = Get-ChildItem -Path $dllFolder | Out-String; -# Set-Content -Path ($outFolder + '/Output.txt'); +# Set-FileContent -Path ($outFolder + '/Output.txt'); # Write-Verbose "List items under the folder: $dllFolder" # Write-Verbose $output; -$dllname = $client_library_namespace; -$dllfile = $dllname + '.dll'; +$dllfile = $clientNameSpace + '.dll'; $dllFileFullPath = $dllFolder + '\' + $dllfile; if (-not (Test-Path -Path $dllFileFullPath)) @@ -1089,7 +90,7 @@ else # All original types $types = $assembly.GetTypes(); - $filtered_types = Get-FilteredOperationTypes $types $dllname $operationNameFilter; + $filtered_types = Get-FilteredOperationTypes $types $clientNameSpace $operationNameFilter; # Write Base Cmdlet File $opNameList = ($filtered_types | select -ExpandProperty Name); @@ -1101,7 +102,7 @@ else $auto_base_cmdlet_name = $component_name + 'AutomationBaseCmdlet'; $baseCmdletFileFullName = $outFolder + '\' + "$auto_base_cmdlet_name.cs"; - $clientClassType = $types | where { $_.Namespace -eq $dllname -and $_.Name -eq ('I' + $component_name + 'ManagementClient') }; + $clientClassType = $types | where { $_.Namespace -eq $clientNameSpace -and $_.Name -eq ('I' + $component_name + 'ManagementClient') }; Write-BaseCmdletFile $baseCmdletFileFullName $opNameList $clientClassType; # PSArgument File @@ -1135,10 +136,11 @@ else foreach ($operation_type in $filtered_types) { $operation_type_count++; + $operation_type_count_roman_index = Get-RomanNumeral $operation_type_count; $operation_nomalized_name = Get-OperationShortName $operation_type.Name; Write-Verbose ''; Write-Verbose $BAR_LINE; - Write-Verbose ("${operation_type_count}/${total_operation_type_count} " + $operation_nomalized_name); + Write-Verbose ("Chapter ${operation_type_count_roman_index}. " + $operation_nomalized_name + " (${operation_type_count}/${total_operation_type_count}) "); Write-Verbose $BAR_LINE; $opShortName = Get-OperationShortName $operation_type.Name; @@ -1288,7 +290,7 @@ else # Output Info for Method Signature Write-Verbose ""; Write-Verbose $SEC_LINE; - $methodMessage = "[${operation_type_count}] ${method_count}/${total_method_count} " + $methodInfo.Name.Replace('Async', ''); + $methodMessage = "${operation_type_count_roman_index}. ${method_count}/${total_method_count} " + $methodInfo.Name.Replace('Async', ''); if (($friendMethodMessage -ne '') -or ($pageMethodMessage -ne '')) { $methodMessage += ' {' + $friendMethodMessage; @@ -1326,7 +328,7 @@ else $outputs = (. $PSScriptRoot\Generate-FunctionCommand.ps1 -OperationName $opShortName ` -MethodInfo $methodInfo ` - -ModelClassNameSpace $client_model_namespace ` + -ModelClassNameSpace $clientModelNameSpace ` -FileOutputFolder $opOutFolder ` -FunctionCmdletFlavor $opCmdletFlavor ` -FriendMethodInfo $friendMethodInfo ` @@ -1339,25 +341,7 @@ else $dynamic_param_method_code += $outputs[-4]; $invoke_cmdlet_method_code += $outputs[-3]; $parameter_cmdlet_method_code += $outputs[-2]; - - - if ($opShortName -eq 'Deployment' -and $client_library_namespace -like '*.WindowsAzure.*') - { - $output_code = $outputs[-1]; - - <# TODO : Comment Out RDFE Deployment APIs - if ($method_count -gt 100) - { - $output_code = "/*" + $NEW_LINE + $output_code.Replace("/*", "").Replace("*/", "") + $NEW_LINE + "*/" + $NEW_LINE; - } - #> - - $cliCommandCodeMainBody += $output_code; - } - else - { - $cliCommandCodeMainBody += $outputs[-1]; - } + $cliCommandCodeMainBody += $outputs[-1]; } if ($methodInfo.ReturnType.FullName -ne 'System.Void') diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj index 31f173b411c5..0b59ccbdd057 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj @@ -255,31 +255,30 @@ %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe - ".\Automation\Invoke-CodeGeneration.ps1" - $(OutputPath) - "Microsoft.WindowsAzure.Management.Compute" - "Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet" - "ComputeClient" - Invoke - Verb - - + .\Automation\Invoke-CodeGeneration.ps1 + $(OutputPath) + $(MSBuildProjectDirectory) + Microsoft.WindowsAzure.Management.Compute + Microsoft.WindowsAzure.Commands.Utilities.Common.ServiceManagementBaseCmdlet + ComputeClient + Invoke + Verb - + %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe - ".\Automation\Invoke-CodeGeneration.ps1" + .\Automation\Invoke-CodeGeneration.ps1 $(OutputPath)\..\..\..\ResourceManager\AzureResourceManager\AzureRM.Compute ..\..\..\ResourceManager\Compute\Commands.Compute - Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet - ComputeClient.ComputeManagementClient + Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet + ComputeClient.ComputeManagementClient Microsoft.Azure.Management.Compute Verb - Verb + Verb VirtualMachineScaleSets,VirtualMachineScaleSetVMs - + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Generated/cli.js b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Generated/cli.js index 0adfd182baaf..4c4ea6eb61c8 100644 --- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Generated/cli.js +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Generated/cli.js @@ -55,7 +55,10 @@ exports.init = function (cli) { "namedRoles":[ { "extensions":[ -null + { + "id":"", + "state":"" + } ], "roleName":"" } @@ -101,12 +104,12 @@ null .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[null],\"roleName\":\"\"}]},\"mode\":null,\"treatWarningsAsError\":null}', _); + cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[{\"id\":\"\",\"state\":\"\"}],\"roleName\":\"\"}]},\"mode\":null,\"treatWarningsAsError\":null}', _); var filePath = 'deploymentChangeConfigurationByName_changeConfigurationByName.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\nnull\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"mode\":null,\r\n\"treatWarningsAsError\":null\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"mode\":null,\r\n\"treatWarningsAsError\":null\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -164,7 +167,7 @@ null var setparametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters0 = parametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters0.category('deployment-change-configuration-parameters') .description($('Commands to set/remove/add deployment-change-configuration-parameters of deployment in change-configuration-by-name-parameters file.')); setparametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters0.command('set') - .description($('Set deployment-change-configuration-parameters in change-configuration-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-change-configuration-parameters in change-configuration-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -257,7 +260,7 @@ null var removeparametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters1 = parametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters1.category('deployment-change-configuration-parameters') .description($('Commands to set/remove/add deployment-change-configuration-parameters of deployment in change-configuration-by-name-parameters file.')); removeparametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters1.command('remove') - .description($('Remove deployment-change-configuration-parameters in change-configuration-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-change-configuration-parameters in change-configuration-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -321,7 +324,7 @@ null var addparametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters2 = parametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters2.category('deployment-change-configuration-parameters') .description($('Commands to set/remove/add deployment-change-configuration-parameters of deployment in change-configuration-by-name-parameters file.')); addparametersChangeConfigurationByNameDeploymentDeploymentChangeConfigurationParameters2.command('add') - .description($('Add deployment-change-configuration-parameters in change-configuration-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-change-configuration-parameters in change-configuration-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -418,7 +421,7 @@ null var setparametersChangeConfigurationByNameDeploymentExtensionConfiguration0 = parametersChangeConfigurationByNameDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in change-configuration-by-name-parameters file.')); setparametersChangeConfigurationByNameDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in change-configuration-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in change-configuration-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -477,7 +480,7 @@ null var removeparametersChangeConfigurationByNameDeploymentExtensionConfiguration1 = parametersChangeConfigurationByNameDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in change-configuration-by-name-parameters file.')); removeparametersChangeConfigurationByNameDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in change-configuration-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in change-configuration-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -526,7 +529,7 @@ null var addparametersChangeConfigurationByNameDeploymentExtensionConfiguration2 = parametersChangeConfigurationByNameDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in change-configuration-by-name-parameters file.')); addparametersChangeConfigurationByNameDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in change-configuration-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in change-configuration-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -1076,7 +1079,10 @@ null "namedRoles":[ { "extensions":[ -null + { + "id":"", + "state":"" + } ], "roleName":"" } @@ -1122,12 +1128,12 @@ null .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[null],\"roleName\":\"\"}]},\"mode\":null,\"treatWarningsAsError\":null}', _); + cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[{\"id\":\"\",\"state\":\"\"}],\"roleName\":\"\"}]},\"mode\":null,\"treatWarningsAsError\":null}', _); var filePath = 'deploymentChangeConfigurationBySlot_changeConfigurationBySlot.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\nnull\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"mode\":null,\r\n\"treatWarningsAsError\":null\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"mode\":null,\r\n\"treatWarningsAsError\":null\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -1185,7 +1191,7 @@ null var setparametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters0 = parametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters0.category('deployment-change-configuration-parameters') .description($('Commands to set/remove/add deployment-change-configuration-parameters of deployment in change-configuration-by-slot-parameters file.')); setparametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters0.command('set') - .description($('Set deployment-change-configuration-parameters in change-configuration-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-change-configuration-parameters in change-configuration-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -1278,7 +1284,7 @@ null var removeparametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters1 = parametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters1.category('deployment-change-configuration-parameters') .description($('Commands to set/remove/add deployment-change-configuration-parameters of deployment in change-configuration-by-slot-parameters file.')); removeparametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters1.command('remove') - .description($('Remove deployment-change-configuration-parameters in change-configuration-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-change-configuration-parameters in change-configuration-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -1342,7 +1348,7 @@ null var addparametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters2 = parametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters2.category('deployment-change-configuration-parameters') .description($('Commands to set/remove/add deployment-change-configuration-parameters of deployment in change-configuration-by-slot-parameters file.')); addparametersChangeConfigurationBySlotDeploymentDeploymentChangeConfigurationParameters2.command('add') - .description($('Add deployment-change-configuration-parameters in change-configuration-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-change-configuration-parameters in change-configuration-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "mode":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -1439,7 +1445,7 @@ null var setparametersChangeConfigurationBySlotDeploymentExtensionConfiguration0 = parametersChangeConfigurationBySlotDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in change-configuration-by-slot-parameters file.')); setparametersChangeConfigurationBySlotDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in change-configuration-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in change-configuration-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -1498,7 +1504,7 @@ null var removeparametersChangeConfigurationBySlotDeploymentExtensionConfiguration1 = parametersChangeConfigurationBySlotDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in change-configuration-by-slot-parameters file.')); removeparametersChangeConfigurationBySlotDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in change-configuration-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in change-configuration-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -1547,7 +1553,7 @@ null var addparametersChangeConfigurationBySlotDeploymentExtensionConfiguration2 = parametersChangeConfigurationBySlotDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in change-configuration-by-slot-parameters file.')); addparametersChangeConfigurationBySlotDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in change-configuration-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in change-configuration-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -2097,7 +2103,10 @@ null "namedRoles":[ { "extensions":[ -null + { + "id":"", + "state":"" + } ], "roleName":"" } @@ -2146,12 +2155,12 @@ null .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[null],\"roleName\":\"\"}]},\"label\":\"\",\"name\":\"\",\"packageUri\":\"\",\"startDeployment\":null,\"treatWarningsAsError\":null}', _); + cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[{\"id\":\"\",\"state\":\"\"}],\"roleName\":\"\"}]},\"label\":\"\",\"name\":\"\",\"packageUri\":\"\",\"startDeployment\":null,\"treatWarningsAsError\":null}', _); var filePath = 'deploymentCreate_create.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\nnull\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"label\":\"\",\r\n\"name\":\"\",\r\n\"packageUri\":\"\",\r\n\"startDeployment\":null,\r\n\"treatWarningsAsError\":null\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"label\":\"\",\r\n\"name\":\"\",\r\n\"packageUri\":\"\",\r\n\"startDeployment\":null,\r\n\"treatWarningsAsError\":null\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -2209,7 +2218,7 @@ null var setparametersCreateDeploymentDeploymentCreateParameters0 = parametersCreateDeploymentDeploymentCreateParameters0.category('deployment-create-parameters') .description($('Commands to set/remove/add deployment-create-parameters of deployment in create-parameters file.')); setparametersCreateDeploymentDeploymentCreateParameters0.command('set') - .description($('Set deployment-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "label":"",\r\n "name":"",\r\n "packageUri":"",\r\n "startDeployment":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "label":"",\r\n "name":"",\r\n "packageUri":"",\r\n "startDeployment":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -2336,7 +2345,7 @@ null var removeparametersCreateDeploymentDeploymentCreateParameters1 = parametersCreateDeploymentDeploymentCreateParameters1.category('deployment-create-parameters') .description($('Commands to set/remove/add deployment-create-parameters of deployment in create-parameters file.')); removeparametersCreateDeploymentDeploymentCreateParameters1.command('remove') - .description($('Remove deployment-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "label":"",\r\n "name":"",\r\n "packageUri":"",\r\n "startDeployment":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "label":"",\r\n "name":"",\r\n "packageUri":"",\r\n "startDeployment":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -2415,7 +2424,7 @@ null var addparametersCreateDeploymentDeploymentCreateParameters2 = parametersCreateDeploymentDeploymentCreateParameters2.category('deployment-create-parameters') .description($('Commands to set/remove/add deployment-create-parameters of deployment in create-parameters file.')); addparametersCreateDeploymentDeploymentCreateParameters2.command('add') - .description($('Add deployment-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "label":"",\r\n "name":"",\r\n "packageUri":"",\r\n "startDeployment":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "label":"",\r\n "name":"",\r\n "packageUri":"",\r\n "startDeployment":null,\r\n "treatWarningsAsError":null\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -2546,7 +2555,7 @@ null var setparametersCreateDeploymentExtensionConfiguration0 = parametersCreateDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in create-parameters file.')); setparametersCreateDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in create-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in create-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -2605,7 +2614,7 @@ null var removeparametersCreateDeploymentExtensionConfiguration1 = parametersCreateDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in create-parameters file.')); removeparametersCreateDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in create-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in create-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -2654,7 +2663,7 @@ null var addparametersCreateDeploymentExtensionConfiguration2 = parametersCreateDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in create-parameters file.')); addparametersCreateDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in create-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in create-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -6488,7 +6497,10 @@ null "namedRoles":[ { "extensions":[ -null + { + "id":"", + "state":"" + } ], "roleName":"" } @@ -6537,12 +6549,12 @@ null .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[null],\"roleName\":\"\"}]},\"force\":false,\"label\":\"\",\"mode\":0,\"packageUri\":\"\",\"roleToUpgrade\":\"\"}', _); + cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[{\"id\":\"\",\"state\":\"\"}],\"roleName\":\"\"}]},\"force\":false,\"label\":\"\",\"mode\":0,\"packageUri\":\"\",\"roleToUpgrade\":\"\"}', _); var filePath = 'deploymentUpgradeByName_upgradeByName.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\nnull\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"force\":false,\r\n\"label\":\"\",\r\n\"mode\":0,\r\n\"packageUri\":\"\",\r\n\"roleToUpgrade\":\"\"\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"force\":false,\r\n\"label\":\"\",\r\n\"mode\":0,\r\n\"packageUri\":\"\",\r\n\"roleToUpgrade\":\"\"\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -6600,7 +6612,7 @@ null var setparametersUpgradeByNameDeploymentDeploymentUpgradeParameters0 = parametersUpgradeByNameDeploymentDeploymentUpgradeParameters0.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-name-parameters file.')); setparametersUpgradeByNameDeploymentDeploymentUpgradeParameters0.command('set') - .description($('Set deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -6725,7 +6737,7 @@ null var removeparametersUpgradeByNameDeploymentDeploymentUpgradeParameters1 = parametersUpgradeByNameDeploymentDeploymentUpgradeParameters1.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-name-parameters file.')); removeparametersUpgradeByNameDeploymentDeploymentUpgradeParameters1.command('remove') - .description($('Remove deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -6804,7 +6816,7 @@ null var addparametersUpgradeByNameDeploymentDeploymentUpgradeParameters2 = parametersUpgradeByNameDeploymentDeploymentUpgradeParameters2.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-name-parameters file.')); addparametersUpgradeByNameDeploymentDeploymentUpgradeParameters2.command('add') - .description($('Add deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -6933,7 +6945,7 @@ null var setparametersUpgradeByNameDeploymentExtensionConfiguration0 = parametersUpgradeByNameDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-name-parameters file.')); setparametersUpgradeByNameDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -6992,7 +7004,7 @@ null var removeparametersUpgradeByNameDeploymentExtensionConfiguration1 = parametersUpgradeByNameDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-name-parameters file.')); removeparametersUpgradeByNameDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -7041,7 +7053,7 @@ null var addparametersUpgradeByNameDeploymentExtensionConfiguration2 = parametersUpgradeByNameDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-name-parameters file.')); addparametersUpgradeByNameDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -7577,7 +7589,7 @@ null var setparametersUpgradeByNameDeploymentDeploymentUpgradeParameters0 = parametersUpgradeByNameDeploymentDeploymentUpgradeParameters0.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-name-parameters file.')); setparametersUpgradeByNameDeploymentDeploymentUpgradeParameters0.command('set') - .description($('Set deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -7702,7 +7714,7 @@ null var removeparametersUpgradeByNameDeploymentDeploymentUpgradeParameters1 = parametersUpgradeByNameDeploymentDeploymentUpgradeParameters1.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-name-parameters file.')); removeparametersUpgradeByNameDeploymentDeploymentUpgradeParameters1.command('remove') - .description($('Remove deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -7781,7 +7793,7 @@ null var addparametersUpgradeByNameDeploymentDeploymentUpgradeParameters2 = parametersUpgradeByNameDeploymentDeploymentUpgradeParameters2.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-name-parameters file.')); addparametersUpgradeByNameDeploymentDeploymentUpgradeParameters2.command('add') - .description($('Add deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-upgrade-parameters in upgrade-by-name-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -7910,7 +7922,7 @@ null var setparametersUpgradeByNameDeploymentExtensionConfiguration0 = parametersUpgradeByNameDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-name-parameters file.')); setparametersUpgradeByNameDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -7969,7 +7981,7 @@ null var removeparametersUpgradeByNameDeploymentExtensionConfiguration1 = parametersUpgradeByNameDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-name-parameters file.')); removeparametersUpgradeByNameDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -8018,7 +8030,7 @@ null var addparametersUpgradeByNameDeploymentExtensionConfiguration2 = parametersUpgradeByNameDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-name-parameters file.')); addparametersUpgradeByNameDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in upgrade-by-name-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -8641,7 +8653,10 @@ null "namedRoles":[ { "extensions":[ -null + { + "id":"", + "state":"" + } ], "roleName":"" } @@ -8690,12 +8705,12 @@ null .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[null],\"roleName\":\"\"}]},\"force\":false,\"label\":\"\",\"mode\":0,\"packageUri\":\"\",\"roleToUpgrade\":\"\"}', _); + cli.output.verbose('{\"configuration\":\"\",\"extendedProperties\":{},\"extensionConfiguration\":{\"allRoles\":[{\"id\":\"\",\"state\":\"\"}],\"namedRoles\":[{\"extensions\":[{\"id\":\"\",\"state\":\"\"}],\"roleName\":\"\"}]},\"force\":false,\"label\":\"\",\"mode\":0,\"packageUri\":\"\",\"roleToUpgrade\":\"\"}', _); var filePath = 'deploymentUpgradeBySlot_upgradeBySlot.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\nnull\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"force\":false,\r\n\"label\":\"\",\r\n\"mode\":0,\r\n\"packageUri\":\"\",\r\n\"roleToUpgrade\":\"\"\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"configuration\":\"\",\r\n\"extendedProperties\":{\r\n},\r\n\"extensionConfiguration\":{\r\n\"allRoles\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"namedRoles\":[\r\n{\r\n\"extensions\":[\r\n{\r\n\"id\":\"\",\r\n\"state\":\"\"\r\n}\r\n],\r\n\"roleName\":\"\"\r\n}\r\n]\r\n},\r\n\"force\":false,\r\n\"label\":\"\",\r\n\"mode\":0,\r\n\"packageUri\":\"\",\r\n\"roleToUpgrade\":\"\"\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -8753,7 +8768,7 @@ null var setparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters0 = parametersUpgradeBySlotDeploymentDeploymentUpgradeParameters0.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-slot-parameters file.')); setparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters0.command('set') - .description($('Set deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -8878,7 +8893,7 @@ null var removeparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters1 = parametersUpgradeBySlotDeploymentDeploymentUpgradeParameters1.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-slot-parameters file.')); removeparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters1.command('remove') - .description($('Remove deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -8957,7 +8972,7 @@ null var addparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters2 = parametersUpgradeBySlotDeploymentDeploymentUpgradeParameters2.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-slot-parameters file.')); addparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters2.command('add') - .description($('Add deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -9086,7 +9101,7 @@ null var setparametersUpgradeBySlotDeploymentExtensionConfiguration0 = parametersUpgradeBySlotDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-slot-parameters file.')); setparametersUpgradeBySlotDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -9145,7 +9160,7 @@ null var removeparametersUpgradeBySlotDeploymentExtensionConfiguration1 = parametersUpgradeBySlotDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-slot-parameters file.')); removeparametersUpgradeBySlotDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -9194,7 +9209,7 @@ null var addparametersUpgradeBySlotDeploymentExtensionConfiguration2 = parametersUpgradeBySlotDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-slot-parameters file.')); addparametersUpgradeBySlotDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -9730,7 +9745,7 @@ null var setparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters0 = parametersUpgradeBySlotDeploymentDeploymentUpgradeParameters0.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-slot-parameters file.')); setparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters0.command('set') - .description($('Set deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -9855,7 +9870,7 @@ null var removeparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters1 = parametersUpgradeBySlotDeploymentDeploymentUpgradeParameters1.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-slot-parameters file.')); removeparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters1.command('remove') - .description($('Remove deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--configuration', $('Remove the configuration value.')) @@ -9934,7 +9949,7 @@ null var addparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters2 = parametersUpgradeBySlotDeploymentDeploymentUpgradeParameters2.category('deployment-upgrade-parameters') .description($('Commands to set/remove/add deployment-upgrade-parameters of deployment in upgrade-by-slot-parameters file.')); addparametersUpgradeBySlotDeploymentDeploymentUpgradeParameters2.command('add') - .description($('Add deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\nnull\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add deployment-upgrade-parameters in upgrade-by-slot-parameters string or files, e.g. \r\n{\r\n "configuration":"",\r\n "extendedProperties":{\r\n },\r\n "extensionConfiguration":{\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n },\r\n "force":false,\r\n "label":"",\r\n "mode":0,\r\n "packageUri":"",\r\n "roleToUpgrade":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -10063,7 +10078,7 @@ null var setparametersUpgradeBySlotDeploymentExtensionConfiguration0 = parametersUpgradeBySlotDeploymentExtensionConfiguration0.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-slot-parameters file.')); setparametersUpgradeBySlotDeploymentExtensionConfiguration0.command('set') - .description($('Set extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -10122,7 +10137,7 @@ null var removeparametersUpgradeBySlotDeploymentExtensionConfiguration1 = parametersUpgradeBySlotDeploymentExtensionConfiguration1.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-slot-parameters file.')); removeparametersUpgradeBySlotDeploymentExtensionConfiguration1.command('remove') - .description($('Remove extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--all-roles', $('Remove the all-roles value.')) @@ -10171,7 +10186,7 @@ null var addparametersUpgradeBySlotDeploymentExtensionConfiguration2 = parametersUpgradeBySlotDeploymentExtensionConfiguration2.category('extension-configuration') .description($('Commands to set/remove/add extension-configuration of deployment in upgrade-by-slot-parameters file.')); addparametersUpgradeBySlotDeploymentExtensionConfiguration2.command('add') - .description($('Add extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n null\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add extension-configuration in upgrade-by-slot-parameters string or files, e.g. \r\n {\r\n ...\r\n "extensionConfiguration" : {\r\n "allRoles":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "namedRoles":[\r\n {\r\n "extensions":[\r\n {\r\n "id":"",\r\n "state":""\r\n }\r\n ],\r\n "roleName":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -18024,8 +18039,7 @@ null ============================================= { "certificateFormat":0, - "data":[ - ], + "data":null, "password":"" } */ @@ -18063,12 +18077,12 @@ null .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"certificateFormat\":0,\"data\":[],\"password\":\"\"}', _); + cli.output.verbose('{\"certificateFormat\":0,\"data\":null,\"password\":\"\"}', _); var filePath = 'serviceCertificateCreate_create.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"certificateFormat\":0,\r\n\"data\":[\r\n],\r\n\"password\":\"\"\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"certificateFormat\":0,\r\n\"data\":null,\r\n\"password\":\"\"\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -18126,7 +18140,7 @@ null var setparametersCreateServiceCertificateServiceCertificateCreateParameters0 = parametersCreateServiceCertificateServiceCertificateCreateParameters0.category('service-certificate-create-parameters') .description($('Commands to set/remove/add service-certificate-create-parameters of service-certificate in create-parameters file.')); setparametersCreateServiceCertificateServiceCertificateCreateParameters0.command('set') - .description($('Set service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":[\r\n ],\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":null,\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -18196,7 +18210,7 @@ null var removeparametersCreateServiceCertificateServiceCertificateCreateParameters1 = parametersCreateServiceCertificateServiceCertificateCreateParameters1.category('service-certificate-create-parameters') .description($('Commands to set/remove/add service-certificate-create-parameters of service-certificate in create-parameters file.')); removeparametersCreateServiceCertificateServiceCertificateCreateParameters1.command('remove') - .description($('Remove service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":[\r\n ],\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":null,\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--certificate-format', $('Remove the certificate-format value.')) @@ -18250,7 +18264,7 @@ null var addparametersCreateServiceCertificateServiceCertificateCreateParameters2 = parametersCreateServiceCertificateServiceCertificateCreateParameters2.category('service-certificate-create-parameters') .description($('Commands to set/remove/add service-certificate-create-parameters of service-certificate in create-parameters file.')); addparametersCreateServiceCertificateServiceCertificateCreateParameters2.command('add') - .description($('Add service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":[\r\n ],\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":null,\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.')) @@ -18324,7 +18338,7 @@ null var setparametersCreateServiceCertificateServiceCertificateCreateParameters0 = parametersCreateServiceCertificateServiceCertificateCreateParameters0.category('service-certificate-create-parameters') .description($('Commands to set/remove/add service-certificate-create-parameters of service-certificate in create-parameters file.')); setparametersCreateServiceCertificateServiceCertificateCreateParameters0.command('set') - .description($('Set service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":[\r\n ],\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Set service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":null,\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input value string to a JSON object.')) @@ -18394,7 +18408,7 @@ null var removeparametersCreateServiceCertificateServiceCertificateCreateParameters1 = parametersCreateServiceCertificateServiceCertificateCreateParameters1.category('service-certificate-create-parameters') .description($('Commands to set/remove/add service-certificate-create-parameters of service-certificate in create-parameters file.')); removeparametersCreateServiceCertificateServiceCertificateCreateParameters1.command('remove') - .description($('Remove service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":[\r\n ],\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Remove service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":null,\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--certificate-format', $('Remove the certificate-format value.')) @@ -18448,7 +18462,7 @@ null var addparametersCreateServiceCertificateServiceCertificateCreateParameters2 = parametersCreateServiceCertificateServiceCertificateCreateParameters2.category('service-certificate-create-parameters') .description($('Commands to set/remove/add service-certificate-create-parameters of service-certificate in create-parameters file.')); addparametersCreateServiceCertificateServiceCertificateCreateParameters2.command('add') - .description($('Add service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":[\r\n ],\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .description($('Add service-certificate-create-parameters in create-parameters string or files, e.g. \r\n{\r\n "certificateFormat":0,\r\n "data":null,\r\n "password":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss get/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss create-or-update-parameters * generate/set/remove/add\' commands \r\n are used to configure the input parameter file. The \'vmss create-or-update\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--key ', $('The JSON key.'))