Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Uji Konektivitas mendukung pemeriksaan status operasi pengujian yang berjalan secara berkala, seperti create, update, atau delete. Anda masih dapat meninjau hasil pengujian akhir saat pengujian selesai.
Konsol
Konsol Google Cloud menggunakan ikon indikator lingkaran berputar untuk menampilkan pengujian yang sedang berjalan.
Di balik layar, Uji Konektivitas terus melakukan polling untuk mengetahui status operasi pengujian. Setelah pengujian selesai, Anda dapat memeriksa
hasil akhir di panel Detail hasil.
Untuk menggunakan gcloud CLI guna memeriksa operasi pengujian yang sedang berjalan, tentukan opsi --async. Jika tidak menentukan opsi ini, Anda hanya akan melihat
hasil pengujian akhir.
Misalnya, membuat pengujian berikut menggunakan opsi --async
akan langsung menampilkan ID resource operasi ke command line. Kemudian, Anda
dapat menggunakan ID ini dalam perintah describe berikutnya untuk memeriksa status
pengujian saat pengujian masih berjalan.
DESTINATION_PROJECT: project ID dari
endpoint tujuan
SOURCE_IP_ADDRESS: alamat IP sumber internal atau eksternal yang Anda gunakan untuk pengujian; alamat IPv6 hanya diizinkan jika tujuan pengujian adalah VIP load balancer global
DESTINATION_IP_ADDRESS: alamat IP sumber internal atau
eksternal yang Anda uji; alamat IPv6
hanya diizinkan jika tujuan pengujian adalah VIP load balancer global
Create request issued for: [gcloud-example]
Check operation [projects/reachability-e2e-test/locations/global/operations/operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13] for status
Gunakan ID resource operasi dengan perintah describe untuk memeriksa status pengujian:
OPERATION_RESOURCE_ID: ID resource untuk operasi yang sedang berlangsung
yang Anda periksa (misalnya,
operation-1580411210002-59d6028c56f71-85ef2899-54d8bc13)
Contoh output berikut untuk perintah sebelumnya menunjukkan done: false.
Setelah pengujian selesai, kolom ini akan berubah menjadi done: true.
Ulangi perintah describe sebelumnya hingga output menampilkan done: true.
API
Network Management API selalu dalam mode async. Saat memberikan perintah ke API, Anda akan langsung menerima ID operasi. Anda dapat
menggunakan ID ini untuk memeriksa status pengujian secara berkala.
Python
Network Management API selalu dalam mode async. Saat menggunakan klien Python API untuk mengeluarkan permintaan, Anda akan langsung menerima ID operasi.
Anda dapat menggunakan ID ini untuk memeriksa status pengujian secara berkala.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 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)"]]