Giter Site home page Giter Site logo

Comments (6)

johanste avatar johanste commented on June 16, 2024

If you run:

az vm get --resourcegroup foo --vm_name bar --expand instanceView

you should get the instance view, which has the statuses as a child item (there is no statuses property directly on the returned virtual machine).

from azure-cli.

binderjoe avatar binderjoe commented on June 16, 2024

Sure, but we agree this is broken, right?

from azure-cli.

JasonRShaver avatar JasonRShaver commented on June 16, 2024

Example from recent build:

jasonsha@JasonShaMBP: ~ $ az vm show -g foo -n bar --expand asdf
expand must be type InstanceViewTypes.
Traceback (most recent call last):
  File "/usr/local/az/envs/default/lib/python2.7/site-packages/azure/cli/main.py", line 50, in main
    cmd_result = APPLICATION.execute(args)
  File "/usr/local/az/envs/default/lib/python2.7/site-packages/azure/cli/application.py", line 103, in execute
    result = args.func(params)
  File "/usr/local/az/envs/default/lib/python2.7/site-packages/azure/cli/commands/__init__.py", line 204, in _execute_command
    result = operation(client, **kwargs) if client else operation(**kwargs)
  File "/usr/local/az/envs/default/lib/python2.7/site-packages/azure/mgmt/compute/operations/virtual_machines_operations.py", line 356, in get
    query_parameters['$expand'] = self._serialize.query("expand", expand, 'InstanceViewTypes')
  File "/usr/local/az/envs/default/lib/python2.7/site-packages/msrest/serialization.py", line 352, in query
    raise TypeError("{} must be type {}.".format(name, data_type))
TypeError: expand must be type InstanceViewTypes.

from azure-cli.

BurtBiel avatar BurtBiel commented on June 16, 2024

It only works with instanceView, perhaps we could make expand a flag and auto-expand instanceView

from azure-cli.

johanste avatar johanste commented on June 16, 2024

The SDK has been updated to (at least for vm show) only support the string instanceView. The type attribute of the parameter should be updated.

from azure-cli.

JasonRShaver avatar JasonRShaver commented on June 16, 2024

Cleaning up old issues, reopen if this is still active.

from azure-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.