mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
feat: support filtering service logs by machine (-m/--machine)
This commit is contained in:
1 parent
bf65fbaca5
commit
1e6aaf451e
5 files changed
+62
-53
No files matched your search
@@ -149,18 +149,6 @@ func (cli *Client) PushImage(ctx context.Context, image string, opts PushImageOp
|
||||
return fmt.Errorf("list machines: %w", err)
|
||||
}
|
||||
|
||||
// Check if all specified machines were found.
|
||||
if len(machineMembers) != len(opts.Machines) {
|
||||
var notFound []string
|
||||
for _, nameOrID := range opts.Machines {
|
||||
if machineMembers.FindByNameOrID(nameOrID) == nil {
|
||||
notFound = append(notFound, nameOrID)
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("machines not found: %s", strings.Join(notFound, ", "))
|
||||
}
|
||||
|
||||
for _, mm := range machineMembers {
|
||||
machines = append(machines, mm.Machine)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user