From 36da9197fb8e566df82b789cdc02072fc4793d20 Mon Sep 17 00:00:00 2001 From: David VanLaningham <64915094+dsvanlani@users.noreply.github.com> Date: Thu, 24 Feb 2022 16:49:52 -0500 Subject: [PATCH] Move ServerToCommandMessage to separate section (#2) --- specification.md | 49 +++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/specification.md b/specification.md index fdfec57..b466987 100644 --- a/specification.md +++ b/specification.md @@ -361,27 +361,11 @@ enum ServerCapabilities { #### command This field is set when the server wants the agent to -perform a restart or shutdown command. This field must not be set with other fields +perform a restart or shutdown. This field must not be set with other fields besides instance_uid or capabilities. All other fields will be ignored and the -agent will execute the command. +agent will execute the command. See [ServerToAgentCommand Message](#servertoagentcommand-message) +for details. -```protobuf -// ServerToAgentCommand is sent from the server to the agent to request that the agent -// perform a command. -message ServerToAgentCommand { - enum CommandType { - // The agent should restart. This request will be ignored if the agent does not - // support restart. - Restart = 0; - - // The agent should shutdown. This request will be ignored if the agent does not - // support shutdown. Shutdown is permanent and the agent will no longer be running - // or connected to the management server. - Shutdown = 1; - } - CommandType type = 1; -} -```

ServerErrorResponse Message

@@ -432,6 +416,33 @@ Error message, typically human readable. Additional [RetryInfo](#throttling) message about retrying if type==UNAVAILABLE. +

ServerToAgentCommand Message

+ + +The message has the following structure: + +```protobuf +// ServerToAgentCommand is sent from the server to the agent to request that the agent +// perform a command. +message ServerToAgentCommand { + enum CommandType { + // The agent should restart. This request will be ignored if the agent does not + // support restart. + Restart = 0; + + // The agent should shutdown. This request will be ignored if the agent does not + // support shutdown. Shutdown is permanent and the agent will no longer be running + // or connected to the management server. + Shutdown = 1; + } + CommandType type = 1; +} +``` + +The ServerToAgentCommand message is sent when the Server wants the Agent to restart or shutdown. +This message must only contain the command, instance_uid, and capabilities fields. All other fields +will be ignored. + # Operation