codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=h1) Report
> Merging [#2467](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/d79710730933432d2c8ccd722d31fbbf75845ce0?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.


```diff
@@            Coverage Diff             @@
##           master    #2467      +/-   ##
==========================================
+ Coverage   72.44%   72.45%   +0.01%     
==========================================
  Files         362      362              
  Lines       19547    19547              
  Branches     2865     2865              
==========================================
+ Hits        14160    14162       +2     
+ Misses       4475     4472       -3     
- Partials      912      913       +1
```


| [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...zure-cli-vm/azure/cli/command_modules/vm/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktdm0vYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy92bS9jdXN0b20ucHk=) | `74.5% <ø> (+0.22%)` | :white_check_mark: |
| [...dback/azure/cli/command_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `34.69% <0%> (ø)` | :white_check_mark: |
| [src/azure-cli-core/azure/cli/core/_util.py](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL191dGlsLnB5) | `66.66% <0%> (ø)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/2467?src=pr&el=footer). Last update [d797107...47b28ad](https://codecov.io/gh/Azure/azure-cli/compare/d79710730933432d2c8ccd722d31fbbf75845ce0...47b28ad2c4278b0ec927820cf60d22de1d63b596?src=pr&el=footer&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
index 3df308105..bcff81d87 100644
--- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
+++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
@@ -160,7 +160,7 @@ helps['feature'] = """
 
 helps['group'] = """
     type: group
-    short-summary: Manage resource groups.
+    short-summary: Manage resource groups and template deployments.
 """
 
 helps['group exists'] = """
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py
index da2c20927..22e31d7a2 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py
@@ -1291,7 +1291,9 @@ def get_vmss_instance_view(resource_group_name, vm_scale_set_name, instance_id=N
     if instance_id:
         if instance_id == '*':
             return client.virtual_machine_scale_set_vms.list(resource_group_name,
-                                                             vm_scale_set_name)
+                                                             vm_scale_set_name,
+                                                             select='instanceView',
+                                                             expand='instanceView')
         else:
             return client.virtual_machine_scale_set_vms.get_instance_view(resource_group_name,
                                                                           vm_scale_set_name,

az vmss get-instance-view returns model view when specifying all VMs
If you run the following to get the instance view for all VMs in a scale set:
```
az vmss get-instance-view -g rgname -n vmssname --instance-id \*
```
CLI does:
```
requests.packages.urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/<subid>/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmssname/virtualMachines?api-version=2016-04-30-preview”
```
which returns the model view for all VMs.

It should be doing:
```
requests.packages.urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/<subid>/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmssname/virtualMachines?$expand=instanceView&$select=instanceView&api-version=2016-04-30-preview”
```
The instance-view command works fine if you just query one VM.

diff --git a/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py b/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py
index 54809d1d5..b6ff5ac31 100644
--- a/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py
+++ b/src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py
@@ -14,7 +14,7 @@ from azure.cli.command_modules.vm.custom import (_get_access_extension_upgrade_i
                                                  _LINUX_ACCESS_EXT,
                                                  _WINDOWS_ACCESS_EXT)
 from azure.cli.command_modules.vm.custom import \
-    (attach_unmanaged_data_disk, detach_data_disk)
+    (attach_unmanaged_data_disk, detach_data_disk, get_vmss_instance_view)
 from azure.cli.command_modules.vm.disk_encryption import enable, disable
 from azure.mgmt.compute.models import (NetworkProfile, StorageProfile, DataDisk, OSDisk,
                                        OperatingSystemTypes, InstanceViewStatus,
@@ -196,6 +196,17 @@ class Test_Vm_Custom(unittest.TestCase):
         mock_vm_set.assert_called_once_with(vm)
         self.assertEqual(len(vm.storage_profile.data_disks), 0)
 
+    @mock.patch('azure.cli.command_modules.vm.custom._compute_client_factory')
+    def test_show_vmss_instance_view(self, factory_mock):
+        vm_client = mock.MagicMock()
+        factory_mock.return_value = vm_client
+
+        # execute
+        get_vmss_instance_view('rg1', 'vmss1', '*')
+        # assert
+        vm_client.virtual_machine_scale_set_vms.list.assert_called_once_with('rg1', 'vmss1', expand='instanceView',
+                                                                             select='instanceView')
+
     # pylint: disable=line-too-long
     @mock.patch('azure.cli.command_modules.vm.disk_encryption._compute_client_factory', autospec=True)
     @mock.patch('azure.cli.command_modules.vm.disk_encryption._get_keyvault_key_url', autospec=True)

python scripts/dev_setup.py
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.5
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
adal==0.4.3
applicationinsights==0.10.0
argcomplete==1.8.0
astroid==1.4.9
attrs==22.2.0
autopep8==1.2.4
azure-batch==2.0.0
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli&subdirectory=src/azure-cli
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_core&subdirectory=src/azure-cli-core
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_datalake&subdirectory=src/command_modules/azure-cli-datalake
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_documentdb&subdirectory=src/command_modules/azure-cli-documentdb
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_utility_automation&subdirectory=scripts
-e git+https://github.com/Azure/azure-cli.git@d79710730933432d2c8ccd722d31fbbf75845ce0#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm
azure-common==1.1.4
azure-core==1.24.2
azure-datalake-store==0.0.5
azure-graphrbac==0.30.0rc6
azure-keyvault==0.1.0
azure-mgmt-authorization==0.30.0rc6
azure-mgmt-batch==3.0.0
azure-mgmt-compute==0.33.1rc1
azure-mgmt-containerregistry==0.1.1
azure-mgmt-datalake-analytics==0.1.3
azure-mgmt-datalake-nspkg==3.0.1
azure-mgmt-datalake-store==0.1.3
azure-mgmt-dns==1.0.0
azure-mgmt-documentdb==0.1.0
azure-mgmt-iothub==0.2.1
azure-mgmt-keyvault==0.30.0
azure-mgmt-network==0.30.0
azure-mgmt-nspkg==3.0.2
azure-mgmt-redis==1.0.0
azure-mgmt-resource==0.30.2
azure-mgmt-sql==0.3.1
azure-mgmt-storage==0.31.0
azure-mgmt-trafficmanager==0.30.0rc6
azure-mgmt-web==0.31.0
azure-nspkg==3.0.2
azure-storage==0.33.0
certifi==2021.5.30
cffi==1.15.1
colorama==0.3.7
coverage==4.2
cryptography==40.0.2
flake8==3.2.1
importlib-metadata==4.8.3
iniconfig==1.1.1
isodate==0.7.0
jeepney==0.7.1
jmespath==0.10.0
keyring==23.4.1
lazy-object-proxy==1.7.1
mccabe==0.5.3
mock==1.3.0
msrest==0.4.29
msrestazure==0.4.34
nose==1.3.7
oauthlib==3.2.2
packaging==21.3
paramiko==2.0.2
pbr==6.1.1
pep8==1.7.1
pluggy==1.0.0
py==1.11.0
pyasn1==0.5.1
pycodestyle==2.2.0
pycparser==2.21
pyflakes==1.3.0
Pygments==2.1.3
PyJWT==2.4.0
pylint==1.5.4
pyOpenSSL==16.1.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
PyYAML==3.11
requests==2.9.1
requests-oauthlib==2.0.0
scp==0.15.0
SecretStorage==3.3.3
six==1.10.0
sshtunnel==0.4.0
tabulate==0.7.5
tomli==1.2.3
typing-extensions==4.1.1
urllib3==1.16
vcrpy==1.10.3
Whoosh==2.7.4
wrapt==1.16.0
zipp==3.6.0

name: azure-cli
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - adal==0.4.3
      - applicationinsights==0.10.0
      - argcomplete==1.8.0
      - astroid==1.4.9
      - attrs==22.2.0
      - autopep8==1.2.4
      - azure-batch==2.0.0
      - azure-common==1.1.4
      - azure-core==1.24.2
      - azure-datalake-store==0.0.5
      - azure-graphrbac==0.30.0rc6
      - azure-keyvault==0.1.0
      - azure-mgmt-authorization==0.30.0rc6
      - azure-mgmt-batch==3.0.0
      - azure-mgmt-compute==0.33.1rc1
      - azure-mgmt-containerregistry==0.1.1
      - azure-mgmt-datalake-analytics==0.1.3
      - azure-mgmt-datalake-nspkg==3.0.1
      - azure-mgmt-datalake-store==0.1.3
      - azure-mgmt-dns==1.0.0
      - azure-mgmt-documentdb==0.1.0
      - azure-mgmt-iothub==0.2.1
      - azure-mgmt-keyvault==0.30.0
      - azure-mgmt-network==0.30.0
      - azure-mgmt-nspkg==3.0.2
      - azure-mgmt-redis==1.0.0
      - azure-mgmt-resource==0.30.2
      - azure-mgmt-sql==0.3.1
      - azure-mgmt-storage==0.31.0
      - azure-mgmt-trafficmanager==0.30.0rc6
      - azure-mgmt-web==0.31.0
      - azure-nspkg==3.0.2
      - azure-storage==0.33.0
      - cffi==1.15.1
      - colorama==0.3.7
      - coverage==4.2
      - cryptography==40.0.2
      - flake8==3.2.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - isodate==0.7.0
      - jeepney==0.7.1
      - jmespath==0.10.0
      - keyring==23.4.1
      - lazy-object-proxy==1.7.1
      - mccabe==0.5.3
      - mock==1.3.0
      - msrest==0.4.29
      - msrestazure==0.4.34
      - nose==1.3.7
      - oauthlib==3.2.2
      - packaging==21.3
      - paramiko==2.0.2
      - pbr==6.1.1
      - pep8==1.7.1
      - pip==9.0.1
      - pluggy==1.0.0
      - py==1.11.0
      - pyasn1==0.5.1
      - pycodestyle==2.2.0
      - pycparser==2.21
      - pyflakes==1.3.0
      - pygments==2.1.3
      - pyjwt==2.4.0
      - pylint==1.5.4
      - pyopenssl==16.1.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pyyaml==3.11
      - requests==2.9.1
      - requests-oauthlib==2.0.0
      - scp==0.15.0
      - secretstorage==3.3.3
      - setuptools==30.4.0
      - six==1.10.0
      - sshtunnel==0.4.0
      - tabulate==0.7.5
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.16
      - vcrpy==1.10.3
      - whoosh==2.7.4
      - wrapt==1.16.0
      - zipp==3.6.0
prefix: /opt/conda/envs/azure-cli

src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_show_vmss_instance_view
src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_existing_datadisk_on_vm src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_custom_on_vm src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_attach_new_datadisk_default_on_vm src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_deattach_disk_on_vm src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_boot_diagnostics_on_vm src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_disable_encryption_error_cases_handling src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_on_vm_never_enabled src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_boot_diagnostics_skip_when_enabled_already src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_enable_encryption_error_cases_handling src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_get_access_extension_upgrade_info src/command_modules/azure-cli-vm/tests/test_custom_vm_commands.py::Test_Vm_Custom::test_merge_secrets
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/custom.py src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py