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

file permission as decimal or octal? #77

Closed hellt closed 2 years ago

hellt commented 2 years ago

Hi all, in gnoi file permissions are conveyed via uint32 type like shown here for example

https://github.com/openconfig/gnoi/blob/master/file/file.proto#L146

What proto doesn't clarify is that what value should be conveyed in this uint 32 field, should it be

For example, for a unix permission value of 777, should the value be 777 or 511, where 511 is o777 converted to decimal?

hellt commented 2 years ago

👋 @robshakir @marcushines do you guys have a view on what is required?

marcushines commented 2 years ago

Just use the int value type to hold the base octal representation i.e. i.e. no base conversion should be necessary to read / write the value

755 stays 755 4755 stays 4755 and so on

hellt commented 2 years ago

thanks for clarifications!