From aafd5a80db7b5ee27d1c432a4db93da48fbecb8a Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Fri, 4 Mar 2016 17:47:56 +0000 Subject: nms: Rename API end points and separate public/private --- web/etc/apache2/nms.tg16.gathering.org.conf | 25 +++++-- web/nms.gathering.org/API.rst | 90 ------------------------ web/nms.gathering.org/api/API.rst | 90 ++++++++++++++++++++++++ web/nms.gathering.org/api/private/comment-add | 20 ++++++ web/nms.gathering.org/api/private/comment-change | 20 ++++++ web/nms.gathering.org/api/private/comments | 15 ++++ web/nms.gathering.org/api/private/port-state | 31 ++++++++ web/nms.gathering.org/api/private/switch-add | 44 ++++++++++++ web/nms.gathering.org/api/public/ping | 25 +++++++ web/nms.gathering.org/api/public/switch-state | 44 ++++++++++++ web/nms.gathering.org/api/public/switches | 47 +++++++++++++ web/nms.gathering.org/comment-add.pl | 20 ------ web/nms.gathering.org/comment-change.pl | 20 ------ web/nms.gathering.org/comment.pl | 15 ---- web/nms.gathering.org/js/nms.js | 12 ++-- web/nms.gathering.org/ping.pl | 25 ------- web/nms.gathering.org/port-state.pl | 31 -------- web/nms.gathering.org/switch-state.pl | 44 ------------ web/nms.gathering.org/switches.pl | 47 ------------- web/nms.gathering.org/switches_add.pl | 44 ------------ 20 files changed, 360 insertions(+), 349 deletions(-) delete mode 100644 web/nms.gathering.org/API.rst create mode 100644 web/nms.gathering.org/api/API.rst create mode 100755 web/nms.gathering.org/api/private/comment-add create mode 100755 web/nms.gathering.org/api/private/comment-change create mode 100755 web/nms.gathering.org/api/private/comments create mode 100755 web/nms.gathering.org/api/private/port-state create mode 100755 web/nms.gathering.org/api/private/switch-add create mode 100755 web/nms.gathering.org/api/public/ping create mode 100755 web/nms.gathering.org/api/public/switch-state create mode 100755 web/nms.gathering.org/api/public/switches delete mode 100755 web/nms.gathering.org/comment-add.pl delete mode 100755 web/nms.gathering.org/comment-change.pl delete mode 100755 web/nms.gathering.org/comment.pl delete mode 100755 web/nms.gathering.org/ping.pl delete mode 100755 web/nms.gathering.org/port-state.pl delete mode 100755 web/nms.gathering.org/switch-state.pl delete mode 100755 web/nms.gathering.org/switches.pl delete mode 100755 web/nms.gathering.org/switches_add.pl (limited to 'web') diff --git a/web/etc/apache2/nms.tg16.gathering.org.conf b/web/etc/apache2/nms.tg16.gathering.org.conf index 13fbefb..9a6d7cd 100644 --- a/web/etc/apache2/nms.tg16.gathering.org.conf +++ b/web/etc/apache2/nms.tg16.gathering.org.conf @@ -4,23 +4,34 @@ ServerAlias einstein.tg16.gathering.org DocumentRoot /srv/tgmanage/web/nms.gathering.org + ScriptAlias /api/private/ /srv/tgmanage/web/nms.gathering.org/api/private/ + ScriptAlias /api/public/ /srv/tgmanage/web/nms.gathering.org/api/public/ + + AllowOverride None + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + + AuthUserFile /srv/tgmanage/web/.htpasswd + AuthName "Tech:Server Secret Volcano Lair" + AuthType Basic + Require valid-user + + + + AllowOverride None + Options +ExecCGI -MultiViews +Indexes +SymLinksIfOwnerMatch + Require all granted + AllowOverride None - Options Indexes FollowSymLinks ExecCGI MultiViews + Options Indexes FollowSymLinks MultiViews - AddHandler cgi-script .cgi .sh .pl .py AddDefaultCharset UTF-8 - SetEnvIF ^X-Forwarded-For$ "^185\.12\.59\.12$" AllowIP - SetEnvIF ^X-Forwarded-For$ "^2a02:ed02:1337::12$" AllowIP - AuthUserFile /srv/tgmanage/web/.htpasswd AuthName "Tech:Server Secret Volcano Lair" AuthType Basic Require valid-user - - Require env AllowIP diff --git a/web/nms.gathering.org/API.rst b/web/nms.gathering.org/API.rst deleted file mode 100644 index b56db64..0000000 --- a/web/nms.gathering.org/API.rst +++ /dev/null @@ -1,90 +0,0 @@ -API-dok -======= - -Work in progress. - -General: All end-points that output time-based data accept the "now=