- release_tracks: [GA, BETA]

  help_text:
    brief: |
      List connectivity tests.
    description: |
      List all connectivity tests in the specified project.

      You can specify the maximum number of connectivity tests to list using the
      `--limit` flag.
    examples: |
      The following command lists a maximum of five connectivity tests:

          $ {command} --limit=5

  request: &request
    BETA:
      api_version: v1beta1
    GA:
      api_version: v1
    collection: networkmanagement.projects.locations.global.connectivityTests
    modify_request_hooks:
    - googlecloudsdk.command_lib.network_management.util:AppendLocationsGlobalToParent

  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.network_management.resources:project
      help_text: |
        The project of the connectivity tests to display.

  output:
    format: |
       table(
          name.basename():label=NAME,
          protocol:label=PROTOCOL,
          source.projectId:label=SRC_PROJECT,
          source.network:label=SRC_NW,
          source.ipAddress:label=SRC_IP,
          source.instance:label=SRC_VM,
          source.gkeMasterCluster:label=SRC_GKE,
          source.cloudSqlInstance:label=SRC_SQL,
          destination.projectId:label=DST_PROJECT,
          destination.network:label=DST_NW,
          destination.ipAddress:label=DST_IP,
          destination.forwardingRule:label=DST_FR,
          destination.instance:label=DST_VM,
          destination.gkeMasterCluster:label=DST_GKE,
          destination.cloudSqlInstance:label=DST_SQL,
          destination.port:label=DST_PORT,
          updateTime.date():label=UPDATED,
          labels
        )
