aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rwxr-xr-xweb/nms.gathering.org/api/public/switches2
-rwxr-xr-xweb/nms.gathering.org/api/read/switches-management3
-rwxr-xr-xweb/nms.gathering.org/api/write/switch-add2
-rwxr-xr-xweb/nms.gathering.org/api/write/switch-update3
4 files changed, 6 insertions, 4 deletions
diff --git a/web/nms.gathering.org/api/public/switches b/web/nms.gathering.org/api/public/switches
index 7e7f10b..3aa8af8 100755
--- a/web/nms.gathering.org/api/public/switches
+++ b/web/nms.gathering.org/api/public/switches
@@ -12,7 +12,7 @@ use Data::Dumper;
$nms::web::cc{'max-age'} = "60";
-my $q2 = $nms::web::dbh->prepare('select switch,sysname,placement,ip,poll_frequency,community,last_updated from switches where placement is not null');
+my $q2 = $nms::web::dbh->prepare('select switch,sysname,placement,mgmt_v4_addr,mgmt_v6_addr,mgmt_v4_gw,mgmt_v4_netsize,mgmt_v6_gw,mgmt_v6_netsize,mgmt_vlan,traffic_vlan,last_config_fetch,current_mac,poll_frequency,community,last_updated,switchtype from switches where placement is not null');
$q2->execute();
while (my $ref = $q2->fetchrow_hashref()) {
diff --git a/web/nms.gathering.org/api/read/switches-management b/web/nms.gathering.org/api/read/switches-management
index b18c6cd..8235da7 100755
--- a/web/nms.gathering.org/api/read/switches-management
+++ b/web/nms.gathering.org/api/read/switches-management
@@ -12,7 +12,8 @@ use Data::Dumper;
$nms::web::cc{'max-age'} = "60";
-my $q2 = $nms::web::dbh->prepare('select sysname,ip,poll_frequency,subnet4,subnet6,distro,last_updated from switches ');
+#my $q2 = $nms::web::dbh->prepare('select sysname,ip,poll_frequency,subnet4,subnet6,distro,last_updated from switches ');
+my $q2 = $nms::web::dbh->prepare('select switch,sysname,mgmt_v4_addr,mgmt_v6_addr,mgmt_v4_gw,mgmt_v4_netsize,mgmt_v6_gw,mgmt_v6_netsize,mgmt_vlan,traffic_vlan,last_config_fetch,current_mac,poll_frequency,community,last_updated,switchtype from switches where placement is not null');
$q2->execute();
while (my $ref = $q2->fetchrow_hashref()) {
diff --git a/web/nms.gathering.org/api/write/switch-add b/web/nms.gathering.org/api/write/switch-add
index 48f62fc..411a76b 100755
--- a/web/nms.gathering.org/api/write/switch-add
+++ b/web/nms.gathering.org/api/write/switch-add
@@ -22,7 +22,7 @@ my @dups;
my $sth = $nms::web::dbh->prepare("SELECT sysname FROM switches WHERE sysname=?");
-my @fields = ('ip', 'sysname', 'last_updated', 'locked', 'poll_frequency', 'community', 'lldp_chassis_id', 'secondary_ip', 'subnet4', 'subnet6', 'placement', 'distro', 'secondary_ip');
+my @fields = ( 'community', 'current_mac', 'distro_name', 'distro_phy_port', 'lldp_chassis_id', 'mgmt_v4_addr', 'mgmt_v4_gw', 'mgmt_v4_netsize', 'mgmt_v6_addr', 'mgmt_v6_gw', 'mgmt_v6_netsize', 'mgmt_vlan', 'placement', 'poll_frequency', 'subnet4', 'subnet6', 'switchtype', 'sysname', 'traffic_vlan');
sub convertplace
{
diff --git a/web/nms.gathering.org/api/write/switch-update b/web/nms.gathering.org/api/write/switch-update
index 6507d2b..14c8773 100755
--- a/web/nms.gathering.org/api/write/switch-update
+++ b/web/nms.gathering.org/api/write/switch-update
@@ -22,7 +22,8 @@ my @dups;
my $sth = $nms::web::dbh->prepare("SELECT sysname FROM switches WHERE sysname=?");
-my @fields = ('ip', 'sysname', 'last_updated', 'locked', 'poll_frequency', 'community', 'lldp_chassis_id', 'secondary_ip', 'subnet4', 'subnet6', 'placement', 'distro', 'secondary_ip');
+
+my @fields = ( 'community', 'current_mac', 'distro_name', 'distro_phy_port', 'lldp_chassis_id', 'mgmt_v4_addr', 'mgmt_v4_gw', 'mgmt_v4_netsize', 'mgmt_v6_addr', 'mgmt_v6_gw', 'mgmt_v6_netsize', 'mgmt_vlan', 'placement', 'poll_frequency', 'subnet4', 'subnet6', 'switchtype', 'sysname', 'traffic_vlan');
sub convertplace
{