Closed peterVG closed 4 years ago
I think the fields are missing because it's using default value. Specifically: false
(for boolean), null
(for object), 0
(for number).
Also of note is that the Powergate CLI output used PascalCase wherease the Pygate output uses snake_case, is this for PEP 8 compliance?
I think it's because the generated code is language-specific, the CLI is written in Go, so it's using Pascal case (public field in Go has to start with a capital letter) while we are using Python.
You can test this by setting the default configuration, for example set the repairable
to be true
and it should appear.
Yes, I've tested and confirmed this. If the "missing" attributes are assigned values and pushed to a new defaultConfig they will display.
See https://github.com/pygate/pygate-gRPC/blob/main/pygate_grpc/ffs.py#L73-L75
If you run the examples script which uses this function (see https://github.com/pygate/pygate-gRPC/blob/main/examples/ffs_config.py), it outputs the following attributes for the Config:
However, if you use the same FFS and token and run it in CLI you get:
Specifically the following fields are missing from the pygate ffs.default_config:
from "Hot":
from "Cold":
Also, "Pinned CIDs"
Also of note is that the Powergate CLI output used PascalCase wherease the Pygate output uses snake_case, is this for PEP 8 compliance?