patch_job_log.proto 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.osconfig.logging;
  16. import "google/protobuf/timestamp.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/logging;logging";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "PatchJobLogProto";
  20. option java_package = "com.google.cloud.osconfig.logging";
  21. message PatchJobCompletedLog {
  22. // Enumeration of the various states a patch job passes through as it
  23. // executes.
  24. enum State {
  25. // State must be specified.
  26. STATE_UNSPECIFIED = 0;
  27. // The patch job was successfully initiated.
  28. STARTED = 1;
  29. // The patch job is looking up instances to run the patch on.
  30. INSTANCE_LOOKUP = 2;
  31. // Instances are being patched.
  32. PATCHING = 3;
  33. // Patch job completed successfully.
  34. SUCCEEDED = 4;
  35. // Patch job completed but there were errors.
  36. COMPLETED_WITH_ERRORS = 5;
  37. // The patch job was canceled.
  38. CANCELED = 6;
  39. // The patch job has timed out.
  40. TIMED_OUT = 7;
  41. }
  42. // A summary of the current patch state across all instances this patch job
  43. // affects. Contains counts of instances in different states. These states map
  44. // to InstancePatchState. List patch job instance details to see the specific
  45. // states of each instance.
  46. message InstanceDetailsSummary {
  47. // Number of instances pending patch job.
  48. int64 instances_pending = 1;
  49. // Number of instances that are inactive.
  50. int64 instances_inactive = 2;
  51. // Number of instances notified about patch job.
  52. int64 instances_notified = 3;
  53. // Number of instances that have started.
  54. int64 instances_started = 4;
  55. // Number of instances that are downloading patches.
  56. int64 instances_downloading_patches = 5;
  57. // Number of instances that are applying patches.
  58. int64 instances_applying_patches = 6;
  59. // Number of instances rebooting.
  60. int64 instances_rebooting = 7;
  61. // Number of instances that have completed successfully.
  62. int64 instances_succeeded = 8;
  63. // Number of instances that require reboot.
  64. int64 instances_succeeded_reboot_required = 9;
  65. // Number of instances that failed.
  66. int64 instances_failed = 10;
  67. // Number of instances that have acked and will start shortly.
  68. int64 instances_acked = 11;
  69. // Number of instances that exceeded the time out while applying the patch.
  70. int64 instances_timed_out = 12;
  71. // Number of instances that are running the pre-patch step.
  72. int64 instances_running_pre_patch_step = 13;
  73. // Number of instances that are running the post-patch step.
  74. int64 instances_running_post_patch_step = 14;
  75. }
  76. // The patch job name. For example:
  77. // projects/PROJECT_ID/patchJobs/PATCH_JOB_ID
  78. string patch_job = 1;
  79. // The current state of the PatchJob.
  80. State state = 2;
  81. // Summary of instance details.
  82. InstanceDetailsSummary instance_details_summary = 3;
  83. // If this patch job is a dry run, the agent will report that it has
  84. // finished without running any updates on the VM.
  85. bool dry_run = 4;
  86. // If this patch job failed, this message will provide information about the
  87. // failure.
  88. string error_message = 5;
  89. // Time this PatchJob was created.
  90. google.protobuf.Timestamp create_time = 6;
  91. // Last time this PatchJob was updated.
  92. google.protobuf.Timestamp update_time = 7;
  93. }