mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Also show created/updated dates in Packet.net server list
This commit is contained in:
parent
46f9312d0c
commit
d1a18dc052
1 changed files with 6 additions and 4 deletions
|
@ -22,12 +22,14 @@ def main():
|
||||||
response = api_request("/projects/%s/devices?per_page=1000" % SERVO_PROJECT_ID)
|
response = api_request("/projects/%s/devices?per_page=1000" % SERVO_PROJECT_ID)
|
||||||
for device in response["devices"]:
|
for device in response["devices"]:
|
||||||
print(device["id"])
|
print(device["id"])
|
||||||
print(" Host:\t" + device["hostname"])
|
print(" Hostname:\t" + device["hostname"])
|
||||||
print(" Plan:\t" + device["plan"]["name"])
|
print(" Plan:\t" + device["plan"]["name"])
|
||||||
print(" OS: \t" + device["operating_system"]["name"])
|
print(" OS: \t" + device["operating_system"]["name"])
|
||||||
for address in device["ip_addresses"]:
|
for address in device["ip_addresses"]:
|
||||||
if address["public"]:
|
if address["public"]:
|
||||||
print(" IPv%s:\t%s" % (address["address_family"], address["address"]))
|
print(" IPv%s:\t%s" % (address["address_family"], address["address"]))
|
||||||
|
print(" Created:\t" + device["created_at"].replace("T", " "))
|
||||||
|
print(" Updated:\t" + device["updated_at"].replace("T", " "))
|
||||||
assert response["meta"]["next"] is None
|
assert response["meta"]["next"] is None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue