| |
| new file mode 100644 |
| |
| |
| |
| @@ -0,0 +1,5 @@ |
| +{ |
| + "type": "bugfix", |
| + "category": "``cloudwatch``", |
| + "description": "Rename ``get-o-tel-enrichment``, ``start-o-tel-enrichment``, and ``stop-o-tel-enrichment`` commands to ``get-otel-enrichment``, ``start-otel-enrichment``, and ``stop-otel-enrichment``. The old names are kept as hidden aliases for backward compatibility." |
| +} |
| |
| deleted file mode 100644 |
| |
| |
| |
| @@ -1,7 +0,0 @@ |
| -[ |
| - { |
| - "category": "``cloudwatch``", |
| - "description": "Rename ``get-o-tel-enrichment``, ``start-o-tel-enrichment``, and ``stop-o-tel-enrichment`` commands to ``get-otel-enrichment``, ``start-otel-enrichment``, and ``stop-otel-enrichment``. The old names are kept as hidden aliases for backward compatibility.", |
| - "type": "bugfix" |
| - } |
| -] |
| |
| |
| |
| |
| @@ -11,26 +11,20 @@ |
| # ANY KIND, either express or implied. See the License for the specific |
| # language governing permissions and limitations under the License. |
| from awscli.customizations.utils import make_hidden_command_alias |
| -from awscli.customizations.utils import rename_command |
| |
| |
| def register_rename_otel_commands(event_emitter): |
| event_emitter.register( |
| - 'building-command-table.cloudwatch', |
| - rename_otel_commands |
| + 'building-command-table.cloudwatch', alias_otel_commands |
| ) |
| |
| |
| -def rename_otel_commands(command_table, **kwargs): |
| - """Rename o-tel commands to otel, keeping o-tel as hidden aliases.""" |
| - renames = { |
| - 'get-o-tel-enrichment': 'get-otel-enrichment', |
| - 'start-o-tel-enrichment': 'start-otel-enrichment', |
| - 'stop-o-tel-enrichment': 'stop-otel-enrichment', |
| +def alias_otel_commands(command_table, **kwargs): |
| + aliases = { |
| + 'get-otel-enrichment': 'get-o-tel-enrichment', |
| + 'start-otel-enrichment': 'start-o-tel-enrichment', |
| + 'stop-otel-enrichment': 'stop-o-tel-enrichment', |
| } |
| - for old_name, new_name in renames.items(): |
| - if old_name in command_table: |
| - rename_command(command_table, old_name, new_name) |
| - make_hidden_command_alias( |
| - command_table, new_name, old_name |
| - ) |
| + for existing_name, alias_name in aliases.items(): |
| + if existing_name in command_table: |
| + make_hidden_command_alias(command_table, existing_name, alias_name) |
|
|