Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM] Fix issue with deployment parameter parsing #3743

Merged
merged 1 commit into from
Jun 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions azure-cli.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,6 @@
<Compile Include="command_modules\azure-cli-sf\azure\cli\command_modules\sf\_params.py" />
<Compile Include="command_modules\azure-cli-sf\azure\cli\command_modules\sf\__init__.py" />
<Compile Include="command_modules\azure-cli-sf\setup.py" />
<Compile Include="command_modules\azure-cli-sf\tests\manual_scenario_sf_commands.py" />
<Compile Include="command_modules\azure-cli-sf\tests\manual_sf_commands.py" />
<Compile Include="command_modules\azure-cli-sql\azure\cli\command_modules\sql\commands.py" />
<Compile Include="command_modules\azure-cli-sql\azure\cli\command_modules\sql\custom.py" />
<Compile Include="command_modules\azure-cli-sql\azure\cli\command_modules\sql\help.py" />
Expand Down Expand Up @@ -937,12 +935,10 @@
<Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\" />
<Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\redis\" />
<Folder Include="command_modules\azure-cli-redis\tests\" />
<Folder Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\" />
<Folder Include="command_modules\azure-cli-resource\tests\" />
<Folder Include="command_modules\azure-cli-role\tests\" />
<Folder Include="command_modules\azure-cli-redis\azure\cli\command_modules\redis\tests\" />
<Folder Include="command_modules\azure-cli-role\tests\" />
<Folder Include="command_modules\azure-cli-role\tests\recordings\" />
<Folder Include="command_modules\azure-cli-sf\" />
<Folder Include="command_modules\azure-cli-sf\azure\" />
<Folder Include="command_modules\azure-cli-sf\azure\cli\" />
Expand Down Expand Up @@ -1122,6 +1118,9 @@
<Content Include="command_modules\azure-cli-resource\tests\crossrg_deploy.json" />
<Content Include="command_modules\azure-cli-resource\tests\simple_deploy.json" />
<Content Include="command_modules\azure-cli-resource\tests\simple_deploy_parameters.json" />
<Content Include="command_modules\azure-cli-resource\tests\test-object.json" />
<Content Include="command_modules\azure-cli-resource\tests\test-params.json" />
<Content Include="command_modules\azure-cli-resource\tests\test-template.json" />
<Content Include="command_modules\azure-cli-role\HISTORY.rst" />
<Content Include="command_modules\azure-cli-sf\HISTORY.rst" />
<Content Include="command_modules\azure-cli-sql\HISTORY.rst" />
Expand All @@ -1138,11 +1137,6 @@
<Content Include="command_modules\azure-cli-vm\tests\sample-public.json" />
<Content Include="command_modules\azure-cli-vm\tests\vmss_create_test_plan.md" />
<Content Include="command_modules\azure-cli-vm\tests\vm_create_test_plan.md" />
<Content Include="command_modules\azure-cli-role\tests\recordings\test_application_set_scenario.yaml" />
<Content Include="command_modules\azure-cli-role\tests\recordings\test_create_for_rbac_with_secret.yaml" />
<Content Include="command_modules\azure-cli-role\tests\recordings\test_role_assignment_scenario.yaml" />
<Content Include="command_modules\azure-cli-role\tests\recordings\test_role_create_scenario.yaml" />
<Content Include="command_modules\azure-cli-role\tests\recordings\test_sp_create_scenario.yaml" />
</ItemGroup>
<ItemGroup>
<Interpreter Include="..\env\">
Expand Down
9 changes: 8 additions & 1 deletion src/command_modules/azure-cli-resource/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
.. :changelog:

Release History

===============

unreleased
++++++++++++++++++
* `group deployment create`: Fixes issue where some parameter files were no longer recognized using @<file> syntax.


2.0.8 (2017-06-13)
^^^^^^^^^^^^^^^^^^
++++++++++++++++++
* Fix up some parsing and error messages. (#3584)
* Fix various pylint disable rules
* Fix --resource-type parsing for the lock command to accept <resource-namespace>/<resource-type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def _try_parse_key_value_object(parameters, value):
parameters = {}
for params in namespace.parameters or []:
for item in params:
if not _try_parse_key_value_object(parameters, item):
param_obj = _try_load_file_object(item) or _try_parse_json_object(item)
if not param_obj:
raise CLIError('Unable to parse parameter: {}'.format(item))
param_obj = _try_load_file_object(item) or _try_parse_json_object(item)
if param_obj:
parameters.update(param_obj)
elif not _try_parse_key_value_object(parameters, item):
raise CLIError('Unable to parse parameter: {}'.format(item))

namespace.parameters = parameters

Expand Down
Loading