Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

az managedapp definition show #18695

Open leongross opened 3 years ago

leongross commented 3 years ago

Describe the bug

using az managedapp definition show with no parameters or only the name crashes

Command Name az managedapp definition show az managedapp definition show --name az managedapp definition show --name <any string>

Errors:

The command failed with an unexpected error. Here is the traceback:
No value for given attribute
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 417, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/resource/custom.py", line 1365, in show_applicationdefinition
    return racf.application_definitions.get(resource_group_name, application_definition_name)
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/resource/managedapplications/operations/_application_definitions_operations.py", line 79, in get
    'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 650, in url
    output = self.serialize_data(data, data_type, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 758, in serialize_data
    raise ValueError("No value for given attribute")
ValueError: No value for given attribute

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

No crash

Environment Summary

Linux-5.4.0-1051-azure-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.25.0

Additional Context

yonzhan commented 3 years ago

ARM