Closed peterVG closed 4 years ago
Using the example from this related PR (set_default_config
demo).
https://github.com/pygate/pygate-gRPC/pull/35/commits
produces a different error:
Traceback (most recent call last):
File "config.py", line 34, in <module>
client.ffs.set_default_config(Parse(newConfig, StorageConfig()), tk)
File "/Users/peter/Development/pygate/venv/lib/python3.8/site-packages/pygate_grpc/errors.py", line 14, in wrapper
return func(*args, **kwargs)
File "/Users/peter/Development/pygate/venv/lib/python3.8/site-packages/pygate_grpc/ffs.py", line 84, in set_default_config
config = Parse(config, ffs_rpc_pb2.StorageConfig())
File "/Users/peter/Development/pygate/venv/lib/python3.8/site-packages/google/protobuf/json_format.py", line 429, in Parse
if not isinstance(text, six.text_type): text = text.decode('utf-8')
AttributeError: decode
The method for setting the default config in Powergate is now called SetDefaultStorageConfig
so we probably just need to update the client to ffs.set_default_storage_config
To reproduce, run https://github.com/pygate/pygate-gRPC/blob/main/examples/ffs_config.py using https://github.com/pygate/pygate-gRPC/blob/main/cidconfig.json.
The error output:
This is a new error that's resulting as an incompatible change made to an updated Powergate version.