This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use lib '/var/lib/netdisco'; | |
use netdisco qw/:all/; | |
config("/var/lib/netdisco/netdisco.conf"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# This code works for dagolden, based on a program originally by rjbs. It | |
# might not work for you. You are hereby empowered to do anything you want | |
# with this code, including fixing its bugs and redistributing it with your | |
# own license and API and whatever you want. It'd be nice if you mentioned | |
# dagolden and rjbs in your fork, but if you don't want to, that's just fine. | |
# | |
# The only thing you can't do is act like there's some guarantee that this | |
# code will actually work or even refrain from blowing stuff up. You're on | |
# your own. -- rjbs, 2014-04-23 and dagolden, 2016-07-06 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Force with Labelled Links</title> | |
<script src="http://mbostock.github.com/d3/d3.js?2.9.2"></script> | |
<style type="text/css"> | |
.node { | |
fill: #88f; | |
stroke: #44a; | |
stroke-width: 1px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Device | |
GET /device??q={search}&{params} # Lists ALL devices OR filters by search and/or params, if present | |
# params: vendor, dns, name, location, ip, description | |
# these can hopefully be autogenerated/parsed | |
POST /device # Creates a device. | |
GET /device/{ip} # Gets Device Generic Info | |
GET /device/{ip}/{query} | |
# query is one of: | |
# Details |