New type ResourceWithConfig + Available method

This commit is contained in:
porosnicuadrian
2021-02-19 16:55:00 +02:00
committed by Dan Christian Bogos
parent f74608dedc
commit 2ccf3f7fa5
7 changed files with 75 additions and 14 deletions

View File

@@ -101,8 +101,8 @@ func (dDP *dynamicDP) fieldAsInterface(fldPath []string) (val interface{}, err e
return dp.FieldAsInterface(fldPath[2:])
case utils.MetaResources:
// sample of fieldName : ~*resources.ResourceID.Field
var reply *Resource
if err := connMgr.Call(dDP.resConns, nil, utils.ResourceSv1GetResource,
var reply *ResourceWithConfig
if err := connMgr.Call(dDP.resConns, nil, utils.ResourceSv1GetResourceWithConfig,
&utils.TenantID{Tenant: dDP.tenant, ID: fldPath[1]}, &reply); err != nil {
return nil, err
}