From f3005edc87a6d29b14fa0754eb2bb2127d09675e Mon Sep 17 00:00:00 2001 From: Kai Ru Date: Tue, 19 Jul 2022 14:20:47 +0800 Subject: [PATCH] support query and header parameters in wait command --- src/aaz_dev/cli/controller/az_module_manager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/aaz_dev/cli/controller/az_module_manager.py b/src/aaz_dev/cli/controller/az_module_manager.py index df66d29a..85934c5d 100644 --- a/src/aaz_dev/cli/controller/az_module_manager.py +++ b/src/aaz_dev/cli/controller/az_module_manager.py @@ -7,7 +7,6 @@ from cli.templates import get_templates from command.controller.specs_manager import AAZSpecsManager from command.controller.cfg_reader import CfgReader -from command.controller.workspace_cfg_editor import WorkspaceCfgEditor from command.model.configuration import CMDHttpOperation, CMDCommand, CMDArgGroup, CMDObjectOutput, CMDHttpResponseJsonBody from cli.controller.az_profile_generator import AzProfileGenerator from swagger.utils.tools import swagger_resource_path_to_resource_id @@ -408,7 +407,14 @@ def _complete_command_wait_info(command_group): if rid == resource.id: wait_cmd_rids[rid]['resource'] = resource.__class__(resource.to_primitive()) - for param in operation.http.request.path.params or []: + params = [] + if operation.http.request.path and operation.http.request.path.params: + params += operation.http.request.path.params + if operation.http.request.query and operation.http.request.query.params: + params += operation.http.request.query.params + if operation.http.request.header and operation.http.request.header.params: + params += operation.http.request.header.params + for param in params: if not param.arg: continue assert param.arg.startswith("$"), f"Not support path arg name: '{param.arg}'"