From d1b48e89f91bf0d54d07b805a4691d938896b927 Mon Sep 17 00:00:00 2001 From: Maxim Pertsov Date: Fri, 9 Aug 2024 15:38:34 -0400 Subject: [PATCH] return fully-qualified remote names --- robot/client/client.go | 15 --------------- robot/impl/resource_manager.go | 2 -- 2 files changed, 17 deletions(-) diff --git a/robot/client/client.go b/robot/client/client.go index 25072d541c4..556324b8445 100644 --- a/robot/client/client.go +++ b/robot/client/client.go @@ -604,24 +604,9 @@ func (rc *RobotClient) resources(ctx context.Context) ([]resource.Status, []reso if rs.Name.API.Type.Namespace == resource.APINamespaceRDKInternal { continue } - if rs.State == resource.NodeStateUnhealthy { - continue - } - fmt.Println(">>> client -> status resource", "name", rs.Name) resources = append(resources, rs) } - resp2, err := rc.client.ResourceNames(ctx, &pb.ResourceNamesRequest{}) - if err != nil { - return nil, nil, err - } - for _, name := range resp2.Resources { - newName := rprotoutils.ResourceNameFromProto(name) - fmt.Println(">>> client -> legacy resource", "name", newName) - // s := resource.Status{Name: newName} - // resources = append(resources, s) - } - // resource has previously returned an unimplemented response, skip rpc call if rc.rpcSubtypesUnimplemented { return resources, resTypes, nil diff --git a/robot/impl/resource_manager.go b/robot/impl/resource_manager.go index d4ba93e3b79..fbb578ea00e 100644 --- a/robot/impl/resource_manager.go +++ b/robot/impl/resource_manager.go @@ -366,7 +366,6 @@ func (manager *resourceManager) ResourceNames() []resource.Name { if !ok || !gNode.HasResource() { continue } - fmt.Println(">>> local -> legacy resource", k) names = append(names, k) } return names @@ -381,7 +380,6 @@ func (manager *resourceManager) ResourceStatuses() []resource.Status { continue } s := gNode.ResourceStatus() - fmt.Println(">>> local -> status resource", name, "vs", s.Name) // replace with fully-qualified remote name s.Name = name result = append(result, s)