can't use xargs with ironic client

Bug #1327517 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Triaged
Wishlist
Ghe Rivero

Bug Description

e.g.

ironic node-list | grep True | xargs -n1 ironic node-update replace /maintenance=False

BBEEPP, nope.

If we could have the node uuid last, or allow an option to specify it - e.g.
ironic node-update replace /maintenance=False -n
then we could do this :)

Ghe Rivero (ghe.rivero)
Changed in python-ironicclient:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Ghe Rivero (ghe.rivero)
Revision history for this message
Ghe Rivero (ghe.rivero) wrote :

ironic node-list | grep True | awk '{print $2}' | xargs -I{} ironic node-update {} replace /maintenance=False

Changed in python-ironicclient:
status: Triaged → Invalid
Revision history for this message
Robert Collins (lifeless) wrote :

Oh ewwww. Cool, but ewww.

I'd like deva's perspective on whether this is really invalid or not - reopening for that.

Changed in python-ironicclient:
status: Invalid → New
aeva black (tenbrae)
Changed in python-ironicclient:
status: New → Triaged
Revision history for this message
aeva black (tenbrae) wrote :

I'm also often annoyed by not being able to use xargs, and instead having to write out a complete for loop...

for N in $(ironic node-list | grep True | awk '{print $2}'); do ironic node-update $N replace /maintenance=False; done

It's not as neat... but this isn't really a problem.

I think adding an optional "-n UUID" argument, to those CLI operations that accept a node uuid, is reasonable and does not break compatibility with the current CLI.

Changed in python-ironicclient:
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers