openstorage icon indicating copy to clipboard operation
openstorage copied to clipboard

golang api: CredsEnumerate should return map[string]map[string]string

Open lpabon opened this issue 7 years ago • 1 comments

Is this a BUG REPORT or FEATURE REQUEST?: BUG

What happened: While writing the fake driver, I returned data in the driver implementation of CredsEnumerate as map[string]interface{} where the interface{} was pointing to map[string]string since that is what the params value type is for CredsCreate.

This caused an issue in the SDK calls, since they expected map[string]interface{} where the interface is expected to be map[string]interface{} instead of map[string]string.

I spoke to @talakad and @disrani-px and we propose to standardize and change the type of CredsEnumerate to follow that of CredsCreate and return map[string]map[string]string.

What is required: This requires the following tasks:

  • [ ] Change the golang interface of CredsEnumerate to return map[string]map[string]string
  • [ ] The above change will require any drivers (Px included) to change their API and implementations to return this type.

Part of #407

lpabon avatar Jun 11 '18 20:06 lpabon

For now, the SDK implementation will expect map[string]interface to return map[string]string, until the Golang interface is fixed.

lpabon avatar Jun 11 '18 20:06 lpabon