Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Konnektivitätstests unterstützen die regelmäßige Prüfung des Status eines laufenden Testvorgangs, z. B. create, update oder delete. Die endgültigen Testergebnisse können Sie nach Abschluss des Tests weiterhin prüfen.
Console
Die Google Cloud Console verwendet ein rotierendes Ladesymbol, um auf einen laufenden Test hinzuweisen.
Im Hintergrund fragen Konnektivitätstests kontinuierlich den Status des Testvorgangs ab. Nach Abschluss des Tests können Sie die endgültigen Ergebnisse im Bereich Ergebnisdetails einsehen.
Wenn Sie einen laufenden Testvorgang mit der gcloud CLI prüfen möchten, geben Sie die --async-Option an. Wenn Sie diese Option nicht festlegen, werden nur die endgültigen Testergebnisse angezeigt.
Wenn Sie beispielsweise den folgenden Test mithilfe der Option --async erstellen, wird sofort eine Vorgangsressourcen-ID an die Befehlszeile zurückgegeben. Sie können diese ID dann in einem nachfolgenden describe-Befehl verwenden, um den Teststatus zu überprüfen, während der Test noch ausgeführt wird.
DESTINATION_PROJECT: die Projekt-ID des Zielendpunkts
SOURCE_IP_ADDRESS: die interne oder externe Quell-IP-Adresse, von der Sie testen. Eine IPv6-Adresse ist nur zulässig, wenn das Ziel des Tests eine globale Load-Balancer-VIP ist.
DESTINATION_IP_ADDRESS ist die interne oder externe Quell-IP-Adresse, zu der Sie testen. Eine IPv6-Adresse ist nur zulässig, wenn das Ziel des Tests eine globale Load-Balancer-VIP ist.
Create request issued for: [gcloud-example]
Check operation [projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13] for status
Verwenden Sie die Vorgangsressourcen-ID mit dem Befehl describe, um den Teststatus zu prüfen:
Wiederholen Sie den vorherigen describe-Befehl, bis in der Ausgabe done: true angezeigt wird.
API
Die Network Management API befindet sich immer im Modus async. Wenn Sie einen Befehl an die API senden, erhalten Sie sofort eine Vorgangs-ID. Mit dieser ID können Sie regelmäßig den Teststatus prüfen.
Python
Die Network Management API befindet sich immer im Modus async. Wenn Sie den Python API-Client verwenden, um eine Anfrage zu senden, erhalten Sie sofort eine Vorgangs-ID.
Mit dieser ID können Sie regelmäßig den Teststatus prüfen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Check a running test operation\n\nConnectivity Tests supports periodically checking the status of\na running test operation, such as `create`, `update`, or `delete`. You can\nstill review the final test results when the test completes. \n\n### Console\n\nThe Google Cloud console uses a spinner icon to show a running test.\nBehind the scenes, Connectivity Tests continuously polls for\nthe status of the test operation. When the test completes, you can check the\nfinal results in the **Result details** panel.\n\nFor more information about Google Cloud console pages, see\n[Create and run Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests).\n\n### gcloud\n\nTo use the gcloud CLI to check a running test operation,\nspecify the `--async` option. If you don't specify this option, you see only\nthe final test results.\n\n1. For example, creating the following test by using the `--async` option\n immediately returns an *operation resource ID* to the command line. You\n can then use this ID in a subsequent `describe` command to check test\n status while the test is still running.\n\n ```\n gcloud network-management connectivity-tests create NAME \\\n --destination-project=DESTINATION_PROJECT \\\n --source-ip-address=SOURCE_IP_ADDRESS \\\n --destination-ip-address=DESTINATION_IP_ADDRESS \\\n --protocol=PROTOCOL \\\n --source-project=SOURCE_PROJECT \\\n --async\n ```\n\n Replace the following values:\n - \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the Connectivity Tests\n - \u003cvar translate=\"no\"\u003eDESTINATION_PROJECT\u003c/var\u003e: the project ID of the destination endpoint\n - \u003cvar translate=\"no\"\u003eSOURCE_IP_ADDRESS\u003c/var\u003e: the internal or external source IP address that you are testing from; an IPv6 address is only allowed when the test's destination is a global load balancer VIP\n - \u003cvar translate=\"no\"\u003eDESTINATION_IP_ADDRESS\u003c/var\u003e: the internal or external source IP address that you are testing to; an IPv6 address is only allowed when the test's destination is a global load balancer VIP\n - \u003cvar translate=\"no\"\u003ePROTOCOL\u003c/var\u003e: a [supported\n protocol](/network-intelligence-center/docs/connectivity-tests/concepts/overview#endpoints) for Connectivity Tests\n - \u003cvar translate=\"no\"\u003eSOURCE_PROJECT\u003c/var\u003e: the project ID of the source endpoint\n\n The output is the following: \n\n ```\n Create request issued for: [gcloud-example]\n Check operation [projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13] for status\n ```\n2. Use the operation resource ID with the `describe`\n command to check on the test's status:\n\n ```\n gcloud network-management operations describe \\\n projects/SOURCE_PROJECT/locations/global/operations/OPERATION_RESOURCE_ID\n ```\n\n Replace the following values:\n - \u003cvar translate=\"no\"\u003eSOURCE_PROJECT\u003c/var\u003e: the project ID of the source endpoint\n - \u003cvar translate=\"no\"\u003eOPERATION_RESOURCE_ID\u003c/var\u003e: the resource ID for the in-progress operation that you are checking (for example, `operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13`)\n\n The following sample output for the previous command shows `done: false`.\n When the test completes, this field changes to `done: true`. \n\n ```\n done: false\n metadata:\n '@type': type.googleapis.com/google.cloud.networkmanagement.v1.OperationMetadata\n apiVersion: v1\n cancelRequested: false\n createTime: '2020-01-30T19:06:50.055838110Z'\n endTime: '2020-01-30T19:06:57.637200039Z'\n target: projects/reachability-e2e-test/locations/global/connectivityTests/gcloud-example\n verb: create\n name:\n projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13\n response:\n '@type': type.googleapis.com/google.cloud.networkmanagement.v1beta1.ConnectivityTest\n createTime: '2020-01-30T19:06:50.050012906Z'\n ... // Full resource metadata displayed here.\n ```\n3. Repeat the previous `describe` command until the output shows `done: true`.\n\n### API\n\nThe Network Management API is always in `async` mode. When you issue\na command to the API, you immediately receive an operation ID. You can\nuse this ID to periodically check test status.\n\n### Python\n\nThe Network Management API is always in `async` mode. When you use the\nAPI Python client to issue a request, you immediately receive an operation ID.\nYou can use this ID to periodically check test status.\n\nSee the following example: \n\n```\nproject_id = 'PROJECT_ID'\noperation_id = 'OPERATION_ID'\n\nrequest = api.projects().locations().global_().operations().get(\n name='projects/%s/locations/global/operations/%s' % (project_id, operation_id))\n\nprint(json.dumps(request.execute(), indent=4))\n```\n\nReplace the following values:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID for the project in which you created the test\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: the resource ID for the in-progress operation that you are checking (for example, `operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13`)\n\nWhat's next\n-----------\n\n- [Learn about Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/concepts/overview)\n- [Troubleshoot Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/support/troubleshooting)"]]