From 3de3ecec47c3f50d33835e7b7a455cfb8da876c2 Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Fri, 30 Sep 2022 09:21:45 -0700 Subject: [PATCH 1/2] update commit --- system/system.proto | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/system/system.proto b/system/system.proto index 86600736..5e887dd0 100644 --- a/system/system.proto +++ b/system/system.proto @@ -108,7 +108,8 @@ message RebootRequest { uint64 delay = 2; // Informational reason for the reboot. string message = 3; - // Optional sub-components to reboot. + // Optional, sub-components to reboot. + // If it's not set, reboot the whole network device. repeated types.Path subcomponents = 4; // Force reboot if sanity checks fail. (ex. uncommited configuration) bool force = 5; @@ -138,7 +139,9 @@ enum RebootMethod { // request. message CancelRebootRequest { string message = 1; // informational reason for the cancel - repeated types.Path subcomponents = 2; // optional sub-components. + // Optional, sub-components to cancel reboot. + // If it's not set, cancel all outstanding reboot requests. + repeated types.Path subcomponents = 2; } message CancelRebootResponse { @@ -149,11 +152,21 @@ message RebootStatusRequest { } message RebootStatusResponse { - bool active = 1; // If reboot is active. - uint64 wait = 2; // Time left until reboot. - uint64 when = 3; // Time to reboot in nanoseconds since the epoch. - string reason = 4; // Reason for reboot. - uint32 count = 5; // Number of reboots since active. + bool active = 1 [deprecated = true]; // If reboot is active. + uint64 wait = 2 [deprecated = true]; // Time left until reboot. + uint64 when = 3 + [deprecated = true]; // Time to reboot in nanoseconds since the epoch. + string reason = 4 [deprecated = true]; // Reason for reboot. + uint32 count = 5 [deprecated = true]; // Number of reboots since active. + + message Status { + bool active = 1; // If reboot is active. + uint64 wait = 2; // Time left until reboot. + uint64 when = 3; // Time to reboot in nanoseconds since the epoch. + string reason = 4; // Reason for reboot. + uint32 count = 5; // Number of reboots since active. + } + repeated Status statuses = 6; } // A TimeRequest requests the current time accodring to the target. From ad773e023724725314f34379532b6df5810f96b2 Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Fri, 30 Sep 2022 10:53:24 -0700 Subject: [PATCH 2/2] add sub-component in Status message --- system/system.proto | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/system/system.proto b/system/system.proto index 5e887dd0..09a90f61 100644 --- a/system/system.proto +++ b/system/system.proto @@ -160,12 +160,15 @@ message RebootStatusResponse { uint32 count = 5 [deprecated = true]; // Number of reboots since active. message Status { - bool active = 1; // If reboot is active. - uint64 wait = 2; // Time left until reboot. - uint64 when = 3; // Time to reboot in nanoseconds since the epoch. - string reason = 4; // Reason for reboot. - uint32 count = 5; // Number of reboots since active. + types.Path subcomponent = + 1; // sub-component that the reboot status is for. + bool active = 2; // If reboot is active. + uint64 wait = 3; // Time left until reboot. + uint64 when = 4; // Time to reboot in nanoseconds since the epoch. + string reason = 5; // Reason for reboot. + uint32 count = 6; // Number of reboots since active. } + repeated Status statuses = 6; }