Skip to content

Commit

Permalink
return fully-qualified remote names
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpertsov committed Sep 18, 2024
1 parent 0df8b5c commit be98499
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
15 changes: 0 additions & 15 deletions robot/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,24 +635,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
Expand Down
2 changes: 0 additions & 2 deletions robot/impl/resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ func (manager *resourceManager) ResourceNames() []resource.Name {
if !ok || !gNode.HasResource() {
continue
}
fmt.Println(">>> local -> legacy resource", k)
names = append(names, k)
}
return names
Expand All @@ -379,7 +378,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)
Expand Down

0 comments on commit be98499

Please sign in to comment.