- release_tracks: [GA, ALPHA]
  help_text:
    brief: List Cloud TPU VM nodes.
    description: List Cloud TPU VM nodes.
    examples: |
      To list the Cloud TPU VM nodes in zone `us-central1-b`, run:

        $ {command} --zone=us-central1-b

  request:
    collection: tpu.projects.locations.nodes
    ALPHA:
      api_version: v2alpha1
    GA:
      api_version: v2

  response:
    id_field: name
    modify_response_hooks:
    - googlecloudsdk.command_lib.compute.tpus.tpu_vm.util:FilterTPUVMNodes

  arguments:
    resource:
      help_text: |
        Zone of the Cloud TPU VM node.

        If not specified, will use the value of the [compute/zone] property in the current
        gcloud configuration. To find a list of compute zones available for Cloud TPUs in your
        project, run `{grandparent_command} locations list`.

      spec: !REF googlecloudsdk.command_lib.compute.tpus.tpu_vm.resources:location
      is_positional: false

  output:
    format: |
      table(
      name.basename(),
      name.segment(-3):label=ZONE,
      acceleratorType.basename():label=ACCELERATOR_TYPE,
      acceleratorConfig.type.basename():label=TYPE,
      acceleratorConfig.topology.basename():label=TOPOLOGY,
      networkConfig.network.basename():label=NETWORK,
      cidrBlock:label=RANGE,
      state:label=STATUS
      )
