From d234dbf62a065de2b799f9b57c1b476c07a6bc17 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 21 Dec 2009 10:52:40 -0800 Subject: Move interface support from vyatta-cfg to vyatta-cfg-system All the other interface types are in vyatta-cfg-system, only loopback and ethernet were in vyatta-cfg --- tests/isip.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/isip.pl (limited to 'tests/isip.pl') diff --git a/tests/isip.pl b/tests/isip.pl new file mode 100644 index 00000000..35a04b7a --- /dev/null +++ b/tests/isip.pl @@ -0,0 +1,23 @@ +#! /usr/bin/perl + +# Standalone test for Vyatta::Misc::isIPInterfaces + +use strict; +use warnings; +use Vyatta::Misc; +use Vyatta::Interface; + +my $vc; +my @interfaces = getInterfaces(); +print "Interfaces: ", join(' ',@interfaces),"\n"; + +foreach my $lip (@ARGV) { + print $lip, " is"; + if (Vyatta::Misc::isIPinInterfaces($vc, $lip, @interfaces)) { + print " in\n"; + } else { + print " not in\n"; + } +} + +exit 0; -- cgit v1.2.3