functions: vmip: Print all addresses
Since I no longer test FMOS in IPv6-only environments, I need `vmip` to show IPv4 addresses, too.master
parent
2ff70f36b5
commit
8844aead74
|
@ -1,2 +1,2 @@
|
||||||
virsh qemu-agent-command $1 '{"execute":"guest-network-get-interfaces"}' \
|
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"]'
|
||||||
|
|
Reference in New Issue