Thank you for the hint. I was able to write down some code but it still does not work. builder = flatbuffers.Builder(0)
permissionsRW = builder.CreateString("test-node/**")
description = builder.CreateString("Allow to read and write")
name = builder.CreateString("Test-node RW permission")
identifier = builder.CreateString("datalayer.test-node.rw")
Scope.ScopeStart(builder)
Scope.AddPermissionsRw(builder, permissionsRW)
Scope.AddDescription(builder, description)
Scope.AddName(builder, name)
Scope.AddIdentifier(builder, identifier)
scope = Scope.ScopeEnd(builder)
builder.Finish(scope)
variant = Variant()
variant_result = variant.set_flatbuffers(builder.Output())
if variant_result is not Result.OK:
print("ERROR: creating variant flatbuffer: ", variant_result, flush=True)
result, var= client.create_sync("datalayer/security/scopes", variant)
if result is not Result.OK:
print("ERROR: create scope failed: ", result, flush=True) I receive the error : ERROR: create scope failed: Result.TYPE_MISMATCH. It seems like the variant type is wrong maybe? I don't know why.
... View more