Expose generic update parameters on existing custom updates - #735
Conversation
There was a problem hiding this comment.
cmd.arguments.pop('expand', None) # possibly inherited from the getter [](start = 4, length = 70)
I'm hesitant to pop an arg we don't own, it seems like this is also a corner case (not many commands using this). Can we just hide this on the individual commands that have them? #WontFix
There was a problem hiding this comment.
Yes, but then you have multiple ignore entries in the params file for something you can take care of here. Is there any case where you would want the getter part of generic update to retain the expand parameter?
In reply to: 75964122 [](ancestors = 75964122)
There was a problem hiding this comment.
Aren't there only about 5 commands that have expand? If so, I'd vote for manually hiding them
In reply to: 76079251 [](ancestors = 76079251,75964122)
There was a problem hiding this comment.
They accomplish the same thing, though preventing the argument from being added to the argument space to begin with is a better approach than adding it and trying to suppress it. Isn't this why you did the same thing for the setter's parameters arg?
In reply to: 76099240 [](ancestors = 76099240,76079251,75964122)
There was a problem hiding this comment.
The setters were always present, so popping them followed a standard pattern. However, if we view this as a "blacklist" like we have for ignoring built-in sdk params, I can see how they are similar.
In reply to: 76142981 [](ancestors = 76142981,76099240,76079251,75964122)
|
|
* Provide support for reading a single parameter value from file Values prefixed with @ will be replaced with the content of the file immediately following the @-sign. The pseudo-name '-' is used to indicate stdin. * Fix accidentally deleted space (which made pylint angry) * enable diagnostics and extensions in vmss profile (#737) * Expose generic update parameters on existing custom updates (#735) * Convert all updates to cli_generic_update_commands. * Code review fixes. * Remove inline CliArgumentType(...) registrations (#744) * Eliminates anti-pattern of creating CliArgumentTypes inline during parameter registration. * Minor fixes. * Add NAT Rules to VMSS create that allow SSH/RDP by default (#743) * Update regular expression to fix issue #147 (#747) * Support colored output on Windows (#756) * [Help] Help Fixes and Enhancements (#736) * Fix issue #680. * Initial version of help dump. Logic to extract summary. * Fix issues #365 and #447. * Code review fixes. * Code review fixes. * Fix folded parameter logic to make new optional. Update existing uses to (#766) work with new logic. * Treat CloudError like a CLIError (don't print stack trace) (#759) * 'az configure' experience (default output format) (#739) * 'az configure' experience - Allows user to set default output type. - Infrastructure for CLI configurations also implemented. * Add license header & fix deprecated method * Wrap SafeConfigParser instead of extending from it * Code review feedback changes * Table format revisions (#748) * Table format revisions - Table output is generic and automatically extracts fields from the result. - No longer use simple_output_query as it was specific for commands and as packages will support multiple API versions, this solution is no longer feasible. * Support callable again for table format after discussion When a callable is set for a command, it will be used as long as there is no query active. If there's a query active, the callable will not be used so the user has to specify a full query that can generate an appropriate table. * Remove 'starting' message for long running operations (#767) * Remove 'starting' message for long running operations * Change name of poll_interval_ms as ambiguous and also change logger messages that referred to this interval * Catch EOF to minimize stack trace craziness. (#768) * Change simple_output_query to be table_transformer (#771) * [Resource] Resource Tag Fix (issue 763) (#765) * Use 'ignore_type' within resource module. Fix issue 763. * Code review fixes. * Only delete certain files in yml output folder during Document CI (#762) * Update README Docker instructions. (#776) * Fixes #772 (#779) * Handle BrokenPipeError (#775) * Fix issue 770. * Fix undeclared-variable * update a few command descriptions (#781) * VM issue: fix #749, #753, #575 (#778) * Add commands for Azure IoT (#730) * Add commands for Azure IoT * 1.Include files into azure-cli.pyproj; 2. Update license info in setup.py * add missing pylint directive * resolve review comments * resolve comments * fix typo * [Document CI] Handle Robocopy exit code (#786) * Generic Update enhancements. (#740) * Fix issues #728 and #686 * Code review fixes. * Fix Error if Non-existent Storage Account Specified (#787) * Fix issue #784. * Code review fix. * vm: enable autoUpgradeMinorVersion by default (#791) * cmd: use plurals for list-* command naming (#792) Committer: yugangw-msft * Ensure docstring help with unrecognized unicode characters still displays correctly. (#795) * Provide support for reading a single parameter value from file Values prefixed with @ will be replaced with the content of the file immediately following the @-sign. The pseudo-name '-' is used to indicate stdin. * Fix accidentally deleted space (which made pylint angry)
This PR exposes the existing generic update arguments (add, set, remove) on most of the existing custom update commands. This preserves the usability of the custom command while giving the power and flexibility of the generic update. There are some specify "update" commands that are not wrapped in this PR because I'd like to confer with Yugang Wang (@yugangw-msft) on these commands: