mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Allow lookups based on short identifiers
This change introduces the ability to specify identifiers for jobs, allocs, evals and nodes on the command line with as little as one character, provided that it uniquely identifies the resource. An error with the possible results will be provided when the short identifier has multiple results.
This commit is contained in:
@@ -132,7 +132,7 @@ func (c *NodeStatusCommand) Run(args []string) int {
|
||||
var allocs []string
|
||||
if !short {
|
||||
// Query the node allocations
|
||||
nodeAllocs, _, err := client.Nodes().Allocations(nodeID, nil)
|
||||
nodeAllocs, _, err := client.Nodes().Allocations(node.ID, nil)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error querying node allocations: %s", err))
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user