From 8844aead742a77d8416e40d3897cc638cba10d19 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 3 May 2020 13:20:40 -0500 Subject: [PATCH] functions: vmip: Print all addresses Since I no longer test FMOS in IPv6-only environments, I need `vmip` to show IPv4 addresses, too. --- functions/vmip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/vmip b/functions/vmip index e00ac2b..590798e 100644 --- a/functions/vmip +++ b/functions/vmip @@ -1,2 +1,2 @@ virsh qemu-agent-command $1 '{"execute":"guest-network-get-interfaces"}' \ - | jq -r '.return | .[] | select(.name=="eth0") | .["ip-addresses"] | map(select(.["ip-address-type"] == "ipv6" and (.["ip-address"]|startswith("fe80")|not)))[0]["ip-address"]' + | jq -r '.return | .[] | select(.name!="lo") | .["ip-addresses"] | .[] | .["ip-address"]'