Skip to content

Commit

Permalink
fix errors with install_vm_patches command.
Browse files Browse the repository at this point in the history
There was a pull request that created the vm install-patches command over three years ago.

However, this PR has typos and errors.

The typos are for parameters:

kb_numbers_to_inclunde and exclude_kbs_requirig_reboot

Which should be kb_numbers_to_include and exclude_kbs_requiring_reboot respectively.

Using  parameters will give the following errors:
Error given: kb_numbers_to_inclunde is not a known attribute of class <class 'azure.mgmt.compute.v2024_03_01.models._models_py3.WindowsParameters'> and will be ignored

exclude_kbs_requirig_reboot is not a known attribute of class <class 'azure.mgmt.compute.v2024_03_01.models._models_py3.WindowsParameters'> and will be ignored

It went unoticed for assumingly over three years.
  • Loading branch information
Dxaz authored Sep 30, 2024
1 parent 3194af8 commit 1938eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/vm/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5382,7 +5382,7 @@ def set_disk_access(cmd, client, parameters, resource_group_name, disk_access_na
def install_vm_patches(cmd, client, resource_group_name, vm_name, maximum_duration, reboot_setting, classifications_to_include_win=None, classifications_to_include_linux=None, kb_numbers_to_include=None, kb_numbers_to_exclude=None,
exclude_kbs_requiring_reboot=None, package_name_masks_to_include=None, package_name_masks_to_exclude=None, max_patch_publish_date=None, no_wait=False):
VMInstallPatchesParameters, WindowsParameters, LinuxParameters = cmd.get_models('VirtualMachineInstallPatchesParameters', 'WindowsParameters', 'LinuxParameters')
windows_parameters = WindowsParameters(classifications_to_include=classifications_to_include_win, kb_numbers_to_inclunde=kb_numbers_to_include, kb_numbers_to_exclude=kb_numbers_to_exclude, exclude_kbs_requirig_reboot=exclude_kbs_requiring_reboot, max_patch_publish_date=max_patch_publish_date)
windows_parameters = WindowsParameters(classifications_to_include=classifications_to_include_win, kb_numbers_to_include=kb_numbers_to_include, kb_numbers_to_exclude=kb_numbers_to_exclude, exclude_kbs_requiring_reboot=exclude_kbs_requiring_reboot, max_patch_publish_date=max_patch_publish_date)
linux_parameters = LinuxParameters(classifications_to_include=classifications_to_include_linux, package_name_masks_to_include=package_name_masks_to_include, package_name_masks_to_exclude=package_name_masks_to_exclude)
install_patches_input = VMInstallPatchesParameters(maximum_duration=maximum_duration, reboot_setting=reboot_setting, linux_parameters=linux_parameters, windows_parameters=windows_parameters)

Expand Down

0 comments on commit 1938eec

Please sign in to comment.