openconfig / gnoi

gRPC Network Operations Interface (gNOI) defines a set of gRPC-based microservices for executing operational commands on network devices.
Apache License 2.0
159 stars 69 forks source link

Missing numeric value for enum constant #39

Closed amanand closed 4 years ago

amanand commented 4 years ago

https://github.com/openconfig/gnoi/blob/0b5aea31df40c60251a246ba9047cd256488036b/system/system.proto#L127

The entry for "reserved" enum value is incorrect.

enum RebootMethod { UNKNOWN = 0; // Invalid default method. COLD = 1; // Shutdown and restart OS and all hardware. POWERDOWN = 2; // Halt and power down, if possible. HALT = 3; // Halt, if possible. WARM = 4; // Reload configuration but not underlying hardware. NSF = 5; // Non-stop-forwarding reboot, if possible. reserved 6; // RESET method is deprecated in favor of the gNOI <<<<<< // FactoryReset.Start(). POWERUP = 7; // Apply power, no-op if power is already on. } Please change it to enum RebootMethod { UNKNOWN = 0; // Invalid default method. COLD = 1; // Shutdown and restart OS and all hardware. POWERDOWN = 2; // Halt and power down, if possible. HALT = 3; // Halt, if possible. WARM = 4; // Reload configuration but not underlying hardware. NSF = 5; // Non-stop-forwarding reboot, if possible. RESERVED = 6; // RESET method is deprecated in favor of the gNOI // FactoryReset.Start(). POWERUP = 7; // Apply power, no-op if power is already on. }

robshakir commented 4 years ago

This value isn't an enumerated value, it's specifically that value 6 is deprecated and must not be used. The specification is here.

amanand commented 4 years ago

My bad..will need to change my wrapper tool to parse the keyword instead of assuming it as an enum field.