diff --git a/pkg/api/api_default_service.go b/pkg/api/api_default_service.go index 9a5603c..e58031f 100644 --- a/pkg/api/api_default_service.go +++ b/pkg/api/api_default_service.go @@ -388,7 +388,7 @@ func (cfm *CfmApiService) BladesGetMemory(ctx context.Context, applianceId strin } // order returned uris by memory id - memoryIds := blade.GetAllMemoryIds() + memoryIds := blade.GetAllMemoryIds(ctx) sort.Strings(memoryIds) memory := blade.GetMemory(ctx) @@ -422,12 +422,17 @@ func (cfm *CfmApiService) BladesGetMemoryById(ctx context.Context, applianceId s return formatErrorResp(ctx, err.(*common.RequestError)) } - details, err := memory.GetDetails(ctx) - if err != nil { - return formatErrorResp(ctx, err.(*common.RequestError)) - } + if memory != nil { + details, err := memory.GetDetails(ctx) + if err != nil { + return formatErrorResp(ctx, err.(*common.RequestError)) + } - return openapi.Response(http.StatusOK, details), nil + return openapi.Response(http.StatusOK, details), nil + + } else { + return openapi.Response(http.StatusOK, openapi.MemoryRegion{}), nil + } } // BladesGetPortById - @@ -447,12 +452,17 @@ func (cfm *CfmApiService) BladesGetPortById(ctx context.Context, applianceId str return formatErrorResp(ctx, err.(*common.RequestError)) } - details, err := port.GetDetails(ctx) - if err != nil { - return formatErrorResp(ctx, err.(*common.RequestError)) - } + if port != nil { + details, err := port.GetDetails(ctx) + if err != nil { + return formatErrorResp(ctx, err.(*common.RequestError)) + } - return openapi.Response(http.StatusOK, details), nil + return openapi.Response(http.StatusOK, details), nil + + } else { + return openapi.Response(http.StatusOK, openapi.PortInformation{}), nil + } } // BladesGetPorts - @@ -468,7 +478,7 @@ func (cfm *CfmApiService) BladesGetPorts(ctx context.Context, applianceId string } // order returned uris by port id - portIds := blade.GetAllPortIds() + portIds := blade.GetAllPortIds(ctx) sort.Strings(portIds) ports := blade.GetPorts(ctx) @@ -502,12 +512,17 @@ func (cfm *CfmApiService) BladesGetResourceById(ctx context.Context, applianceId return formatErrorResp(ctx, err.(*common.RequestError)) } - details, err := resource.GetDetails(ctx) - if err != nil { - return formatErrorResp(ctx, err.(*common.RequestError)) - } + if resource != nil { + details, err := resource.GetDetails(ctx) + if err != nil { + return formatErrorResp(ctx, err.(*common.RequestError)) + } - return openapi.Response(http.StatusOK, details), nil + return openapi.Response(http.StatusOK, details), nil + + } else { + return openapi.Response(http.StatusOK, openapi.MemoryResourceBlock{}), nil + } } // BladesGetResources - @@ -523,7 +538,7 @@ func (cfm *CfmApiService) BladesGetResources(ctx context.Context, applianceId st } // order returned uris by resourse id - resourceIds := blade.GetAllResourceIds() + resourceIds := blade.GetAllResourceIds(ctx) sort.Strings(resourceIds) resources := blade.GetResources(ctx) @@ -632,7 +647,7 @@ func (cfm *CfmApiService) HostGetMemory(ctx context.Context, hostId string) (ope } // order returned uris by memory id - memoryIds := host.GetAllMemoryIds() + memoryIds := host.GetAllMemoryIds(ctx) sort.Strings(memoryIds) memory := host.GetMemory(ctx) @@ -818,7 +833,7 @@ func (cfm *CfmApiService) HostsGetMemoryDevices(ctx context.Context, hostId stri } // order returned uris by memory device id - memdevIds := host.GetAllMemoryDeviceIds() + memdevIds := host.GetAllMemoryDeviceIds(ctx) sort.Strings(memdevIds) memdevs := host.GetMemoryDevices(ctx) @@ -863,7 +878,7 @@ func (cfm *CfmApiService) HostsGetPorts(ctx context.Context, hostId string) (ope } // order returned uris by port id - portIds := host.GetAllPortIds() + portIds := host.GetAllPortIds(ctx) sort.Strings(portIds) ports := host.GetPorts(ctx) diff --git a/pkg/api/api_redfish_service.go b/pkg/api/api_redfish_service.go index ccce4b1..7a74513 100644 --- a/pkg/api/api_redfish_service.go +++ b/pkg/api/api_redfish_service.go @@ -287,7 +287,7 @@ func (cfm *CfmApiService) RedfishV1ChassisChassisIdPCIeDevicesGet(ctx context.Co } // order returned uris by memory device id - memdevIds := host.GetAllMemoryDeviceIds() + memdevIds := host.GetAllMemoryDeviceIds(ctx) sort.Strings(memdevIds) members := []redfishapi.OdataV4IdRef{} @@ -588,7 +588,7 @@ func (cfm *CfmApiService) RedfishV1FabricsFabricIdConnectionsGet(ctx context.Con if err != nil { return formatRedfishErrorResp(ctx, err.(*common.RequestError)) } - memoryIds := blade.GetAllMemoryIds() + memoryIds := blade.GetAllMemoryIds(ctx) sort.Strings(memoryIds) for _, memId := range memoryIds { @@ -652,7 +652,7 @@ func (cfm *CfmApiService) RedfishV1FabricsFabricIdConnectionsPost(ctx context.Co endpointOdataId := connectionV131Connection.Links.TargetEndpoints[0].OdataId for bladeId, blade := range appliance.GetBlades(ctx) { - for _, memoryId := range blade.GetAllMemoryIds() { + for _, memoryId := range blade.GetAllMemoryIds(ctx) { if fmt.Sprintf("/redfish/v1/Systems/%s/MemoryDomains/%s/MemoryChunks/%s", fabricId, bladeId, memoryId) == memoryChunkOdataId { targetBladeId = bladeId r.MemoryId = memoryId @@ -662,7 +662,7 @@ func (cfm *CfmApiService) RedfishV1FabricsFabricIdConnectionsPost(ctx context.Co if r.MemoryId == "" { continue } - for _, portid := range blade.GetAllPortIds() { + for _, portid := range blade.GetAllPortIds(ctx) { if fmt.Sprintf("/redfish/v1/Fabrics/%s/Endpoints/%s", fabricId, bladeId+strings.Replace(portid, "port", "up", 1)) == endpointOdataId { r.PortId = portid break @@ -784,7 +784,7 @@ func (cfm *CfmApiService) RedfishV1FabricsFabricIdEndpointsGet(ctx context.Conte members := []redfishapi.OdataV4IdRef{} for _, bladeId := range bladeIds { blade, _ := appliance.GetBladeById(ctx, bladeId) - for _, portid := range blade.GetAllPortIds() { + for _, portid := range blade.GetAllPortIds(ctx) { members = append(members, redfishapi.OdataV4IdRef{ OdataId: fmt.Sprintf("/redfish/v1/Fabrics/%s/Endpoints/%s", fabricId, bladeId+strings.Replace(portid, "port", "up", 1))}) } @@ -943,7 +943,7 @@ func (cfm *CfmApiService) RedfishV1FabricsFabricIdSwitchesSwitchIdPortsGet(ctx c } // order returned uris by port id - portIds := blade.GetAllPortIds() + portIds := blade.GetAllPortIds(ctx) sort.Strings(portIds) members := []redfishapi.OdataV4IdRef{} for _, member := range portIds { @@ -1377,7 +1377,7 @@ func (cfm *CfmApiService) RedfishV1SystemsComputerSystemIdMemoryDomainsMemoryDom } // order returned uris by memory id - memoryIds := blade.GetAllMemoryIds() + memoryIds := blade.GetAllMemoryIds(ctx) sort.Strings(memoryIds) members := []redfishapi.OdataV4IdRef{} for _, member := range memoryIds { diff --git a/pkg/manager/blade.go b/pkg/manager/blade.go index b778270..8b752a7 100644 --- a/pkg/manager/blade.go +++ b/pkg/manager/blade.go @@ -128,7 +128,7 @@ func (b *Blade) AssignMemory(ctx context.Context, r *RequestAssignMemory) (*open if len(memory.resourceIds) != 0 { resourcesToUpdate = memory.resourceIds } else { - resourcesToUpdate = b.GetAllResourceIds() + resourcesToUpdate = b.GetAllResourceIds(ctx) } for _, resourceId := range resourcesToUpdate { resource, err := b.GetResourceById(ctx, resourceId) @@ -333,7 +333,7 @@ func (b *Blade) FreeMemoryById(ctx context.Context, memoryId string) (*openapi.M if len(memory.resourceIds) != 0 { resourcesToUpdate = memory.resourceIds } else { - resourcesToUpdate = b.GetAllResourceIds() + resourcesToUpdate = b.GetAllResourceIds(ctx) } for _, resourceId := range resourcesToUpdate { resource, err := b.GetResourceById(ctx, resourceId) @@ -365,33 +365,30 @@ func (b *Blade) FreeMemoryById(ctx context.Context, memoryId string) (*openapi.M return &memoryRegion, nil } -func (b *Blade) GetAllMemoryIds() []string { +func (b *Blade) GetAllMemoryIds(ctx context.Context) []string { var ids []string - // CACHE: Get - for id := range b.Memory { + for id := range b.GetMemory(ctx) { ids = append(ids, id) } return ids } -func (b *Blade) GetAllPortIds() []string { +func (b *Blade) GetAllPortIds(ctx context.Context) []string { var ids []string - // CACHE: Get - for id := range b.Ports { + for id := range b.GetPorts(ctx) { ids = append(ids, id) } return ids } -func (b *Blade) GetAllResourceIds() []string { +func (b *Blade) GetAllResourceIds(ctx context.Context) []string { var ids []string - // CACHE: Get - for id := range b.Resources { + for id := range b.GetResources(ctx) { ids = append(ids, id) } @@ -402,6 +399,11 @@ func (b *Blade) GetMemoryById(ctx context.Context, memoryId string) (*BladeMemor logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryById: ", "memoryId", memoryId, "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return nil, nil + } + memory, ok := b.Memory[memoryId] if !ok { newErr := fmt.Errorf("memory [%s] not found on appliance [%s] blade [%s] ", memoryId, b.ApplianceId, b.Id) @@ -418,6 +420,11 @@ func (b *Blade) GetMemory(ctx context.Context) map[string]*BladeMemory { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemory: ", "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return make(map[string]*BladeMemory) + } + memory := b.Memory logger.V(2).Info("success: get memory", "count", len(memory), "bladeId", b.Id, "applianceId", b.ApplianceId) @@ -430,9 +437,12 @@ func (b *Blade) GetMemoryBackend(ctx context.Context) ([]string, error) { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryBackend: ", "bladeId", b.Id, "applianceId", b.ApplianceId) - // HARDWARE: Get + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return make([]string, 0), nil + } + req := backend.GetMemoryRequest{} - // get memory ids from backend response, err := b.backendOps.GetMemory(ctx, &backend.ConfigurationSettings{}, &req) if err != nil || response == nil { newErr := fmt.Errorf("get memory (backend) [%s] failure on blade [%s]: %w", b.backendOps.GetBackendInfo(ctx).BackendName, b.Id, err) @@ -457,6 +467,11 @@ func (b *Blade) GetPortById(ctx context.Context, portId string) (*CxlBladePort, logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetPortById: ", "portId", portId, "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return nil, nil + } + port, ok := b.Ports[portId] if !ok { newErr := fmt.Errorf("port [%s] not found on appliance [%s] blade [%s] ", portId, b.ApplianceId, b.Id) @@ -473,6 +488,11 @@ func (b *Blade) GetPorts(ctx context.Context) map[string]*CxlBladePort { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetPorts: ", "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return make(map[string]*CxlBladePort) + } + ports := b.Ports logger.V(2).Info("success: get ports(blade) (cache)", "count", len(ports), "bladeId", b.Id, "applianceId", b.ApplianceId) @@ -485,6 +505,11 @@ func (b *Blade) GetPortsBackend(ctx context.Context) ([]string, error) { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetPortsBackend: ", "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return make([]string, 0), nil + } + req := backend.GetPortsRequest{} response, err := b.backendOps.GetPorts(ctx, &backend.ConfigurationSettings{}, &req) if err != nil || response == nil { @@ -502,6 +527,11 @@ func (b *Blade) GetResourceById(ctx context.Context, resourceId string) (*BladeR logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetResourceById: ", "resourceId", resourceId, "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return nil, nil + } + resource, ok := b.Resources[resourceId] if !ok { newErr := fmt.Errorf("resource [%s] not found on appliance [%s] blade [%s] ", resourceId, b.ApplianceId, b.Id) @@ -518,6 +548,11 @@ func (b *Blade) GetResources(ctx context.Context) map[string]*BladeResource { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetResources: ", "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return make(map[string]*BladeResource) + } + resources := b.Resources logger.V(2).Info("success: get resources(cache)", "count", len(resources), "bladeId", b.Id, "applianceId", b.ApplianceId) @@ -530,6 +565,11 @@ func (b *Blade) GetResourcesBackend(ctx context.Context) ([]string, error) { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetResourcesBackend: ", "bladeId", b.Id, "applianceId", b.ApplianceId) + if !b.IsOnline(ctx) { + // If blade offline, not an error. Just no information to return. + return make([]string, 0), nil + } + req := backend.MemoryResourceBlocksRequest{} response, err := b.backendOps.GetMemoryResourceBlocks(ctx, &backend.ConfigurationSettings{}, &req) if err != nil || response == nil { @@ -554,12 +594,7 @@ func (b *Blade) GetResourceTotals(ctx context.Context) (*ResponseResourceTotals, TotalMemoryAllocatedMiB: 0, } - if b.Status == common.OFFLINE { - return &response, nil - } - - resources := b.GetResources(ctx) - for _, resource := range resources { + for _, resource := range b.GetResources(ctx) { totals, err := resource.GetTotals(ctx) if err != nil || totals == nil { newErr := fmt.Errorf("failed to get resource totals: appliance [%s] blade [%s] resource [%s]: %w", b.ApplianceId, b.Id, resource.Id, err) @@ -574,7 +609,7 @@ func (b *Blade) GetResourceTotals(ctx context.Context) (*ResponseResourceTotals, response.TotalMemoryAvailableMiB = totalAvail response.TotalMemoryAllocatedMiB = totalAlloc - logger.V(2).Info("success: get resource totals", "bladeId", b.Id, "applianceId", b.ApplianceId) + logger.V(2).Info("success: get resource totals", "totals", response, "bladeId", b.Id, "applianceId", b.ApplianceId) return &response, nil } @@ -593,10 +628,14 @@ func (b *Blade) InvalidateCache() { } } +func (b *Blade) IsOnline(ctx context.Context) bool { + return b.Status == common.ONLINE +} + // UpdateConnectionStatusBackend - Query the blade root service to verify continued connection and update the object status accordingly. func (b *Blade) UpdateConnectionStatusBackend(ctx context.Context) { logger := klog.FromContext(ctx) - logger.V(4).Info(">>>>>> GetConnectionsStatusBackend: ", "bladeId", b.Id) + logger.V(4).Info(">>>>>> UpdateConnectionStatusBackend: ", "bladeId", b.Id) req := backend.GetRootServiceRequest{} response, err := b.backendOps.GetRootService(ctx, &backend.ConfigurationSettings{}, &req) diff --git a/pkg/manager/host.go b/pkg/manager/host.go index e1687ca..a2d650d 100644 --- a/pkg/manager/host.go +++ b/pkg/manager/host.go @@ -163,30 +163,30 @@ func (h *Host) FreeMemoryById(ctx context.Context, hostMemoryId string) (*openap return memory, nil } -func (h *Host) GetAllMemoryIds() []string { +func (h *Host) GetAllMemoryIds(ctx context.Context) []string { var ids []string - for id := range h.Memory { + for id := range h.GetMemory(ctx) { ids = append(ids, id) } return ids } -func (h *Host) GetAllMemoryDeviceIds() []string { +func (h *Host) GetAllMemoryDeviceIds(ctx context.Context) []string { var ids []string - for id := range h.MemoryDevices { + for id := range h.GetMemoryDevices(ctx) { ids = append(ids, id) } return ids } -func (h *Host) GetAllPortIds() []string { +func (h *Host) GetAllPortIds(ctx context.Context) []string { var ids []string - for id := range h.Ports { + for id := range h.GetPorts(ctx) { ids = append(ids, id) } @@ -197,6 +197,11 @@ func (h *Host) GetMemoryById(ctx context.Context, memoryId string) (*HostMemory, logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryById: ", "memoryId", memoryId, "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return nil, nil + } + memory, ok := h.Memory[memoryId] if !ok { newErr := fmt.Errorf("memory [%s] not found on host [%s]", memoryId, h.Id) @@ -213,6 +218,11 @@ func (h *Host) GetMemory(ctx context.Context) map[string]*HostMemory { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemory: ", "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return make(map[string]*HostMemory) + } + memory := h.Memory logger.V(2).Info("success: get memory", "count", len(memory), "hostId", h.Id) @@ -225,6 +235,11 @@ func (h *Host) GetMemoryBackend(ctx context.Context) ([]string, error) { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryBackend: ", "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return make([]string, 0), nil + } + req := backend.GetMemoryRequest{} response, err := h.backendOps.GetMemory(ctx, &backend.ConfigurationSettings{}, &req) if err != nil || response == nil { @@ -240,6 +255,11 @@ func (h *Host) GetMemoryDeviceById(ctx context.Context, memdevId string) (*HostM logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryDeviceById: ", "memdevId", memdevId, "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return nil, nil + } + memdev, ok := h.MemoryDevices[memdevId] if !ok { newErr := fmt.Errorf("memory device [%s] not found on host [%s]", memdevId, h.Id) @@ -256,6 +276,11 @@ func (h *Host) GetMemoryDevices(ctx context.Context) map[string]*HostMemoryDevic logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryDevices: ", "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return make(map[string]*HostMemoryDevice) + } + memdevs := h.MemoryDevices logger.V(2).Info("success: get memory devices", "count", len(memdevs), "hostId", h.Id) @@ -286,7 +311,7 @@ func (h *Host) GetMemoryDomainAllMemoryIds(ctx context.Context, domain string) ( typeString, exist := HostMemoryDomain[domain] if exist { - for id, mem := range h.Memory { + for id, mem := range h.GetMemory(ctx) { details, err := mem.GetDetails(ctx) if err != nil { return nil, err @@ -311,6 +336,11 @@ func (h *Host) GetMemoryDevicesBackend(ctx context.Context) (map[string][]string logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetMemoryDevicesBackend: ", "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return make(map[string][]string, 0), nil + } + req := backend.GetMemoryDevicesRequest{} response, err := h.backendOps.GetMemoryDevices(ctx, &backend.ConfigurationSettings{}, &req) if err != nil || response == nil { @@ -340,11 +370,7 @@ func (h *Host) GetMemoryTotals(ctx context.Context) (*ResponseHostMemoryTotals, RemoteMemoryMib: 0, } - if h.Status == common.OFFLINE { - return &response, nil - } - - for _, memory := range h.Memory { + for _, memory := range h.GetMemory(ctx) { totals, err := memory.GetTotals(ctx) if err != nil || totals == nil { newErr := fmt.Errorf("failed to get memory totals: host [%s] memory [%s]: %w", h.Id, memory.Id, err) @@ -359,7 +385,7 @@ func (h *Host) GetMemoryTotals(ctx context.Context) (*ResponseHostMemoryTotals, response.LocalMemoryMib = local response.RemoteMemoryMib = remote - logger.V(2).Info("success: get memory totals", "hostId", h.Id) + logger.V(2).Info("success: get memory totals", "totals", response, "hostId", h.Id) return &response, nil } @@ -368,6 +394,11 @@ func (h *Host) GetPortById(ctx context.Context, portId string) (*CxlHostPort, er logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetPortById: ", "portId", portId, "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return nil, nil + } + port, ok := h.Ports[portId] if !ok { newErr := fmt.Errorf("port [%s] not found on host [%s]", portId, h.Id) @@ -384,6 +415,11 @@ func (h *Host) GetPorts(ctx context.Context) map[string]*CxlHostPort { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetPorts: ", "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return make(map[string]*CxlHostPort) + } + ports := h.Ports logger.V(2).Info("success: get ports", "count", len(ports), "hostId", h.Id) @@ -396,6 +432,11 @@ func (h *Host) GetPortsBackend(ctx context.Context) ([]string, error) { logger := klog.FromContext(ctx) logger.V(4).Info(">>>>>> GetPortsBackend: ", "hostId", h.Id) + if !h.IsOnline(ctx) { + // If host offline, not an error. Just no information to return. + return make([]string, 0), nil + } + req := backend.GetPortsRequest{} response, err := h.backendOps.GetHostPortPcieDevices(ctx, &backend.ConfigurationSettings{}, &req) if err != nil || response == nil { @@ -431,10 +472,14 @@ func (h *Host) InvalidateCache() { } } +func (h *Host) IsOnline(ctx context.Context) bool { + return h.Status == common.ONLINE +} + // UpdateConnectionStatusBackend - Query the host root service to verify continued connection and update the object status accordingly. func (h *Host) UpdateConnectionStatusBackend(ctx context.Context) { logger := klog.FromContext(ctx) - logger.V(4).Info(">>>>>> GetConnectionsStatusBackend: ", "hostId", h.Id) + logger.V(4).Info(">>>>>> UpdateConnectionStatusBackend: ", "hostId", h.Id) req := backend.GetRootServiceRequest{} response, err := h.backendOps.GetRootService(ctx, &backend.ConfigurationSettings{}, &req)