aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-13 12:55:06 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-13 12:55:06 +0000
commit9f992ae24299d81643188530bc6f79e76f141c03 (patch)
treed0e0796c547a7d34984b18ea6ed844d51ef11523 /web
parentf8482d205ea5eaaa0aac33ab3cd450b41126ef39 (diff)
NMS: Pick up IP's properly
Nobody look because I just defaulted to ipv4.
Diffstat (limited to 'web')
-rwxr-xr-xweb/nms.gathering.org/api/private/switch-add6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/nms.gathering.org/api/private/switch-add b/web/nms.gathering.org/api/private/switch-add
index 5abe0f4..93416ff 100755
--- a/web/nms.gathering.org/api/private/switch-add
+++ b/web/nms.gathering.org/api/private/switch-add
@@ -45,6 +45,9 @@ foreach my $tmp2 (@tmp) {
} else {
%placement = %{$switch{'placement'}};
}
+ if (not defined($switch{'ip'}) and defined($switch{'mgtmt4'})) {
+ $switch{'ip'} = $switch{'mgtmt4'};
+ }
my ($x1,$x2,$y1,$y2);
$x1 = $placement{'x1'};
$y1 = $placement{'y1'};
@@ -70,6 +73,9 @@ foreach my $tmp2 (@tmp) {
$y2 = $switch{'placement'}{'yy'};
$switch{'placement'} = "(($x1,$y1),($x2,$y2))";
}
+ if (not defined($switch{'ip'}) and defined($switch{'mgtmt4'})) {
+ $switch{'ip'} = $switch{'mgtmt4'};
+ }
my @set;
map {
if (defined($template{$_})) {