Skip to content

Commit b138cc5

Browse files
committed
update
1 parent 57b4773 commit b138cc5

1 file changed

Lines changed: 1 addition & 81 deletions

File tree

bin/get_server_network_info.php

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -6,87 +6,7 @@
66
die('Missing Server ID Parameter!
77
88
Syntax: '.$_SERVER['argv'][0].' <id>
9-
where <id> is a server id
10-
11-
Example Response:
12-
{
13-
"vlans": {
14-
"6897": {
15-
"network": "66.45.252.40/29",
16-
"network_ip": "66.45.252.40",
17-
"bitmask": "29",
18-
"netmask": "255.255.255.248",
19-
"broadcast": "66.45.252.47",
20-
"hostmin": "66.45.252.41",
21-
"hostmax": "66.45.252.46",
22-
"first_usable": "66.45.252.42",
23-
"gateway": "66.45.252.41",
24-
"hosts": 6,
25-
"vlans_id": "6897",
26-
"vlans_block": "1",
27-
"vlans_networks": ":66.45.252.40/29:",
28-
"vlans_ports": ":139/Ethernet1/23:",
29-
"vlans_comment": "fullrack.ripcordindustries.com",
30-
"vlans_primary": "1",
31-
"primary": true,
32-
"comment": "fullrack.ripcordindustries.com"
33-
}
34-
},
35-
"assets": {
36-
"4221": {
37-
"id": "4221",
38-
"order_id": "14157",
39-
"datacenter": "04",
40-
"type_id": "1",
41-
"asset_tag": "",
42-
"rack": "",
43-
"row": "016",
44-
"col": "12",
45-
"unit_start": "1",
46-
"unit_end": "48",
47-
"unit_sub": "0",
48-
"ipmi_mac": "",
49-
"ipmi_ip": "",
50-
"hostname": "fullrack.ripcordindustries.com",
51-
"status": "active",
52-
"company": "int",
53-
"comments": "",
54-
"make": "Eaton",
55-
"model": "",
56-
"description": "",
57-
"primary_ipv4": "",
58-
"primary_ipv6": "",
59-
"customer_id": "int3000",
60-
"external_id": "",
61-
"billing_status": "unknown",
62-
"overdue": "0",
63-
"create_timestamp": null,
64-
"update_timestamp": null,
65-
"asset_id": "1",
66-
"asset_name": "server",
67-
"switchports": [
68-
"8148"
69-
],
70-
"vlans": null
71-
}
72-
},
73-
"switchports": {
74-
"8148": {
75-
"switchport_id": "8148",
76-
"switch_id": "139",
77-
"switch": "edge6a",
78-
"port": "Ethernet1/23",
79-
"blade": "Ethernet1",
80-
"justport": "23",
81-
"graph_id": "10395",
82-
"vlans": [
83-
"6897"
84-
],
85-
"asset_id": "4221"
86-
}
87-
}
88-
}
89-
');
9+
where <id> is a server id');
9010
}
9111
$info = get_server_network_info($_SERVER['argv'][1]);
9212
echo str_replace('\\/', '/', json_encode($info, JSON_PRETTY_PRINT)).PHP_EOL;

0 commit comments

Comments
 (0)