Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix capabilities enum name and value #47

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 36 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,36 +329,37 @@ enum Flags {

#### capabilities

Bitmask of flags defined by Capabilities enum. All bits that are not defined in
Capabilities enum MUST be set to 0 by the Server. This allows extending the
protocol and the Capabilities enum in the future such that old Servers
automatically report that they don't support the new capability. This field MUST
be set in the first ServerToAgent sent by the Server and MAY be omitted in
subsequent ServerToAgent messages by setting it to Unspecified value.
Bitmask of flags defined by ServerCapabilities enum. All bits that are not
defined in ServerCapabilities enum MUST be set to 0 by the Server. This allows
extending the protocol and the ServerCapabilities enum in the future such that
old Servers automatically report that they don't support the new capability.
This field MUST be set in the first ServerToAgent sent by the Server and MAY be
omitted in subsequent ServerToAgent messages by setting it to
UnspecifiedServerCapability value.

```protobuf
enum ServerCapabilities {
// The capabilities field is unspecified.
Unspecified = 0;
// The Server can accept status reports. This bit MUST be set, since all Server
// MUST be able to accept status reports.
AcceptsStatus = 0x00000001;
// The Server can offer remote configuration to the Agent.
OffersRemoteConfig = 0x00000002;
// The Server can accept EffectiveConfig in StatusReport.
AcceptsEffectiveConfig = 0x00000004;
// The Server can offer Addons.
OffersAddons = 0x00000008;
// The Server can accept Addon status.
AcceptsAddonsStatus = 0x00000010;
// The Server can offer packages to install.
OffersAgentPackage = 0x00000020;
// The Server can accept the installation status of the package.
AcceptsAgentPackageStatus = 0x00000040;
// The Server can offer connection settings.
OffersConnectionSettings = 0x00000080;

// Add new capabilities here, continuing with the least significant unused bit.
// The capabilities field is unspecified.
UnspecifiedServerCapability = 0;
// The Server can accept status reports. This bit MUST be set, since all Server
// MUST be able to accept status reports.
AcceptsStatus = 0x00000001;
// The Server can offer remote configuration to the Agent.
OffersRemoteConfig = 0x00000002;
// The Server can accept EffectiveConfig in StatusReport.
AcceptsEffectiveConfig = 0x00000004;
// The Server can offer Addons.
OffersAddons = 0x00000008;
// The Server can accept Addon status.
AcceptsAddonsStatus = 0x00000010;
// The Server can offer packages to install.
OffersAgentPackage = 0x00000020;
// The Server can accept the installation status of the package.
AcceptsAgentPackageStatus = 0x00000040;
// The Server can offer connection settings.
OffersConnectionSettings = 0x00000080;

// Add new capabilities here, continuing with the least significant unused bit.
}
```

Expand Down Expand Up @@ -582,17 +583,18 @@ last StatusReport message was sent.

#### capabilities

Bitmask of flags defined by Capabilities enum. All bits that are not defined in
Capabilities enum MUST be set to 0 by the Agent. This allows extending the
protocol and the Capabilities enum in the future such that old Agents
automatically report that they don't support the new capability. This field MUST
be set in the first StatusReport sent by the Agent and MAY be omitted in
subsequent StatusReport messages by setting it to Unspecified value.
Bitmask of flags defined by AgentCapabilities enum. All bits that are not
defined in AgentCapabilities enum MUST be set to 0 by the Agent. This allows
extending the protocol and the AgentCapabilities enum in the future such that
old Agents automatically report that they don't support the new capability. This
field MUST be set in the first StatusReport sent by the Agent and MAY be omitted
in subsequent StatusReport messages by setting it to UnspecifiedAgentCapability
value.

```protobuf
enum AgentCapabilities {
// The capabilities field is unspecified.
Unspecified = 0;
UnspecifiedAgentCapability = 0;
// The Agent can report status. This bit MUST be set, since all Agents MUST
// report status.
ReportsStatus = 0x00000001;
Expand Down