4

For example:

gcloud compute disks create --size=10GB my-data-disk

would print 2 things:

  1. Warning:

    WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks/persistent-disks#pdperformance.
    

    This can be eliminated with --verbosity error

  2. Status:

    Created [https://www.googleapis.com/compute/v1/projects/sigma-project-12345/zones/europe-west1-c/disks/my-data-disk].
    NAME          ZONE           SIZE_GB TYPE        STATUS
    my-data-disk europe-west1-c 10      pd-standard READY
    

    This I don't know how to disable, other then redirecting stderr, which of course I don't want because I still have to see if an error happened.

The -q argument does not remove it.

4

2 回答 2

11

--no-user-output-enabledor--user-output-enabled=false标志似乎是您正在寻找的东西。

尝试这个:

gcloud compute disks create --size=10GB my-data-disk --no-user-output-enabled

于 2016-01-14T16:03:18.730 回答
1

@Vilas 的答案是正确的,但请注意,在某些情况下,--no-user-output-enabled 在版本 141.0 左右出现故障。看到这个问题 - https://issuetracker.google.com/issues/36076836

于 2017-04-06T15:17:52.467 回答