diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-07-24 10:14:49 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-07-27 15:54:40 +0300 |
commit | 91a5fef528e998939860f5bff93f18d4723bbdfd (patch) | |
tree | bfa88ff7aba022bf09ce4cae333fa36e7ba5e9ae /env/files/getip.py | |
parent | 56671321dbd662fa3f2babdfdbf59f3287f5533b (diff) | |
download | puomi-91a5fef528e998939860f5bff93f18d4723bbdfd.tar.gz |
feat: add scripts + infra for setting up nested VMs for routers
Run ./check to run the acceptance tests with Subplot. This should
work, for minimal amounts of work.
Sponsored-by: author
Diffstat (limited to 'env/files/getip.py')
-rwxr-xr-x | env/files/getip.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/env/files/getip.py b/env/files/getip.py new file mode 100755 index 0000000..a8b326d --- /dev/null +++ b/env/files/getip.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 + +import json +import sys + + +leases = sys.argv[1] +hostname = sys.argv[2] +o = json.load(open(leases)) + +for h in o: + if h["hostname"] == hostname: + print(h["ip-address"]) |